How to set up office 365 as a SMTP gateway

Hi,

I have a cloud based service that occasionally needs to send email to users. I am hoping to use my office 365 mail service as the SMTP server to do this.

Do I need to create a licensed mailbox user to do this? I don't ever want to receive  email to this address just use it for sending email.

Also ideally this accounts password would be set to never expire as I don't want to have to update my applications when the password has expired.

Are there other ways in Office 365 of limiting who/what can send emails through this account (for example limiting it to only certain ip address ranges etc..)

Thanks

Hi Eoin,

From your description, my understanding is that you want to use Office 365 SMTP Client Submission (How to configure Office 365 SMTP Client Submission). If anything is misunderstood, please correct it with more details so that we can better help you.

If it is the case,
1. It is needed to create a licensed mailbox for authentication.
2. We can set the mailbox’s password to never expire via the following 2 aspects.
a. In the Office 365 Admin Portal> Settings> Security & privacy> Password policy> Edit> turn on “Set user password to never expire”> Save.
b. If you can’t see the button, it might be related to your Office 365 Subscription. Never mind, you can try using Windows PowerShell (via an admin credential) to run the cmdlet Set-msoluser –UserPrincipalName <UserPrincipalName> -PasswordNeverExpires $True
Note: <UserPrincipalName> stands for the user mailbox’s email address
3. As the Office 365 SMTP Client Submission is authenticated with the Office 365 mailbox (domain), which abides by the domain’s DNS settings (restricting a certain IP address ranges to send the emails), it is not feasible to only restrict only this user mailbox sending from the certain IP address ranges but un-influence other user mailboxes.

Regards,
Alan

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Thanks Alan,

Looking at the link your provided I am now not sure if I should use SMTP relay instead of SMTP client submission. What are the prime reasons for choosing SMTP client submission over SMTP relay

Thanks

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Hi Eoin,

Thanks for the update. Here is the basic descriptions and configuration requirements about both the method follows.

SMTP client submission:

• If your device or application can authenticate and send email using an Office 365 mailbox account, this is the recommended method.

• In this scenario, the device or application uses an email account to send email to recipients just like an email client.
• If you want to send email from a third-party hosted application or service, you must use SMTP client submission.
• If your device or application supports or requires user name and password authentication, consider the SMTP client submission method instead of SMTP relay.

SMTP relay:

• This method allows Office 365 to relay emails on your behalf by authenticating using your public IP address (or a certificate). This requires a connector to be set up for your Office 365 account. (Might be the complexity of configuring a connector, SMTP client submission is the easiest over Office 365 SMTP relay).
• However, in this method your device or application can send email using any address (including ones that can't receive mail), as long as the address uses one of your Office 365 domains. The email address doesn’t need to be associated with an actual mailbox.

Moreover, you may check the summary of table inside the article it will help you decide which one of these method options will meet your business needs.

If anything is unclear, please feel free to let us know and we will be glad to provide further assistance.

Best regards,
Shyamal

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Hi Eoin,

From your description "Office 365 SMTP server", I guessed you are going to  use "Office SMTP Client Submission" but not to recommend it. Good to hear you have fougured our to use Office 365 SMTP relay.

If you meet any problem during the process, you are welcome to post back.

*Note: On June 17th, this community is migrating to Microsoft Community at http://answers.microsoft.com/. If you need further assistance, please post a new question to the Office 365 for business forum beginning June 18th Pacific Time. Thank you for your understanding.

Regards,

Alan

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated March 28, 2023 Views 4,435 Applies to: