Sometimes we would like to send emails using different sender email addresses, but standard DYN365FO supports just one set of SMTP settings in Email parameters. You can still provide any sender email address you want per template in Organization email templates, but sending such an email usually fails.
Similar requirement for multiple sender email addresses we often have when emailing reports from DYN365FO. Learn how to enable it >>
There are some workarounds for this problem. The solutions below are demonstrated for Office 365 Exchange Online, but similar functionality is supported by other mail servers as well.
You can add an alias to the user account used in SMTP settings in Email parameters. For the example above we will add alias firstname.lastname@example.org to the account with the email address email@example.com.
Now you can send an email with Sender email firstname.lastname@example.org (which is alias of email@example.com) and arbitrary Sender name. Unfortunately, for local recipients (i.e. users from the domain) Exchange is so “smart” that it automatically replaces the sender with the user from SMTP settings. Actually the email header (technically) contains the alias email address (and sender name of the SMTP user), but Outlook does not show it.
When sending the email outside the domain, it works as expected:
New impersonated user
You can also create a new dedicated user account on Office 365 Admin portal and assign it an Office 365 license. Then open Exchange admin center and allow the user from SMTP settings in Email parameters (e.g. firstname.lastname@example.org) to send emails in the name of the new user (e.g. email@example.com).
This approach will allow you to send emails from DYN365FO using the email address of the new user. It works for both local and non-local recipients. Sender name from an email template will be ignored and replaced by the name of the new user in Office 365.
The new user has its own password and mailbox, so it can also receive emails or setup mail forwarding.
The main drawback of this solution is that a new user requires a license. That can be a problem, if you want to use many different sender addresses.
The first solution with aliases does not work for local users, which might be annoying. The second solution with impersonated users requires additional Office 365 licenses. We have found an alternative that does not spend any licenses but still works for local users. The solution and terminology applies to Exchange Online, but similar approach might be applicable to other mail servers as well.
In Exchange admin center you can create a Resource and allow the user from SMTP settings in Email parameters to send emails in the name of this resource (delegate Send As privilege). The resource can also be seen on Office 365 Admin portal as a non-licensed user. It still has a mailbox and can receive emails, but it might be tricky to see them or set up mail forwarding.
The resources functionality is however intended for physical resources, but can also be used when sending emails from DYN365FO.
It works for sending emails to local and non-local address – the received email is showed correctly!
In the next post we will discuss how you can use Docentric AX Free Edition to send emails from different email addresses with no need to change the configuration of your Exchange. This also applies to emailing reports in DYN365FO.