MAILSEND(1)
π NAME π
mailsend β okay bestie, this is the mailsend(1) page, and it is literally a command line program to send mail via SMTP protocol. π
π SYNOPSYS π
Yes, the heading says SYNOPSYS β we are keeping the original spelling, don't come for me π
. Here's the whole vibe:
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β fortext/plainattachments (default isus-ascii).-separator characterβ separator used with-attach. Default is comma(,). If used must be specified before-attach.-enc-type typeβ encoding type.base64,8bit,7bitetc. Default isbase64. 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)β attach this file as attachment or inline.-show-attachβ show attachment in verbose mode, default is no.-show-mime-typesβ show the compiled in MIME types.-M "one line msg"β attach this one line text message.-content-type typeβ Content type. Default:multipart/mixed.-msg-body pathβ Path of the file to include as body of mail.-embed-image imageβ Path of image to embed in HTML.-H "header"β Add custom Header.-name "Full Name"β add name in the From header.-vβ verbose mode.-Vβ show version info.-wβ wait for a CR after sending the mail.-rt email_addressβ add Reply-To header.-rrr email_addressβ request read receipts to this address.-rpβ return-path address.-sslβ SMTP over SSL.-starttlsβ use STARTTLS if the server supports it.-authβ tryCRAM-MD5,LOGIN,PLAINin that order.-auth-cram-md5β use AUTH CRAM-MD5 authentication.-auth-plainβ use AUTH PLAIN authentication.-auth-loginβ use AUTH LOGIN authentication.-user usernameβ username for ESMTP authentication.-pass passwordβ password for ESMTP authentication.-exampleβ show examples.-ehloβ force EHLO.-infoβ show SMTP server information.-helpβ shows this help.-qβ quiet.
The options with * must be specified β like, mandatory, bestie. No skipping. π
Environment variables:
SMTP_USER_PASSfor plain text password (-pass).
β¨ DESCRIPTION β¨
mailsend is a simple command line program to send mail via SMTP protocol for Windows, Linux/Unix. It's giving small-but-mighty terminal energy, honestly.
For deatils, please look at the web page: <http://muquit.com/muquit/software/mailsend/mailsend.html>.
π EXAMPLES π
Examples of mailsend Version: @(#) mailsend v1.17b15. Yes, the examples say v1.17b15 even though the main version is v1.19 β I'm just the messenger, don't yell at me π.
Show server info
mailsend -v -info -port 587 -smtp smtp.gmail.com
mailsend -v -info -ssl -port 465 -smtp smtp.gmail.com
STARTTLS + AUTHENTICATION
mailsend -to user@gmail.com -from user@gmail.com
-starttls -port 587 -auth
-smtp smtp.gmail.com
-sub test +cc +bc -v
-user you -pass "your_password"
Note: Password can be set by env var SMTP_USER_PASS instead of -pass.
SSL + AUTHENTICATION
mailsend -to user@gmail.com -from user@gmail.com
-ssl -port 465 -auth
-smtp smtp.gmail.com
-sub test +cc +bc -v
-user you -pass "your_password"
As -auth is specified, CRAM-MD5, LOGIN, PLAIN will be tried in that order. Use -auth-cram-md5, -auth-plan, -auth-login for specific auth mechanism.
Note: Password can be set by env var SMTP_USER_PASS instead of -pass.
One line messages
One line messages are specified with -M. Each message can have its own MIME type, character set and encoding type:
mailsend -f user@example.com -smtp 10.100.30.1
-t user@example.com -sub "testing oneline messages"
-cs "us-ascii"
-enc-type "7bit"
-M "This is a test"
-cs "iso-8859-1"
-enc-type "8bit"
-M "Das Vetter ist schA~Xn!"
-cs "Big5"
-enc-type "base64"
-M "aeXaeXXaeXXeXX"
Attachments
Only requirement of -attach is the path of the file. All other attributes can be specified before -attach with appropriate flags. Note: The flags must be specified correctly for each attachment, otherwise the one specified in previous attachment will be used. Like, do not let your attachment flags ghost you, bestie.
By default MIME type is guessed from filename extension, default encoding type base64 is used:
mailsend -f user@example.com -smtp 10.100.30.1
-t user@example.com -sub "this is a test"
-attach "file.pdf" -attach "file.jpg"
But all espects of attachments can be controlled:
mailsend -f user@example.com -smtp 10.100.30.1
-t user@example.com -sub test
-mime-type "text/plain"
-enc-type "7bit"
-charset "us-ascii"
-attach "file.txt"
-enc-type "8bit"
-charset "iso-8859-1"
-attach "deutsch.txt"
-mime-type "image/gif"
-enc-type "base64"
-aname "flower.gif"
-attach "/usr/file.gif"
-mime-type "image/jpeg"
-enc-type "base64"
-attach "file.jpeg"
By default, content disposition of all atachments are attachment, use -disposition "inline" to give hint to the mail reader to display it as mail body. Look at FAQ# 1 for details.
Including a body
Only one file can be included as a body of the mail. If the file is not us-ascii, the SMTP server has to support it. If you include a binary file, result is undefined. Like, undefined is not a vibe β be careful.
mailsend -f user@gmail -t user@example.com -smtp smtp.gamil.com
-port 587 -starttls -auth -user user@gmail.com -pass secret
-charset "utf-8"
-mime-type "text/plain"
-msg-body "file.txt"
π¦ SEE ALSO π¦
Please look at the web page for latest version and documentation: <http://muquit.com/muquit/software/mailsend/mailsend.html>.
π LICENSE π
Legal bestie time β here is the license text verbatim:
Copyright (C) 2001-2016 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.
π AUTHOR π
mailsend is written by Muhammad Muquit <muquit@muquit.com>. Homepage: <http://www.muquit.com/>.
And that's the whole page, bestie. This iconic manual is from mailsend 1.19, dated 2016-05-17. Periodt. π
β¨
π¦ where this page comes from
- nixos 26.05: mailsend 1.19
- nixpkgs unstable: mailsend 1.19
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms