Mail::send('email.view', $data, function($message){}); Mail::send(['html.view', 'text.view'], $data, $callback); Mail::queue('email.view', $data, function($message){}); Mail::queueOn('queue-name', 'email.view', $data, $callback); Mail::later(5, 'email.view', $data, function($message){}); // Write all email to logs instead of sendingMail::pretend();
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();
No comments:
Post a Comment