Quantcast
Channel: Exchange Server Development forum
Viewing all articles
Browse latest Browse all 7132

Cannot connect to office 365 Smtp Server using c# code

$
0
0

Hello

I'm trying to send an e mail using c# code and the SmtpClient class but I get this error: " 'The remote name could not be resolved: '​smtp.office365.com​''.

I have looked up the Smtp settings on my online Outlook and have used the same settings as a test in the desktop version of Outlook.

I'm pretty sure I'm using the SmtpClient class correctly and have set:

- Server = smtp.office365.com

- Port = 587

- EnableSsl = true

-The To and From e mail address is a valid user in Office 365

Why does my desktop Outlook connect to the Smtp server but the c# code cannot?

Thanks


Viewing all articles
Browse latest Browse all 7132

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>