Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

closed as off-topic by Ben N, Excellll, random Mar 31 at 4:00

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions seeking product, service, or learning material recommendations are off-topic because they become outdated quickly and attract opinion-based answers. Instead, describe your situation and the specific problem you're trying to solve. Share your research. Here are a few suggestions on how to properly ask this type of question." – Ben N, Excellll, random
If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 8 down vote accepted

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

share|improve this answer
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.… and can sort comments by newest or 'best'. – barlop Dec 7 '14 at 6:29

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.

share|improve this answer

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
Opening connection to mars [] on port 25
220 mars ESMTP Postfix (Release-20010228)
250 Ok: queued as 04168186A7
share|improve this answer
I came across this one, but noticed it hasn't been maintained. Any personal experience using it? – DHayes Oct 30 '09 at 14:11
I was use this very long back for some batch processing work – joe Oct 30 '09 at 15:14

I use 'blat' for command line email from Windows. And it can send attachments too.

share|improve this answer

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 = “”
$EmailTo = “theRecipient'”
$Subject = “your subject”
$Body = “some text”
$SMTPServer = “”
$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.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged .