Send email using Microsoft Graph

Use this guide if you want to configure the WordPress + Office 365 plugin to send emails from your WordPress website using Microsoft Graph. Also see the following video https://youtu.be/fQM1zP0pKqI.

Please Note

Please follow the steps below if you want to use the Graph Mailer without configuring other capabilities such as single sign-on

  • Go WP Admin > Plugins > Installed Plugins and make sure you de-activate and delete the WPO365 | LOGIN plugin.
  • Scroll to the top of the Plugins page and click Add new.
  • Search for WPO365 and click to install WPO365 | MS GRAPH MAILER.
  • Continue to the installation guide for the WPO365 | MS GRAPH MAILER.

Features

WPO365 | MS GRAPH MAILER or WPO365 | LOGIN (Free)

  • Delivery Send WordPress transactional emails from one of your Microsoft 365 Exchange Online / Mail enabled accounts using Microsoft Graph instead of - for example - SMTP.
  • Attachments Send files from your WordPress website as attachments.
  • Configuration / Test Easy configuration with detailed step-by-step Getting started guide and ability to test the configuration by sending a test email to various types of recipients incl. CC, BCC, optionally with attachment.

WPO365 | MAIL (Paid premium extension)

  • Mail audit / resend Log every transactional email sent from your WordPress website, review errors and try to send unsuccessfully sent mails again.
  • Save to Sent Items Emails sent will be saved in the Microsoft 365 account's mailbox in the Sent Items folder, further helping to track (successful) mail delivery.
  • Send as HTML Send emails formatted as HTML.
  • Send as BCC Send emails as BCC instead and prevent reply-to-all mail pollution.
  • Reply-to Configure a default reply-to mail address if this should differ from the account's mail address that is used to send WordPress transactional emails from.

Before you start

  • You are a Global Administrator for your company’s Microsoft 365 tenant / Azure AD directory (or have at least the ability to register a new application in Azure Active Directory.
  • You are an Administrator for your WordPress website.

Before you start

  • You must also already have configured the Integration capability of the WPO365 | LOGIN plugin.
  • You are a Global Administrator for your company’s Office 365 tenant / Azure AD directory (or have at least the ability to edit the app-only Azure Active Directory App registration that was created previously to add / ensure that the Mail.Send application permission has been added).
  • You are an Administrator for your WordPress website.

App registration

  • In Azure Portal click the 'hamburger' (icon with three horizontal lines in the upper corner) to open the menu.
  • Navigate to Azure Active Directory > App registrations.
  • Select the App registration that you created when you configured the SSO / Integration portion of the plugin.

API Permissions

  • Click API permissions from your App registration's menu on the left
  • Click + Add permission.
  • Select Microsoft Graph > Application permissions.
  • Scroll down to Mail and check
    • Mail.Send
  • Click  Add permissions.
  • Wait until  Grant admin consent for … has become available, then click to grant consent for all users in your tenant to use this ‘App registration’.
At this point you must be aware of the fact that you have now granted an application identity the unlimited permission to send emails as any user in your organization and ensure that you have taken sufficient precautions to protect your website against attacks.

Test plugin configuration

  • Navigate to WP Admin > WPO365 and click Plugin self-test.
  • Click to Start self-test.
  • When the self-test completes you must scroll to the end of the results and ensure that the self-test has found the permissions to be

Configure the Microsoft Graph Mailer for WordPress

  • To reconfigure your website and Send WordPress emails using Microsoft Graph you must check the corresponding option.
  • Next you must enter the user principal name (= Microsoft login name) of a Microsoft 365 Exchange Online / Mail enabled account that will be used to Send mail as / from.
  • Developers who have installed WordPress on their localhost, may check Fix WordPress@localhost issue to prevent WordPress from trying to send emails from WordPress@localhost which eventually will result in an error.

Test the Microsoft Graph Mailer for WordPress

  • To test the configuration you can enter comma separated email addresses for the following recipients:
    • To recipients
    • CC recipients
    • BCC recipients
  • Optionally you can also add an attachment when sending the test email.

  • Finally click Save configuration + Send test email and wait for the corresponding Feedback.

Adding premium features

You can unlock the premium features by purchasing the WPO365 | MAIL extension (see our website for details and pricing). The extension must be installed in addition to the WPO365 | MS GRAPH MAILER plugin.

Configure premium features

  • You can send emails with a Reply-to address that is different from the address sending the email.
  • From the dropdown you can choose to Send email formatted as HTML.
  • When you check the option to Save to Sent Items all emails sent will be saved in the Sent Item folder of the mailbox used to send emails from.
  • If you are regularly sending emails to multiple (CC) recipients you can Send to BCC instead. When you check this option all to and CC recipients will be configured as BCC recipients instead and the email will be sent to the Default To: recipient's email address that you must enter in the corresponding field.

Mail Audit / Resend

  • If you check the premium option to Log all emails sent from your WordPress website, the plugin will save all sent items in the database.

  • When you checked this option, a link to View logs will be shown and allow you to review errors and try to send unsuccessfully sent mails again.

Troubleshooting

If the test email was not sent successfully you may check the plugin's debug-log for any errors.

You can reach the WPO365 team for support and questions in one of the following ways:

  • Click the Contact link at the top of this page.
  • Use the Beacon by clicking the question mark in the blue dot on the plugin's configuration page.
  • Fill out the Contact Form on the website.
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us