Laravel Messages

These can be used on the $message instance passed into Mail::send() or Mail::queue()

$message->from('email@example.com', 'Mr. Example');
$message->sender('email@example.com', 'Mr. Example');
$message->returnPath('email@example.com');
$message->to('email@example.com', 'Mr. Example');
$message->cc('email@example.com', 'Mr. Example');
$message->bcc('email@example.com', 'Mr. Example');
$message->replyTo('email@example.com', 'Mr. Example');
$message->subject('Welcome to the Jungle');
$message->priority(2);
$message->attach('foo\bar.txt', $options);

This uses in-memory data as attachments

$message->attachData('bar', 'Data Name', $options);

Embed a file in the message and get the CID

$message->embed('foo\bar.txt');
$message->embedData('foo', 'Data Name', $options);

Get the underlying Swift Message instance

$message->getSwiftMessage();

Leave a Reply

Your email address will not be published. Required fields are marked *