how to check connectivity from CRM system to office365 email

D_wathi
D_wathi used Ask the Experts™
on
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.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Distinguished Expert 2018

Commented:
What are the mail settings you are using?

Author

Commented:
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.
crmlog.txt
Distinguished Expert 2018

Commented:
Two questions:
1) with or without authentication?
2) why using an insecure port?
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Author

Commented:
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 .
telneton25.txt
Distinguished Expert 2018
Commented:
Do you have an actual email account with the password or not? If there is no password, then direct send is your only option. However, according to Microsoft, isn't designed for your scenario. Instead you should be using SMTP submission, which requires a real account and a password.

I recommend you read the comparison of options in this article from Microsoft.

Author

Commented:
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
Ports:
Incoming Server (IMAP) over SSL: 993
Outgoing server SMTP over TLS: 587

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

Commented:
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.

Author

Commented:
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.

Author

Commented:
sorry missed to attach in the previous post please find the same.
24crm-application-log.txt

Author

Commented:
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.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial