Page 1 of 1

Sending e-mail from cmd line

Posted: Sat May 16, 2009 10:59 am
by Edwin2008
This is a nice tool to send notifications http://caspian.dotconf.net/menu/Software/SendEmail/

Sending e-mail from cmd line

Posted: Sat May 16, 2009 11:34 am
by MindBender
Uhm, I'm sorry, but that program is a solution to no problem at all. Sending email from the command line can easily done by opening a telnet session to you SMTP server, using the telnet command, and sending SMTP commands:<ul><li>Type telnet server.com 25
(where "server.com" is the name of the smtp (outgoing) server of your email provider, such as smtp-server.austin.rr.com). This can be found by checking your account info in the program you normally use for email.</li><li>Type HELO server.com</li><li>Type MAIL FROM: you@server.com
You may get a message saying "250 ok"</li><li>Type RCPT TO: Friend1@anotherserver.com, friend_two@someotherserver.org, friend.3three@Someserver.com
Again, You may get a message saying "250 ok"</li><li>To write the message, type DATA, followed by your message.</li><li>To end the message, put a period on a new line by itself and press Enter.</li><li>Type QUIT to exit Telnet.</li></ul>See http://www.wikihow.com/Send-Email-Using-Telnet for an easy guide on emailing from the command line. Above is just a small example, there are much more options and command available, see the SMTP protocol (http://en.wikipedia.org/wiki/Simple_Mai ... r_Protocol) for details.

Sending e-mail from cmd line

Posted: Sat May 16, 2009 12:09 pm
by Jfn
Or use BLAT (http://www.blat.net/ when you are on Windows.

Sending e-mail from cmd line

Posted: Sat May 16, 2009 4:30 pm
by Edwin2008
@mindbender. I think that blat or sendemail provide an easier approach for sending an e-mail from a batch file or commandline
@jfn. didn't find blat. looks good