Replaced direct env references of MAIL_SHOP_FROM with config file references. Also enabled optional usage of MAIL_FROM_NAME.

This commit is contained in:
Matt April 2019-10-26 11:09:46 -04:00
parent 54babf9079
commit 3ebdde7681
8 changed files with 8 additions and 8 deletions

View File

@ -45,7 +45,7 @@ class NewInvoiceNotification extends Mailable
$order = $this->invoice->order;
return $this->to($order->customer_email, $order->customer_full_name)
->from(env('SHOP_MAIL_FROM'))
->from(config('mail.from'))
->subject(trans('shop::app.mail.invoice.subject', ['order_id' => $order->increment_id]))
->view('shop::emails.sales.new-invoice');
}

View File

@ -42,7 +42,7 @@ class NewOrderNotification extends Mailable
public function build()
{
return $this->to($this->order->customer_email, $this->order->customer_full_name)
->from(env('SHOP_MAIL_FROM'))
->from(config('mail.from'))
->subject(trans('shop::app.mail.order.subject'))
->view('shop::emails.sales.new-order');
}

View File

@ -45,7 +45,7 @@ class NewRefundNotification extends Mailable
$order = $this->refund->order;
return $this->to($order->customer_email, $order->customer_full_name)
->from(env('SHOP_MAIL_FROM'))
->from(config('mail.from'))
->subject(trans('shop::app.mail.refund.subject', ['order_id' => $order->increment_id]))
->view('shop::emails.sales.new-refund');
}

View File

@ -45,7 +45,7 @@ class NewShipmentNotification extends Mailable
$order = $this->shipment->order;
return $this->to($order->customer_email, $order->customer_full_name)
->from(env('SHOP_MAIL_FROM'))
->from(config('mail.from'))
->subject(trans('shop::app.mail.shipment.subject', ['order_id' => $order->increment_id]))
->view('shop::emails.sales.new-shipment');
}

View File

@ -31,7 +31,7 @@ class RegistrationEmail extends Mailable
public function build()
{
return $this->to($this->data['email'])
->from(env('SHOP_MAIL_FROM'))
->from(config('mail.from'))
->subject(trans('shop::app.mail.customer.registration.customer-registration'))
->view('shop::emails.customer.registration')->with('data', $this->data);
}

View File

@ -31,7 +31,7 @@ class VerificationEmail extends Mailable
public function build()
{
return $this->to($this->verificationData['email'])
->from(env('SHOP_MAIL_FROM'))
->from(config('mail.from'))
->subject(trans('shop::app.mail.customer.verification.subject'))
->view('shop::emails.customer.verification-email')->with('data', ['email' => $this->verificationData['email'], 'token' => $this->verificationData['token']]);
}

View File

@ -21,7 +21,7 @@ class CustomerResetPassword extends ResetPassword
}
return (new MailMessage)
->from(env('SHOP_MAIL_FROM'))
->from(config('mail.from'))
->subject(__('shop::app.mail.forget-password.subject') )
->view('shop::emails.customer.forget-password', [
'user_name' => $notifiable->name,

View File

@ -31,7 +31,7 @@ class SubscriptionEmail extends Mailable
public function build()
{
return $this->to($this->subscriptionData['email'])
->from(env('SHOP_MAIL_FROM'))
->from(config('mail.from'))
->subject(trans('shop::app.mail.customer.subscription.subject'))
->view('shop::emails.customer.subscription-email')->with('data', ['content' => 'You Are Subscribed', 'token' => $this->subscriptionData['token']]);
}