W3cubDocs

/Laravel 8

MailChannel

class MailChannel (View source)

Properties

protected Factory $mailer The mailer implementation.
protected Markdown $markdown The markdown implementation.

Methods

void __construct(Factory $mailer, Markdown $markdown)

Create a new mail channel instance.

void send(mixed $notifiable, Notification $notification)

Send the given notification.

Closure messageBuilder(mixed $notifiable, Notification $notification, MailMessage $message)

Get the mailer Closure for the message.

string|array buildView(MailMessage $message)

Build the notification's view.

array additionalMessageData(Notification $notification)

Get additional meta-data to pass along with the view data.

void buildMessage(Message $mailMessage, mixed $notifiable, Notification $notification, MailMessage $message)

Build the mail message.

void addressMessage(Message $mailMessage, mixed $notifiable, Notification $notification, MailMessage $message)

Address the mail message.

void addSender(Message $mailMessage, MailMessage $message)

Add the "from" and "reply to" addresses to the message.

mixed getRecipients(mixed $notifiable, Notification $notification, MailMessage $message)

Get the recipients of the given message.

void addAttachments(Message $mailMessage, MailMessage $message)

Add the attachments to the message.

$this runCallbacks(Message $mailMessage, MailMessage $message)

Run the callbacks for the message.

Details

void __construct(Factory $mailer, Markdown $markdown)

Create a new mail channel instance.

Parameters

Factory $mailer
Markdown $markdown

Return Value

void

void send(mixed $notifiable, Notification $notification)

Send the given notification.

Parameters

mixed $notifiable
Notification $notification

Return Value

void

protected Closure messageBuilder(mixed $notifiable, Notification $notification, MailMessage $message)

Get the mailer Closure for the message.

Parameters

mixed $notifiable
Notification $notification
MailMessage $message

Return Value

Closure

protected string|array buildView(MailMessage $message)

Build the notification's view.

Parameters

MailMessage $message

Return Value

string|array

protected array additionalMessageData(Notification $notification)

Get additional meta-data to pass along with the view data.

Parameters

Notification $notification

Return Value

array

protected void buildMessage(Message $mailMessage, mixed $notifiable, Notification $notification, MailMessage $message)

Build the mail message.

Parameters

Message $mailMessage
mixed $notifiable
Notification $notification
MailMessage $message

Return Value

void

protected void addressMessage(Message $mailMessage, mixed $notifiable, Notification $notification, MailMessage $message)

Address the mail message.

Parameters

Message $mailMessage
mixed $notifiable
Notification $notification
MailMessage $message

Return Value

void

protected void addSender(Message $mailMessage, MailMessage $message)

Add the "from" and "reply to" addresses to the message.

Parameters

Message $mailMessage
MailMessage $message

Return Value

void

protected mixed getRecipients(mixed $notifiable, Notification $notification, MailMessage $message)

Get the recipients of the given message.

Parameters

mixed $notifiable
Notification $notification
MailMessage $message

Return Value

mixed

protected void addAttachments(Message $mailMessage, MailMessage $message)

Add the attachments to the message.

Parameters

Message $mailMessage
MailMessage $message

Return Value

void

protected $this runCallbacks(Message $mailMessage, MailMessage $message)

Run the callbacks for the message.

Parameters

Message $mailMessage
MailMessage $message

Return Value

$this

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/8.x/Illuminate/Notifications/Channels/MailChannel.html