Telnet to Login with Username and Password to Mail Server

send email C# using smtp server with username password authentification

I don't think you want to set

mailclient.UseDefaultCredentials = true;

Read more about this option here.


You should also test that you can actually send email through that smtp server.

Try connecting via telnet and authorizing. There are also plenty of services that will let you send a test message online (http://pingability.com/smtptest.jsp for example).

How to send a test email over SMTP with Mailgun using telnet?

For europe, the SMTP address is smtp.eu.mailgun.org.

Telnet to google mail server

It connects for me too. I think the most likely reason is that your ISP is blocking your external access to port 25. This is a common and sensible thing to do because SMTP from end-user PCs is a significant source of spam.

You may be able to talk your provider into opening the port up for you, or you can use a proxy server out on the 'net, or you can use a different service, such as SSMTP (?) which connects over a secure channel using a different port.



Related Topics



Leave a reply



Submit