Configure WordPress site send E-mail via Exchange Online (Office 365) | Provide user credentials without purchase Office 365 license | Part 5#6 5/5 (1)

7 min read
In the current article, we continue to review the scenario in which we want to configure our WordPress site to address Exchange Online server, and implement the best-practice scenario, in which we implement an authenticated mail session (providing Office 365 user credentials).

The main reason in which users often avoid the best practice of providing the required user credential is because that in an Office 365 based environment, the user credentials that we need to provide are the credentials of Office 365 that have Exchange Online license. And most of the time, we try to save the cost of purchasing Office 365 license.

In the current article, we review how to avoid the unnecessary costs of purchasing a decided Office 365 user license that will be used by the WordPress site (the mail account that will be used by WordPress site for addressing Office 365 mail server).

Technically speaking, we can configure the WordPress site to send E-mail using a specific E-mail address such as – support@o365info.com and provide the user credentials of “other Office 365 user”. In case that we will implement this option without implementing the required configuration, the task of “sending E-mail” will fail!

The reason for this “failure” is because, in an Office 365 based environment, Office 365 users A cannot send E-mail on behalf of user B with the required permissions.
A reasonable assumption could be that this issue can be easily solved by adding the ” WordPress site E-mail address” as an alias to the Office 365 user account, which we use his credentials.

Unfortunately, this configuration will not solve the problem because – in Exchange based environment, a recipient cannot send E-mail using his Alias E-mail address. Yes, I know this is sound strange, but you are welcome to try it yourself.

The solution that will answer all of our requirements will be implemented in the following way:

  1. Create a new Exchange Online distribution group

We will create a dedicated Exchange Online distribution group; they will be used for
representing the “WordPress site entity.” In our example, the distribution group will use the
E-mail address – support@o365info.com

  1. Select an Office 365 user who will be used for providing the required user credentials.

The WordPress site will be configured to provide the credentials of existing Office 365 user. In our example, we will use the credentials of Angelina (Angelina@o365info.com).
Angelina is the marketing representative who manages our WordPress site.

  1. Provide the Send As permissions to the Office 365 user

As mentioned, Office 365 cannot just send E-mail using an E-mail address that doesn’t “belong” to him. To be able to configure our WordPress site to use Angelina’s credentials, and at the same time, configure the WordPress site using different E-mail address (the E-mail address that is belonged to the distribution group that was created), we will assign Angelina, the “Send As” permissions on the distribution group that uses the E-mail address support@o365info.com

Using these steps, we can implement the preferred mail communication setting with Exchange Online meaning using authenticated mail session, and at the same time, save the unnecessary, cost of purchasing a decided Office 365 user license.

Implementing authentication by using user with Send As permissions

Note – in the current article series, we use a WordPress mail plugin named – Postman SMTP Mailer/Email Log

1#3 – Configure the SMTP Mailer WordPress plugin | using Office 365 user credentials

In the following section, we review how to configure the required credentials that will be needed for implemented an authentication session with Exchange Online.

Notice that in this phase, we didn’t provide the required “Send As permissions” and the expected result is – that if we try to send E-mail, the task will fail!

  • Login to your WordPress site
  • On the main page (the dashboard), select the Postman SMTP plugin
  • Click on the Settings

Send E-mail using other recipient credentials -01

  • Select the – Show All Settings

Send E-mail using other recipient credentials -02

In the following screenshot, we can see the WordPress site is configured to use the E-mail address – support@o365info.com

The user credentials that were configured are the credentials of Office 365 users named – Angelina.

Send E-mail using other recipient credentials -03

In this step, we will try to send E-mail to destination recipient.

  • In the Postman SMTP setup page, select the menu – Send a Test Email

Send E-mail using other recipient credentials -04

In our example, we send E-mail to Bob

  • Click Next

Send E-mail using other recipient credentials -05

The E-mail delivery failed!

The following error appears:

5.7.60 Client does not have permissions to send as this sender

The meaning of this error is, that we use the credentials of the user who doesn’t have the required permissions to send E-mail on behalf of the “support” (support@o365info.com) E-mail address.

  • In case that we want to get more detailed information, we can select the menu
    option – Session Transcript

