1. 程式人生 > >【工具】輕量級 linux 命令列發郵件工具--SendEmail

【工具】輕量級 linux 命令列發郵件工具--SendEmail

An Email Program for Sending SMTP Mail from a Command Line

About SendEmail
SendEmail is a lightweight, command line SMTP email client. If you have the need to send email from a command line, this free program is perfect: simple to use and feature rich. It was designed to be used in bash scripts, batch files, Perl programs and web sites, but is quite adaptable and will likely meet your requirements. SendEmail is written in Perl and is unique in that it requires NO MODULES. It has an intuitive and flexible set of command-line options, making it very easy to learn and use.
SendEmail is licensed under the GNU GPL, either version 2 of the License or (at your option) any later version.
[Supported Platforms: Linux, BSD, OS X, Windows 98, Windows NT, Windows 2000, & Windows XP] 

Command Line Options
SendEmail has the following command line options:
sendEmail command line options

How do I install it?
Simply download, extract, and run "sendEmail" from a command prompt, it will give a usage summary. It is written in Perl, so no compilation needed. On a unix system if your perl binary is not installed at /usr/bin/perl you may need to edit the first line of the script. If you're running a Microsoft OS you may need to put a .pl extension on sendEmail so Windows will know to associate it with perl.

TLS Support
Starting with sendEmail v1.54, TLS support is included! To enable TLS support simply install the Net::SSLeay andIO::Socket::SSL perl modules. The following new command line parameters are now available:
    -o tls=auto This is the default, TLS will be used if possible.
    -o tls=yes Use this to require TLS for message delivery.
    -o tls=no

 Use this to disable TLS support.
If TLS is giving strange errors, try upgrading the Net::SSLeay and IO::Socket::SSL perl modules. Please do NOT report TLS bugs unless you have already done this! If you're running up-to-date versions of these modules and you are getting TLS errors, your detailed bug report will be appreciated. Yes, you can finally use SendEmail to send messages to your GMail account :)

Frequently Asked Questions
Q: How do I send email through GMail (Google Mail) servers?
A: Just use port 587 and TLS. Example:
sendEmail -o tls=yes -f [email protected] -t [email protected] -s smtp.gmail.com:587 -xu [email protected] -xp YOURPASSWORD -u "Hello from sendEmail" -m "How are you? I'm testing sendEmail from the command line." 

Q: I get the error "invalid SSL_version specified at /System/Library/Perl/Extras/5.16/IO/Socket/SSL.pm line 332.“ on my Apple. What do I do?
A: Here's what I got from one user. It's a workaround until I put a real fix in:
> Fixed it by using Perl v5.12 that's still on OSX Mavericks. > (just changed sendEmail line 1 from #!/usr/bin/perl -w to #!/usr/bin/perl5.12 -w)

Q: Can I use non-ascii characters, like é, in an email message body?
A: It's been reported that adding the command-line parameter -o message-charset=utf-8 solves this issue.

Q: I'm using the Windows version of sendEmail and I can't seem to send a message larger than 16kb.
A: This is a known issue. I believe it's an issue with the ActiveState Perl compiler, and I don't know of a work-around.

Q: I'm using the Windows version of sendEmail, and I get the error message "the ordinal 2586 could not be located in the dynamic link libraby LIBEAY32.dll", what do I do?
A: I don't know why this happens, but you can fix it by downloading the "No TLS Support" version of sendEmail. You won't be able to send email through an SMTP server that requires encryption, but it won't give you that error message.

