Merge pull request #22373 from nextcloud/fix-example-usage-for-mailer

Fix example usage
This commit is contained in:
John Molakvoæ 2020-10-31 15:58:29 +01:00 committed by GitHub
commit 25a1df9c7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -59,9 +59,9 @@ use OCP\Mail\Events\BeforeMessageSent;
* $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(array('cloud@domain.org' => 'ownCloud Notifier'));
* $message->setTo(array('recipient@domain.org' => 'Recipient'));
* $message->setBody('The message text', 'text/html');
* $mailer->send($message);
*
* This message can then be passed to send() of \OC\Mail\Mailer