SendEmail is a lightweight, completely command line-based SMTP email delivery program. If you have the need to send email from a command prompt this tool is perfect. It was designed to be used in bash scripts, Perl programs, and Web sites, but it is also quite useful in many other contexts. It is written in Perl, and is unique in that it requires no special modules, and supports any platform that runs Perl. It has a straightforward interface, making it very easy to use.
| Tags | Communications Email Utilities Email Clients (MUA) |
|---|---|
| Licenses | GPL |
| Operating Systems | Windows OS Independent POSIX BSD Linux |
| Implementation | Perl |
Recent releases


Changes: A new command line option to specify a local bind address. EHLO should never send "localhost" now. A small change to how the time zone is sent. The Windows executable now has TLS support enabled.


Changes: TLS support is now included. To enable it, simply install the Perl Net::SSleay and IO::Socket::SSL modules. The "-o message-header" option may now be used more than once, and may now be used to override automatically generated email headers. Authentication code now supports the SASL PLAIN mechanism. An annoying bug that made some MUAs believe there was always an attachment when there wasn't has been fixed. A new base64_encode() function fixes a bug that was causing certain usernames/passwords used with -xu and -xp to not work properly.


Changes: A bug that prevented 1.51 from working properly on Windows and Mac systems has been fixed. Null command line arguments are allowed again. Shell escape codes are printed for colored help on everything but Windows. The default MIME-encoding header has been changed to "application/octet-stream" rather than "base64" when it can't guess any other content-type to use. A -o message-charset option has been added to specify the message body's character set.


Changes: A few alarm() calls causing issues on Win32 systems were fixed. An -o message-format=raw option was added to allow sending of raw pre-built email messages. A new method of detecting the hostname was added.


Changes: This release fixes several bugs and introduces many new features. Email addresses may now be specified with full names. SMTP Auth is supported. Multi-line messages can be created from the command line. When one of many recipients is rejected, the email is still sent. Custom email headers can be used. The default timeout can be overridden. The message body can be read from a file. A Reply-To address can be specified.
- All comments
Recent commentsRe: Superfluous software
> % This whole program could easily be
> % replaced by a lightweight bash
> function
> % utilizing netcat.
>
>
>
> No need for netcat with bash 2:
>
> #!/bin/bash
> function smtp_send() {
> {
> echo "HELO $(hostname -f)"
> echo "MAIL FROM: me@mydomain.com"
> echo "RCPT TO: you@yourdomain.com"
> echo "DATA"
> echo "Message-ID:
> /dev/tcp/myserver/25
> }
Oh, nice, where are the other lines...
Re: Superfluous software
% This whole program could easily be
> replaced by a lightweight bash function
> utilizing netcat.
No need for netcat with bash 2:
#!/bin/bash
function smtp_send() {
{
echo "HELO $(hostname -f)"
echo "MAIL FROM: me@mydomain.com"
echo "RCPT TO: you@yourdomain.com"
echo "DATA"
echo "Message-ID: /dev/tcp/myserver/25
}
Re: Superfluous software
> ... without checking the
> SMTP server's return code....
I think this is fixed as of v1.33. Otherwise, I
find sendEmail easy (easyest) to install
and easy to use.
Re: Superfluous software
> This whole program could easily be
> replaced by a lightweight bash function
> utilizing netcat.
I'd be very interested in pointers to information on how do that. I'm trying to send mail notifications out of a chrooted cvs environment, and I'd prefer not to ptu a "full-featured" (blah) MTA or, for that matter, perl in my chroot.
Superfluous software
This is still just a perl script, so it's nowhere even near being "extremely lightweight".
As of version 1.20, it still has a major bug: After sending the email, it immediately returns with
a "sent ok" status, without checking the SMTP server's return code. That's what you get if you don't use the well tested, RFC compliant standard perl modules and reinvent the wheel instead.
This whole program could easily be replaced by a lightweight bash function utilizing netcat.