Merge pull request #15839 from Godmartinz/fix-mail-envelope-variable

replace env with config variable for from address
This commit is contained in:
snipe 2024-11-21 14:41:04 +00:00 committed by GitHub
commit 2a21cce4f5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 9 additions and 7 deletions

View file

@ -17,3 +17,5 @@ DB_PORT=3306
DB_DATABASE=null
DB_USERNAME=null
DB_PASSWORD=null
MAIL_FROM_ADDR=you@example.com

View file

@ -34,7 +34,7 @@ class CheckinAccessoryMail extends Mailable
*/
public function envelope(): Envelope
{
$from = new Address(env('MAIL_FROM_ADDR','service@snipe-it.io'));
$from = new Address(config('mail.from.address'));
return new Envelope(
from: $from,

View file

@ -43,7 +43,7 @@ class CheckinAssetMail extends Mailable
*/
public function envelope(): Envelope
{
$from = new Address(env('MAIL_FROM_ADDR','service@snipe-it.io'));
$from = new Address(config('mail.from.address'));
return new Envelope(
from: $from,

View file

@ -34,7 +34,7 @@ class CheckinLicenseMail extends Mailable
*/
public function envelope(): Envelope
{
$from = new Address(env('MAIL_FROM_ADDR','service@snipe-it.io'));
$from = new Address(config('mail.from.address'));
return new Envelope(
from: $from,

View file

@ -37,7 +37,7 @@ class CheckoutAccessoryMail extends Mailable
*/
public function envelope(): Envelope
{
$from = new Address(env('MAIL_FROM_ADDR','service@snipe-it.io'));
$from = new Address(config('mail.from.address'));
return new Envelope(
from: $from,

View file

@ -52,7 +52,7 @@ class CheckoutAssetMail extends Mailable
*/
public function envelope(): Envelope
{
$from = new Address(env('MAIL_FROM_ADDR', 'service@snipe-it.io'));
$from = new Address(config('mail.from.address'));
return new Envelope(
from: $from,

View file

@ -38,7 +38,7 @@ class CheckoutConsumableMail extends Mailable
*/
public function envelope(): Envelope
{
$from = new Address(env('MAIL_FROM_ADDR','service@snipe-it.io'));
$from = new Address(config('mail.from.address'));
return new Envelope(
from: $from,

View file

@ -36,7 +36,7 @@ class CheckoutLicenseMail extends Mailable
*/
public function envelope(): Envelope
{
$from = new Address(env('MAIL_FROM_ADDR','service@snipe-it.io'));
$from = new Address(config('mail.from.address'));
return new Envelope(
from: $from,