Why not use sendmail?
Sendmail is a large and complex mail server. Installing this kind of mail software on servers (unless it's a mail server) is more of a security risk than it's worth. Not to mention it can be a real pain messing with configuration files and such. Systems need another simpler way to send email from the command prompt, and sendEmail provides this functionality. Its a simple, direct way to send email without the overhead of other conventional email software.

How can I send anonymous email?
SendEmail was not intended to be used for malicious purposes, like sending spam! However, there are often legitimate reasons to send email anonymously. I use the term "anonymous" to mean sending email from an address that isn't normally associated with just you. For example, sendEmail is a great script for emailing company newsletters where you want to send email from an "anonymous" account like [email protected]
To send "anonymous" email from a CLI with sendEmail, simply specify a from address that you want to use with the -f option, and unless your ISP's SMTP email server is picky, it will accept and deliver it.
View Example


相關推薦

工具輕量級 linux 命令郵件工具--SendEmail

An Email Program for Sending SMTP Mail from a Command Line About SendEmail SendEmail is a lightweight, command line SMTP email clien

blat命令郵件工具簡單使用技巧

Blat 是一個命令列發郵件的小工具,僅支援簡單的SMTP協議,需要SMTP伺服器的支援。 據說現在新申請的郵箱已經不支援SMTP服務了,是為了抑制垃圾郵件而採取的措施。 但是,Blat也是一個非常方便的小工具,基本上可以滿足一般人的需求。 簡單使用方法: 在控制檯中切換到Blat.exe V2.6.

Python自動生成命令工具

Python 中用於生成命令列介面(Command Line Interfaces, CLIs)的工具已經有一些了,例如已經成為 Python 標準庫的 argparse 和第三方的 click ,這些都是很不錯的工具。但是這些工具為 Python 程式生成 C

RF工具自定義linux命令命令執行程式碼及資料庫訪問

之前寫了幾次資料庫連線和linux命令列執行的程式碼,在此儲存下。 另考慮到python2的中文編碼問題,註釋等都用簡單英文,見諒~  import paramiko class Excsshcmd(): ssh = paramiko.SSHClient()

PEWindows平臺命令中使用vcvarsall.bat配置編譯環境

###Date: 2017/9/20 一、關於命令列編譯環境的配置方法 對於VS2015,%VS140COMNTOOLS%/VC下就有vcvarsall.bat,用於生成命令列編譯環境。 對於V

Linux 命令網路監控工具

對任何規模的業務來說,網路監控工具都是一個重要的功能。網路監控的目標可能千差萬別。比如,監控活動的目標可以是保證長期的網路服務、安全保護、對效能進行排查、網路使用統計等。由於它的目標不同,網路監控器使用很多不同的方式來完成任務。比如對包層面的嗅探,對資料流層面的統計資料,

JavaJava的命令引數

說明 命令列引數就是main方法裡面的引數String[] args,args只是資料型別的一個名稱,可任意命名 當你在Java命令列後面帶上引數,JVM就直接把引數存放到了main方法中的引數String數組裡 格式 Java中的命令列引數格式: public stat

命令郵件——讓你更加了解smtp

轉載自:http://www.cnblogs.com/fanyong/p/3498670.html SMTP 首先介紹下smtp協議——簡單郵件傳輸協議 (Simple Mail Transfer Protocol, SMTP) 是事實上的在Internet傳輸email的

sendmail-命令郵件利器

前段時間公司的一個專案剛剛上線,為了每天都能夠檢視系統中昨天出現的問題等各種關鍵資訊,開發人員每天都遠端登陸系統拿到產生的系統日誌等其他檔案,由於遠端登陸還需要VPN,使用起來相當繁瑣,並且效率不高,為此花掉的時間也挺多的.想了一想如何解決這個問題,得出的結論這種重複無意義

linux--- 高階命令文字處理工具 sort

二、sort命令  sort 命令對 File 引數指定的檔案中的行排序,並將結果寫到標準輸出。如果 File 引數指定多個檔案,那麼 sort 命令將這些檔案連線起來,並當作一個檔案進行排序。 選項與引數: -f  :忽略大小寫的差異,例如 A 與 a 視為編碼相同

linux--- 高階命令文字處理工具 cut

第一: cut命令 cut : 可以從一個文字檔案或者文字流中提取文字列 echo $PATH 選項 -b:僅顯示行中指定直接範圍的內容; -c:僅顯示行中指定範圍的字元; -d:指定欄位的分隔符,預設的欄位分隔符為“TAB”; -f:顯示指定欄位的內容; --comple

linuxlinux命令中的符號

嚴格地說這些不是Linux命令列(或者說是Shell)中的一部分,而且每一項都和Shell中的含義不同。這些是是編寫Usage的約定:()表示分組,其中的選項至少要用到一個。| 表示“或”。<>表示其中的字串並不是真正的選項或引數,你需要理解它並替換

Mac下命令郵件搭配php(shell_exec...)等腳本語言,輕松郵件,告別各種依賴庫

-1 mtp ima .cn 令行 輕量 -- 語言 郵件   用到的是msmtp,一個smtp客戶端,比sendmail,postfix更加輕量。用自己的QQ郵箱(163...)發郵件的話,很適合。   Mac下安裝很簡單,一句話:brew install msmtp  

取證分析linux命令xxd來獲取dump檔案資訊獲得flag

題目連結:https://blog.csdn.net/xiangshangbashaonian/article/details/82747394 拿到一道CTF題目  notepad++開啟如下所示 [email protected]:~/Desktop$ fi

Linux命令翻譯工具

一、背景 經常在linux命令列下有些單詞不認識,複製出來通過翻譯軟體很不方便,如果有個命令列翻譯就比較舒服了。通過下面shell指令碼可以在/usr/bin/yd建立yd命令來進行快速命令列翻譯。 二、程式碼 git地址 #!/bin/bash # # CMD=/usr/bin/yd cat

linux命令todo列表管理工具Taskwarrior介紹

Taskwarrior 是一款在命令列下使用的TODO列表管理工具,或者說任務管理工具,靈活,快速,高效。 安裝 在ubuntu 14.04 中,可從官方倉庫安裝task軟體包 sudo apt-get install task 在ubuntu18.04中,可從官方倉庫安裝taskwarrior軟體

看這一篇就夠了kubernetes入門命令操作(例項演示)

寫在前面:網上找了好久終於找到了期盼已久的、一個一眼就能理解的kubernetes“整體全過程”文章。 建議看這篇文章可以結合kubernetes官網(www.kubernetes.io)的Tutorial進行演練,效果很好。 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

吻逗死(windows)系統下自動部署指令碼(for java spring*)及linux命令工具

轉載請註明出處:https://www.cnblogs.com/funnyzpc/p/10051647.html (^^)(^^)自動部署指令碼原本在上個公司就在使用,由於近期同事需要手動部署一個SpringCloud應用,一邊是sftp軟體上傳,一邊是SourceCRT命令列工具,看這著實很累,就順手把我

C++筆記Windows通過命令編譯執行c程式 (轉載)

1.準備 一臺具備c開發環境的Windows。 驗證方式,命令列輸入gcc -v,檢視是否輸出版本資訊。 gcc -v 1 2.寫程式 在E盤建一個資料夾C,在裡面建立一個Hello.c檔案,副檔名是c,內容如下: #include <stdio.h>

Android開發Coding + git命令基本使用

上傳程式碼 進入本地倉庫的目錄。 cd ... 檢視倉庫連結 : git remote -v 如果沒有,則新增url連結 : git remote add testName https://git.coding.net/xxxx.git 將所有程式碼新增到本地