Update mime message docs for new Swiftmailer version and lib parameter update (#585)

This commit is contained in:
Martijn 2019-04-09 11:16:50 +02:00 committed by Tobias Nyholm
parent abf2a0ae55
commit 2162ade61a

View File

@ -102,7 +102,7 @@ $mailgun->messages()->send('example.com', $parameters);
Below in an example how to create a Mime message with SwiftMailer. Below in an example how to create a Mime message with SwiftMailer.
```php ```php
$message = \Swift_Message::newInstance('Mail Subject'); $message = new Swift_Message('Mail Subject');
$message->setFrom(['from@exemple.com' => 'Example Inc']); $message->setFrom(['from@exemple.com' => 'Example Inc']);
$message->setTo(['user0gmail.com' => 'User 0', 'user1@hotmail.com' => 'User 1']); $message->setTo(['user0gmail.com' => 'User 0', 'user1@hotmail.com' => 'User 1']);
// $message->setBcc('admin@example.com'); Do not do this, BCC will be visible for all receipients if you do. // $message->setBcc('admin@example.com'); Do not do this, BCC will be visible for all receipients if you do.
@ -115,7 +115,7 @@ $message->setBody($messageBody, 'text/html');
$to = ['admin@example.com', 'user0gmail.com', 'user1@hotmail.com', 'invoice@example.com'] $to = ['admin@example.com', 'user0gmail.com', 'user1@hotmail.com', 'invoice@example.com']
// Send the message // Send the message
$mailgun->messages()->sendMime('example.com', $to, $message->toString()); $mailgun->messages()->sendMime('example.com', $to, $message->toString(), []);
``` ```
#### Show a stored message #### Show a stored message