Mark Wagner's .NET C# Cogitation

.NET Architect and Developer - Simple Thoughts from a Simple Mind

  Home :: Contact :: Syndication  :: Login
  90 Posts :: 59 Articles :: 1548 Comments :: 209 Trackbacks

News

You can download this .TEXT blog skin free. Download Cogitation Blue skin.
Updated May 6, 2004

My Sites
- New SharePoint Blog
- My Developer blog
- My Personal blog
ASP.NET Web Hosting
I host my site here. The best value for quality hosting. Read my opinion here. If you decide to join, please use this link. Thank you very much.


Legal
Any and all code, software, examples, suggestions and anything else on this web site is available for you to use at your own risk. No warranty is express or implied.
Views and Opinions
Mark Wagner works for Microsoft in the Consulting Services division and covers the West Region. The views and opinions expressed on this web site are not necessarily the views or opinions of his employer.

Article Categories

Archives

Post Categories

.: Architecture Links :.

.: Developer Links :.

.Text and RSS Links

Blog Roll - Top Guns

Developer: .NET Security

Developer: C# Team

Developer: Flash

Developer: JavaScript

Developer: Pocket PC

Personal: Aviation

Personal: Favorites

How to send SMTP email using Telnet

This is an old method of sending email using Telnet.  I've posted it here mostly for a remider to me on exactly how to do this, but thought I would share it with others who may not know of this.  This can be useful when testing if a server can successfully send email.  For example, I use this to confirm if a SharePoint server can successfully send emails for alerts and notifications.

The items in bold are what you should type.

Start a Telnet session from a command line by entering:
Telnet your.mailserver.com 25

220 a.mail.server.com Microsoft ESMTP MAIL Service, Version: 6.0.3790.2499 ready at  Thu, 29 Jun 2006 15:59:02 -0600
helo

250 a.mail.server.com Hello [192.168.125.237]
mail from: fromemail@server.com

250 2.1.0 email@server.com...Sender OK
rcpt to: joe@server.com

250 2.1.5 joe@server.com
data

354 Start mail input; end with .
This is a test.
.  (enter a dot/period to end the data)

250 2.6.0 Queued mail for delivery

quit
Connection to host lost.

posted on Thursday, July 06, 2006 11:08 AM

Feedback

# re: How to send SMTP email using Telnet 9/9/2006 9:09 AM secret
I tried this, and everything worked, but it didnt send the mail.

# re: How to send SMTP email using Telnet 10/4/2006 3:38 AM vivek
thanks but -> mail from: fromemail@server.com is giving syntax error in my system could u help me plz.

# re: How to send SMTP email using Telnet 11/6/2006 2:34 AM mohan
How to send SMTP email

# re: How to send SMTP email using Telnet 11/8/2006 3:35 PM Gary
Can you send to multiple addresses ?

# re: How to send SMTP email using Telnet 11/17/2006 7:43 PM hayesha
Thank for the resource, it was very helpful and it worked fine after several attempts

# re: How to send SMTP email using Telnet 2/16/2007 6:40 AM Smiley <firework123@googlemail.com>
Thanks for sharing. It is very helpful as I never send anything from telnet before and work

# re: How to send SMTP email using Telnet 4/2/2007 7:45 PM roberson
i'v did that and the server answer:
530 authentication needed
how can i authenticate???


# re: How to send SMTP email using Telnet 4/2/2007 7:45 PM roberson
i'v did that and the server answer:
530 authentication needed
how can i authenticate???


# re: How to send SMTP email using Telnet 4/3/2007 11:22 AM james
Just make sure you don't put any spaces between mail from:emailAddy@place.something
a space between colon and address will give you a bad command error.

# re: How to send SMTP email using Telnet 4/30/2007 1:50 AM Saagar
Hey ive Tried this Stuff before ..but i was unable to send MAIL FROM email id...

# gazeteler 6/17/2007 2:44 AM gazeteler , gazete , gazete oku
thanks baby

# i cannot send mail from my local domain server 7/22/2007 4:15 AM ksreedhar
hi,
i have tried with telnet everything looks fine and even my pop3 server is also looks fine
But we download mails to OUTLOOK 2003 it is downloading mails
can any one help me please

# re: How to send SMTP email using Telnet 8/8/2007 2:08 AM Rimi
Hi
thanks for the great stuff. I face a problem, however.
after the connection is established, i print helo and it says it requires a domain addressing, morover, after the command rcpt to is sent, there's a response.......................recipient OK. doesn't prompt me to start mail
please find time to answer this soon
Rimi

Post Feedback

Title:
Name:
Url:
Comments: 
Enter the code you see: