mailsend - Send mail via SMTP protocol from command line
Introduction
mailsend is a simple command line program to send mail via SMTP protocol. I used to send a piece of alert mail from a program in a networked Windows machine. You might find it useful in some situations.
Latest Development version is 1.17b14
 mailsend1.17b14.exe   959 KB
  mailsend1.17b14.exe   959 KB
Synopsis
Version: @(#) mailsend v1.17b14 Copyright: BSD. It is illegal to use this software for Spamming (Compiled with OpenSSL version: OpenSSL 1.0.0g Jan )
usage: mailsend [options]
Where the options are:
-copyright - show copyright information
-smtp hostname/IP* - Hostname/IP address of the SMTP server
-port SMTP port - SMTP port
-d 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 seconds
-bc bcc,bcc.. - Blind carbon copy address/es
+bc - do not ask for Blind carbon copy
+D - don not add Date header
-f address* - email address of the sender
-sub subject - subject
-lilst file - a file containing a list of email addresses
-log file - write log messages to this file
-attach file,mime_type,[i/a] (i=inline,a=attachment)
- attach this file as attachment or inline
-cs character set - for text/plain attachments (default is us-ascii)
-enc type - Encoding Type. Only valid type: base64
-H "header" - Add custom Header
-M "one line msg" - attach this one line text message
-name "Full Name" - add name in the From header
-v - verbose mode
-show_attach - show attachment in verbose mode, default is no
-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
-ssl - SMTP over SSL
-starttls - Check for STARTTLS and if server supports, do it
-auth - Try CRAM-MD5,LOGIN,PLAIN in 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. Environment variables: SMTP_USER_PASS for plain text password (-pass).
  For determining MIME types, please look at MIME Types.
Examples
VERSION
These examples are generated using
$ mailsend -V
mailsend Version: @(#) mailsend v1.17b11
Compiled with OpenSSL: OpenSSL 0.9.8x May
Show server info
$ mailsend -v -info -port -smtp smtp.gmail.com
$ mailsend -v -info -ssl -port -smtp smtp.gmail.com
$ mailsend -v -info -smtp smtp.example.com -ct
STARTTLS + AUTHENTICATION
$ mailsend -to user@gmail.com -from user@gmail.com
-starttls -port -auth
-smtp smtp.gmail.com
-sub test +cc +bc -v
-user you -pass "your_password"
SSL + AUTHENTICATION
$ mailsend -to user@gmail.com -from user@gmail.com
-ssl -port -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
Attachments
$ mailsend -f user@example.com -smtp 10.100.30.1
-t user@example.com -sub test -attach "file.txt,text/plain"
-attach "/usr/file.gif,image/gif" -attach "file.jpeg,image/jpg"
$ mailsend -f user@example.com -smtp 192.168.0.2
-t user@example.com -sub test +cc +bc
-attach "c:\file.gif,image/gif" -M "Sending a GIF file"
$ mailsend -f user@example.com -smtp 192.168.0.2
-t user@example.com -sub test +cc +bc -cs "ISO-8859-1"
-attach "file2.txt,text/plain"
Inline Attachment
$ mailsend -f user@example.com -d example.com -smtp 10.100.30.1
-t user@example.com -sub test -attach "nf.jpg,image/jpeg,i"
-M "body line1: content disposition is inline"
-M "body line2: this is line2 of the body"
mailsend - Send mail via SMTP protocol from command line的更多相关文章
- golang:send mail using smtp package
		go语言发送邮件,可以使用smtp包,两个关键函数: func PlainAuth(identity, username, password, host string) Auth func SendM ... 
- 5 Ways to Send Email From Linux Command Line
		https://tecadmin.net/ways-to-send-email-from-linux-command-line/ We all know the importance of email ... 
- SSIS Send Mail
		在SSIS中Send Mail的方法主要有三种,使用Send Mail Task,使用Script Task和使用存储过程msdb.dbo.sp_send_dbmail. 一,使用Send Mail ... 
- 发送邮件的三种方式:Send Mail Message
		发送邮件的三种方式: 1.VBS 执行vbs脚本文件的程序为: system32文件下的 NameSpace = "http://schemas.microsoft.com/cdo/conf ... 
- SMTP ERROR: Password command failed: 535 Incorrect authentication data
		在处理一个使用PHPMailer来发送电邮,我在本地使用我的163邮箱来做测试发送电邮,能够成功的发送电邮:当上传到正式平台时,出现了,类似这样的错误信息 SMTP ERROR: Password c ... 
- How to attach multiple files in the Send Mail Task in SSIS
		Let’s say you need to create a SSIS package that creates 2 files and emails the files to someone. Yo ... 
- 18 Command Line Tools to Monitor Linux Performance
		By Ravi Saive Under: Linux Commands, Monitoring Tools On: December 26, 2013 http://www.tecmint.com/c ... 
- List of Chromium Command Line Switches(命令行开关集)——官方指定命令行更新网址
		转自:http://peter.sh/experiments/chromium-command-line-switches/ There are lots of command lines which ... 
- Linux Command Line Basics
		Most of this note comes from the Beginning the Linux Command Line, Second Edition by Sander van Vugt ... 
随机推荐
- Linux相关命令
			使用的是ubuntu 安装JDK 输入java 命令会有提示安装的软件列表 sudo apt-get install openjdk-6-jdk sudo rm file名 删除文件 sudo r ... 
- 趣味C程序100.9 绘制杨辉三角
			说明:1.本问题来源于<C语言经典.趣味.实用程序设计编程百例精解>,所有程序为本人自己编写.与原程序不同之处作有标记. 2.本系列所有程序均使用codeblocks编译,操作系统为Win ... 
- [BZOJ 1082] [SCOI2005] 栅栏 【二分 + DFS验证(有效剪枝)】
			题目链接:BZOJ - 1082 题目分析 二分 + DFS验证. 二分到一个 mid ,验证能否选 mid 个根木棍,显然要选最小的 mid 根. 使用 DFS 验证,因为贪心地想一下,要尽量先用提 ... 
- matlab提速技巧(自matlab帮助文件)
			matlab提速技巧(自matlab帮助文件) 1.首先要学会用profiler.1.1. 打开profiler.To open the Profiler, select View -> Pro ... 
- I2C总线之(二)---时序
			一.协议 1.空闲状态 I2C总线总线的SDA和SCL两条信号线同时处于高电平时,规定为总线的空闲状态.此时各个器件的输出级场效应管均处在截止状态,即释放总线,由两条信号线各自的上拉电阻把电平拉高. ... 
- 译文:TransactionScope 与 Async/Await
			你可能不知道这一点,在 .NET Framework 4.5.0 版本中包含有一个关于 System.Transactions.TransactionScope 在与 async/await 一起工 ... 
- 【HDOJ】1892 See you~
			wa了十次,原来变量名写错.二维树状数组. #include <cstdio> #include <cstring> #define MAXN 1002 int nums[MA ... 
- 网络流CodeForces. Original 589F:Gourmet and Banquet
			A gourmet came into the banquet hall, where the cooks suggested n dishes for guests. The gourmet kno ... 
- 网络流(最大流):CodeForces 499E Array and Operations
			You have written on a piece of paper an array of n positive integers a[1], a[2], ..., a[n] and m goo ... 
- DB2_001_MQT
			MQT stands for Materialed Query Table.它的定义是建立在查询结果之上的,把动态查询的结果放到表中,表中的数据随着基础表中数据的变化而变化.当基础表中的数据变化时,M ... 
