Avatar of Indar
Flag for India asked on

how to check connectivity from CRM system to office365 email

Dear Experts
We are having issue on CRM system not able to send mails through the configured SMTP server but the network team says the issue is from CRM application side however to come to the correct conclusion,
Used Telnet to test SMTP
1.On the CRM hosted Windows OS system did the telnet check with smtp host and port , it connects also performed following steps I,e setting smtp server , source domain, senders email and recipient email, message subject and body we are able to send and receive email
Please let me know the above steps does it passes through SMTP authentication OR not
2. configured email account in the CRM system with SMTP mail server.port: (SMTP server is smtp.office365.com)
check marked "use SMTP Authentication". provided user name and password  the result  is not able to send mail following popup from the CRM system
"Error Failed to connect to outbound SMTP Mail Server. The outbound mail server selected for the mail account you are using is invalid check the settings OR select different mail server" BUT when unchecked the "Use SMTP Authentication" that is disabled the SMTP Authentication then able to send mail out..
As mentioned above SL1 when able to send and receive email from telnet does it passed though the authentication , please help.
Hardware FirewallsMicrosoft 365Email ServersWindows OSWindows Networking

Avatar of undefined
Last Comment

8/22/2022 - Mon

What are the mail settings you are using?

thanks for the reply,
smtp server name: <theircompany>-mail.protection.outlook.com
smtp port 25
Through teltnet result=Pass
able to send test mail.
please find the attached for your reference.

Two questions:
1) with or without authentication?
2) why using an insecure port?
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes

thanks for the reply, we have informed not to use insecure port instead user TLS with port 587 for SMTP. we have been asked by them to check on following approach

1. user office 365 smtp with port 587
 we are able to telnet from the windows server for smtp.office365.com with port 587, but when we execute FROM: <email account> then press enter ,  the telnet shows an following message
530 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL
 FROM [SG2PR06CA0126.apcprd06.prod.outlook.com]

2. user the same email account of above SL1 with following
smtp server name: <theirdomain>-mail.protection.outlook.com
smtp port 25
with this able to connect through telnet with port 25 and also able to send and receive email through telnet commands, attached report.

can you please help me on following

1. would like to communicate with them 1) with respect to above SL 1 though we are able to connect to the office 365 smtp server with the port 587 but the provided email account is not getting authenticating hence it is failing to connect.
Please correct me if Iam wrong.

2. but with SL2 above through the telnet we are able to send and receive the mail, through the scheduler automation from the CRM system it is not working, would like to understand is it email server side.
please help me .

View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.

I am coming with more details,
1. the one which i have mentioned <theirdomain>-mail.protection.outlook.com smtp port 25 using the email account test@<theirdomain.com> with password works from windows telnet as well from the crm system , this is their local email relay to the office 365.
2. when tried with the same email account (as above) through telnet and connect directly to Office 365 SMTP endpoint i,e smtp.office365.com
with Port 587 it connects and then after when we execute FROM: <email account>  the above email account then press enter ,  the telnet shows an following message
530 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL
3. configured the same email account in the email client software used direct office 365 email settings as following, able to send and receive mails.
Account Type: IMAP
incoming mail server: outlook.office365.com
outgoing mail server (SMTP): smtp.office365.com
Outgoing Server (SMTP) requires authentication- YES
Incoming Server (IMAP) over SSL: 993
Outgoing server SMTP over TLS: 587

where the things are going wrong not able to trace, please suggest.

So I am looking at #2 from your last post.

You never tried configuring it into the CRM, did you?

I believe the reasons you had the failure with telnet is the fact that telnet is insecure. Since there is no secure transmission of any data, the server is actually rejecting your attempt to authenticate when trying to send.

Try it in the CRM directly and let us know what happens.
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.

tried directly from the CRM application but no luck as we are getting log , the same is attached for your reference please. from the same system through telnet able to connect to the smtp.office365.com on 587 but the CRM log shows as per the attached.

sorry missed to attach in the previous post please find the same.

would like to inform the emails started getting delivered from the workflows of CRM system when the internet access is enabled to the CRM system I mean when http/https allowed to this system, now the network team is asking why does it need http and https to be opened for this system when smtp.office365.com allowed on port 587, please help me understand other than allowing access to smtp.office365.com and open port 587 for this system  what other access to be allowed ( inbound and outbound) so that we can communicate to network team to allow it accordingly.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy