Sending e-mail from cmd line

Forum regarding Windows Software and Home Automation Domotica.

Sending e-mail from cmd line

Postby Edwin2008 » Sat May 16, 2009 9:59 am

This is a nice tool to send notifications http://caspian.dotconf.net/menu/Software/SendEmail/
Edwin2008
Advanced Member
Advanced Member
 
Posts: 714
Joined: November 2008
Location: Netherlands

Sending e-mail from cmd line

Postby MindBender » Sat May 16, 2009 10:34 am

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_Mail_Transfer_Protocol) for details.
MindBender
Advanced Member
Advanced Member
 
Posts: 639
Joined: April 2006
Location: Netherlands

Sending e-mail from cmd line

Postby Jfn » Sat May 16, 2009 11:09 am

Or use BLAT (http://www.blat.net/ when you are on Windows.
Jfn
Member
Member
 
Posts: 332
Joined: February 2008
Location: Netherlands

Sending e-mail from cmd line

Postby Edwin2008 » Sat May 16, 2009 3:30 pm

@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
Edwin2008
Advanced Member
Advanced Member
 
Posts: 714
Joined: November 2008
Location: Netherlands


Return to Windows Forum

Who is online

Users browsing this forum: No registered users and 1 guest

cron