Send E-mail using other recipient credentials -06

In the following screenshot, we can see the “recording” of the mail session that occurred between our WordPress site and the destination mail server (Exchange Online in our example).

Send E-mail using other recipient credentials -07

Step 2#3 – Creating a new distribution group + assign Send As permissions

In this section, we will

  • Create a new distribution group and assign the “support E-mail” to the distribution group.
  • Assign Angelina the Send As permissions to the “support group”
  • Login to Exchange Online admin portal
  • On the left menu bar, select the menu recipients
  • On the left menu bar, select the menu groups
  • Click on the plus icon
  • Select the menu – Distribution group

Create a new distribution group that represent the WordPress support -01

Add the required details for the new distribution group. In our example, we will name the new distribution group – Support, and the E-mail address that will be assigned is – support@o365info.com

Create a new distribution group that represent the WordPress support -02

Technically, we don’t have to add members the distribution group. In our example, we will add some members to the distribution group.

  • Click on the plus icon

Create a new distribution group that represent the WordPress support -03

Select the required members

  • Click – add ->
  • Click OK

Create a new distribution group that represent the WordPress support -04

  • Click Save

Create a new distribution group that represent the WordPress support -05

In the following section, we assign the required Send As permissions to Angelina

  • Select the required group, in our example – the support group

Create a new distribution group that represent the WordPress support -06

  • On the left menu bar, select the menu – group delegation
  • Click on the plus icon

Create a new distribution group that represent the WordPress support -07

  • Select the required recipient that will have the Send As permissions. In our example the user is Angelina
  • Click – add ->
  • Click OK

Create a new distribution group that represent the WordPress support -08

  • Click Save

Create a new distribution group that represent the WordPress support -09

Step 3#3 -Send test E-mail uses “other user credentials” with Send As permissions

In the following section, we will test our ability to send E-mail to destination recipient using the E-mail address that represents the WordPress site – support@o365info.com

The credentials that we use are the credentials of Office 365 recipient – Angelina

Send E-mail using other recipient credentials after providing send as permissions -01

An additional configuration that it’s recommended to check is the Message tab

Verify that the E-mail address in the section “From address” is the E-mail address that represents the WordPress site (in our example, support@o365info.com)

Send E-mail using other recipient credentials after providing send as permissions -02

To test mail flow that is sent by the WordPress site, Select the settings of the Post SMTP plugin

In this step, we will try to send E-mail to the destination recipient.

  • In the Postman SMTP setup page, select the menu – Send a Test Email

Send E-mail using other recipient credentials after providing send as permissions -03

In our example, we send E-mail to Bob

  • Click Next

Send E-mail using other recipient credentials after providing send as permissions -04

In the following screenshot, we can see that the E-mail was successfully sent to the destination recipient!

Send E-mail using other recipient credentials after providing send as permissions -05

In case that we look in Bob’s mailbox, we

Send E-mail using other recipient credentials after providing send as permissions -06

Configure your WordPress site to send E-mail via Office 365 or SMTP mail server| Article series index

Now it’s Your Turn!
It is important for us to know your opinion on this article

Summary
Configure WordPress site send E-mail via Exchange Online (Office 365) | Provide user credentials without purchase Office 365 license | Part 5#6
Article Name
Configure WordPress site send E-mail via Exchange Online (Office 365) | Provide user credentials without purchase Office 365 license | Part 5#6
Description
In the current article, we continue to review the scenario in which we want to configure our WordPress site to address Exchange Online server, and implement the best-practice scenario, in which we implement an authenticated mail session (providing Office 365 user credentials).
Author
Publisher Name
o365info.com
Publisher Logo
Print Friendly

Related Post

Please rate this

Eyal Doron on EmailEyal Doron on FacebookEyal Doron on GoogleEyal Doron on LinkedinEyal Doron on PinterestEyal Doron on RssEyal Doron on TwitterEyal Doron on WordpressEyal Doron on Youtube
Eyal Doron
Share your knowledge.
It’s a way to achieve immortality.
Dalai Lama

Leave a Reply

Your email address will not be published. Required fields are marked *