Fix the syntax and methods in the sample

This commit is contained in:
Joas Schilling 2016-04-25 16:03:20 +02:00
parent 6d668807fb
commit a18c8a7da0
No known key found for this signature in database
GPG Key ID: 70A0B324C41C0946
1 changed files with 4 additions and 3 deletions

View File

@ -32,9 +32,10 @@ use OC\Mail\Message;
* $mailer = \OC::$server->getMailer();
* $message = $mailer->createMessage();
* $message->setSubject('Your Subject');
* $message->setFrom(array('cloud@domain.org' => 'ownCloud Notifier');
* $message->setTo(array('recipient@domain.org' => 'Recipient');
* $message->setBody('The message text');
* $message->setFrom(['cloud@domain.org' => 'ownCloud Notifier']);
* $message->setTo(['recipient@domain.org' => 'Recipient']);
* $message->setPlainBody('The message text');
* $message->setHtmlBody('The <strong>message</strong> text');
* $mailer->send($message);
*
* This message can then be passed to send() of \OC\Mail\Mailer