Laravel Messages

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

$message->from('[email protected]', 'Mr. Example');
$message->sender('[email protected]', 'Mr. Example');
$message->returnPath('[email protected]');
$message->to('[email protected]', 'Mr. Example');
$message->cc('[email protected]', 'Mr. Example');
$message->bcc('[email protected]', 'Mr. Example');
$message->replyTo('[email protected]', '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.