muquit / mailsend

A program to send mail via SMTP from command line
Other
294 stars 68 forks source link

= Announcement (Feb-11-2019)

If you use mailsend, please try https://github.com/muquit/mailsend-go[mailsend-go]. Your feedback will be appreciated.

mailsend will still be maintained (critical security fixes) but no new features will be added.

Thanks!

= mailsend v1.19 :experimental: :toc: :toc-placement: preamble

mailsend is a simple command line program to send mail via http://www.ietf.org/rfc/rfc0821.txt?number=821[SMTP] protocol. Long time ago, I needed to send a piece of alert mail from a program in a networked Windows machine, but could not find a simple program like this installed. So I wrote one. You might find it useful as well. The program does not use any config file and I plan to keep it that way. From version 1.17b1+, IPv6 is supported in all platforms. Suggestions, bug reports are always welcome. If you have any question, request or suggestion, please enter it in the https://github.com/muquit/mailsend/issues/[Issues] with appropriate label.

[[download-sourcebinary]] == Download source/binary

To download source/binaries, please go to the https://github.com/muquit/mailsend/releases/[releases] page.

Bug fixes and stable features are merged from dev branch to master branch every now and then. Clone the repo if you want the latest code.

[[supported-platforms]] == Supported Platforms

It should compile on any POSIX compliant system. Works on 64 bit systems.

== Features Few main features:

[[versions]] == Versions === Latest stable version is 1.19

Released on May-17-2016. Please look at: link:ChangeLog.mediawiki[ChangeLog].

== Synopsis


Version: @(#) mailsend v1.19

Copyright: BSD. It is illegal to use this software for Spamming

(Compiled with OpenSSL version: OpenSSL 1.0.2f 28 Jan 2016) usage: mailsend [options] Where the options are: -copyright - show copyright information -4 - Force to use IPv4 address of SMTP server -6 - Force to use IPv6 address of SMTP server -smtp hostname/IP - Hostname/IP address of the SMTP server -port SMTP port - SMTP port -domain domain - domain name for SMTP HELO/EHLO -t to,to.. - email address/es of the recipient/s -cc cc,cc.. - carbon copy address/es +cc - do not ask for Carbon Copy -ct seconds - Connect timeout. Default is 5 seconds -read-timeout seconds - Read timeout. Default is 5 seconds -bc bcc,bcc.. - blind carbon copy address/es +bc - do not ask for Blind carbon copy +D - do not add Date header -f address* - email address of the sender -sub subject - subject -list_address file - a file containing a list of email addresses -log file - write log messages to this file -cs character set - for text/plain attachments (default is us-ascii) -separator character - separator used with -attach. Default is comma (,) If used must be specified before -attach -enc-type type - encoding type. base64, 8bit, 7bit etc. Default is base64. Special type is "none" -aname name - name of the attachment. Default is filename -content-id id - content-id in the attachment -mime-type type - MIME type -dispostion val - "attachment" or "inline". Default is "attachment" -attach file,mime_type,[i/a] (i=inline,a=attachment)

The options with asterisk must be specified. Environment variable SMTP_USER_PASS can be used to set the SMTP authentication password instead of the option +-pass+

[[how-to-compileinstall]] == How to compile/install

[[linuxunixmac-os-x]] === Linux/Unix/Mac OS X

Specify the path of OpenSSL with +--with-openssl+. In most Linux systems, it is installed in +/usr+. If OpenSSL is installed in non-standard places, type +./configure --help+ for options.


$ /bin/sh ./configure --with-openssl=/usr

Default installation location is +/usr/local+. If you want to change that:


$ /bin/sh ./configure --with-openssl=/usr --prefix=/usr/local/mailsend $ make clean $ make

make install

Or $ sudo make install Or $ make install DESTDIR=/foo

The name of the binary will be mailsend. If compiled with OpenSSL, the support for STARTTLS and SMTP over SSL will be available.

[[linux-debian-package]] === Linux Debian package

Starting from mailsend v1.18, Debian package is no longer supplied. If you want to build the Debian package yourself, after compiling mailsend, type:


$ ruby scripts/mk_debian_package.rb

To install the package, type:

[source,java]

$ sudo dpkg -i mailsend_1.19-ubuntu_i386.deb

To uninstall, type:

[source,java]

$ sudo dpkg -r mailsend

[[microsoft-windows]] === Microsoft Windows

A compiled binary with SMTP authentication support for MS Windows is already supplied. However, if you need to modify something or want to compile it yourself, you will need freely available Visual Studio from Microsoft. For Visual Studio 2015 community edition, start Developer Command Prompt for VS2015.

OpenSSL is required, if you need to compile with SMTP authentication support. Look at +INSTALL.32+ that comes with OpenSSL on how to compile and install OpenSSL. mailsend's +Makefile.nmake+ expects it to be installed at +c:\openssl+

To compile mailsend, open a command shell and type:


c:> nmake -f Makefile.nmake clean c:> nmake -f Makefile.nmake

It compiles cleanly with cygwin as well. The name of the binary will be +mailsend.exe+

[[known-issues]] == Known Issues

[[faq]] == FAQ

Please look at link:doc/mailsend-FAQ.mediawiki[mailsend FAQ]

[[examples]] == Examples

Please type: +mailsend -example+ or look at link:doc/examples.mediawiki[examples]

[[license]] == License

BSD

To display license, please type: mailsend -copyright


Copyright (C) 2001-2019 Muhammad Muquit (http://www.muquit.com/)

o Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

o Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

o Neither the name of the author MUHAMMAD MUQUIT (http://www.muquit.com/) nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

''' This document is created with https://github.com/asciidocfx/AsciidocFX[AsciidocFX]