Hello John,
I’ll first address O365 email accounts, as those are what we see the most issues with, due to all the setup on the O365 / Exchange Online side of things…
1. First, along with ‘modern’ authentication that O365/ Exchange Online uses by default, Dynamics GP also requires that ‘basic’ or ‘legacy’ authentication be enabled as well, otherwise email will not work.
2. If you have multi-factor authentication (MFA) enabled on the O365 email accounts, you must use app passwords in Dynamics GP to get around this, or disable MFA on the user's Exchange email address.
I’d recommend going through the following blog if you haven’t already done so:
‘Exchange Online O365 Emailing inside Dynamics GP’
community.dynamics.com/.../exchange-online-o365-emailing-inside-dynamics-gp
>>When prompted with the Exchange Log On window, make sure the users are clicking the ‘Advanced Option’ link in lower LH corner and enter the O365 email address for both the ‘Email Address’ and ‘Login ID’ fields. (NOTE: I’ve also seen it work with leaving the ‘Login ID’ field blank/empty as well).
>> In the SY04920 system table for Dynamics GP, make sure there is a record for the user’s GP USERID, an Exchange_Address showing the user’s email address they’re entering in the Exchange Log On window and the Exchange_Server_URL value will show something like the following: ‘outlook.office365.com/.../Exchange.asmx’.
If you take the Exchange_Server_URL value and put it in a browser window, after entering credentials again, it should open up a ‘Service’ page with a WSDL link on it and more.
I have seen a couple of cases where we’ve manually entered a record into this SY04920 table for the user’s GP login, email address and this URL, and they could then email through Dynamics GP successfully, after finding a record doesn’t already exist for the user.
INSERT SY04920
Values (‘GPUser1’, ‘MyEmailAddress@msn.com’, ‘outlook.office365.com/.../Exchange.asmx’)
After entering a record for the user into the SY04920 table, have the user log out and back into Dynamics GP and they can try emailing again.
I'd start with the above and see if that resolves the 'login failed' message being seen for some users in Dynamics GP when attempting to email via Exchange, while other users can email successfully.
You may also want to compare the configuration of the O365 email accounts for the users that can email successfully through Dynamics GP compared to the O365 email accounts that cannot. Most cases we see it's more of an issue of none of the O365 accounts can email through Dynamics GP.
Thanks,