Possible Duplicate:
Windows command line emailer

I am looking for a program that can send an email from the command line, or more specifically from a script. Searching through superuser I've found a lot of Linux solutions but I'd like something which can run in Windows (XP or 2003). I have come across a program called "blat." Has anyone had any positive results with this program? Negative? Or could you offer other suggestions?

link|improve this question
Lots of options here. Much appreciated DHayes. – Wagnarock Nov 5 '09 at 20:23
feedback

closed as exact duplicate by Diago Nov 6 '09 at 5:40

This question covers exactly the same ground as earlier questions on this topic; its answers may be merged with another identical question. See the FAQ for guidance on how to improve it.

3 Answers

up vote 5 down vote accepted

I've never used blat, but I have used bmail. It's very simple, small (17kb) and can easily be used in batch scripts.

C:\>bmail /?

    Command Line SMTP Emailer V1.07
    Copyright(C) 2002-2004 Craig.Peacock@beyondlogic.org
    Usage: bmail [options]
            -s    SMTP Server Name
            -p    SMTP Port Number (optional, defaults to 25)
            -t    To: Address
            -f    From: Address
            -b    Text Body of Message (optional)
            -h    Generate Headers
            -a    Subject (optional)
            -m    Filename (optional) Use file as Body of Message
            -c    Prefix above file with CR/LF to separate body from header
            -d    Debug (Show all mail server communications)

bmail is freeware.

link|improve this answer
This looks like it would work. Thanks John – Wagnarock Nov 5 '09 at 20:18
you're very welcome! :) – John T Nov 5 '09 at 20:20
Just implemented this and it works perfectly. – Wagnarock Nov 5 '09 at 21:08
feedback

powershell 2.0 has a send-mail cmdlet built in.

link|improve this answer
I didn't realize that. I'll definitely have to look at that. Thank you James – Wagnarock Nov 5 '09 at 20:19
feedback

If you're already using Cygwin, or have been considering it anyway, you can use the 'email' package to send e-mail from the Cygwin command-line (or bash script therein).

This three-part Intro-to-Cygwin tutorial includes a quick-start that happens to demonstrate sending email from the Cygwin command-line. Pt1 Pt2 Pt3

And, if it happens to pique your interest, I found that tutorial via this one on setting up an SSH server at home via Cygwin.

link|improve this answer
This certainly has piqued my interest. It may meet another of my needs for a syslog server in Windows. What a bonus. Thanks indeed JMD. – Wagnarock Nov 5 '09 at 21:04
feedback

Not the answer you're looking for? Browse other questions tagged or ask your own question.