Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I need to send email from my ASP.NET application. For that I am using the following command from the command prompt to connect to the specific port on tk2smtp:

telnet tk2smtp.msn.com 22

But it's showing the following error on the command prompt:

Could not open connection to the host

I installed a telnet client in my machine. Let me know if there are any other things to be configured for this.

share|improve this question
    
Not a direct answer to your question, but: why not use some SMTP library? And why not use the SMTP server of your own provider, rather than the MSN server? Like maybe even telnet localhost 25 on the web server? –  Arjan Jun 12 '10 at 11:22
add comment

1 Answer

It's very common to block (unauthorised) access to SMTP servers to prevent spam relay. If telnet tk2smtp.msn.com 25 could not open a connection, then there's nothing you can do your end.

Some servers use a different port and/or encryption, like the "message submission port" 587. Or like 465 for secure SMTP, but then you would need some library rather than plain telnet.

Where did you get the details from?

share|improve this answer
1  
To be more precise: any SMTP server must accept unencrypted, anonymous connections for delivery of messages to its own users, hence: for messages to be sent to the users of its own domain. But: once connected, it might indeed disconnect if you're trying to send messages to users on another domain. So, it's more likely that the port is blocked by some firewall or by the internet or hosting provider (if that tk2smtp.msn.com server is correct). –  Arjan Jun 12 '10 at 11:34
    
Thanks for sprucing up the post;) –  Andy Jun 12 '10 at 12:02
    
Thanks for teaching me a new English word today. ;-) –  Arjan Jun 12 '10 at 13:32
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.