Windows command line emailer

6

3

I have a Win2k3 box that I need a command line mailer to automate the sending of a log file. While I did some searching and came across a variety of tools that might work, I was just hoping for specific recommendations for such a tool. Free and maintained is ideal, but will consider anything that works well and bug free. Any suggestions?

DHayes

Posted 2009-10-30T13:55:34.890

Reputation: 2 103

Question was closed 2016-03-31T04:00:00.527

Answers

8

SendEmail is a lightweight, command line SMTP email client. If you have the need to send email from a command line, this free program is perfect: simple to use and feature rich. It was designed to be used in bash scripts, batch files, Perl programs and web sites, but is quite adaptable and will likely meet your requirements

alt text

joe

Posted 2009-10-30T13:55:34.890

Reputation: 11 615

it's a fantastic program though if he wants TLS, the TLS stuff hasn't been done well, some find it gives an error, and i'm not sure a windows emailer program that has TLS done well. https://disqus.com/home/discussion/dotconf/software_sendemail_send_email_with_this_free_command_line_email_client/ and http://caspian.dotconf.net/menu/Software/SendEmail/#comments can sort comments by newest or 'best'.

– barlop – 2014-12-07T06:29:34.887

3

msmtp is a really good command line SMTP client. I've been using it for quite a long time. For more information, read the manual.

Botond Balázs

Posted 2009-10-30T13:55:34.890

Reputation: 304

2

Bmail is a free but lean command line SMTP mail sender.

C:\>bmail -s mars -t cpeacock@max -f root@neptune -h -a "Data Download Script
is not Working Correctly" -b "The script on neptune has stopped getting data"

Command Line SMTP Emailer V1.07
Copyright(C) 2002-2004 Craig.Peacock@beyondlogic.org
Opening connection to mars [192.168.0.10] on port 25
220 mars ESMTP Postfix (Release-20010228)
250 Ok: queued as 04168186A7

joe

Posted 2009-10-30T13:55:34.890

Reputation: 11 615

I came across this one, but noticed it hasn't been maintained. Any personal experience using it? – DHayes – 2009-10-30T14:11:03.150

I was use this very long back for some batch processing work – joe – 2009-10-30T15:14:42.217

2

I use 'blat' for command line email from Windows. And it can send attachments too. http://www.blat.net

simplr

Posted 2009-10-30T13:55:34.890

Reputation: 236

2

HowToGeek demonstrates a Windows PowerShell script that works very well at How To Send Email From the Command Line in Windows Without Extra Software

Here is the method: First you're defining the variables:

$EmailFrom = “yourMail@gmail.com”
$EmailTo = “theRecipient'sAddress@someServer.com”
$Subject = “your subject”
$Body = “some text”
$SMTPServer = “smtp.gmail.com”
$SMTPClient = New-Object Net.Mail.SmtpClient($SmtpServer, 587)
$SMTPClient.EnableSsl = $true
$SMTPClient.Credentials = New-Object System.Net.NetworkCredential(“yourGmailUsername”, “password”);

Then, you're using this command to send the mail:

$SMTPClient.Send($EmailFrom, $EmailTo, $Subject, $Body)

You'll need a valid Gmail account in order to authenticate as a Gmail user.

Oz Edri

Posted 2009-10-30T13:55:34.890

Reputation: 259