o365-sendmail The Laravel Office 365 Mail Transport

Configuration

Once the package is installed, configure the o365-sendmail information and credentials using the following environment variables which are referenced by the library. The MAIL_MAILER environment variable should be defined as o365-sendmail:

1MAIL_MAILER=o365-sendmail
2MAIL_FROM_ADDRESS=<userPrincipalName>
3 
4O365SENDMAIL_TENANT=<tenant-id>
5O365SENDMAIL_CLIENT_ID=<client-id>
6O365SENDMAIL_CLIENT_SECRET=<client-secret>

Now you can start sending emails using o365-sendmail mail transport. Be sure to read the Laravel documentation for how to send email.

Code highlighting provided by Torchlight