mini_sendmail is a vary small application that will send a file via SMTP as an email.
你可以參考這個網站, 裡面有介紹下載, 安裝與英文版的使用說明
http://wiki.mattrude.com/index.php/Mini_sendmail
[使用 mini_sendmail 範例]
如果要透過mini_sendmail來發送信件訊息, 請執行以下的指令:
1 |
<span style="font-size: small;"><span style="color: #ff0000;"><strong>cat email.txt |mini_sendmail -f<em>from-user@example.com -</em>s<em>SMTP_Server</em></strong></span><span style="color: #ff0000;"><strong> <em>to-user@example.com</em></strong></span></span> |
其中, email.txt 內容如下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
<span style="color: #ff0000;"><span style="font-size: large;">subject: <em>You can now put anything here for the email Subject</em> </span><em><span style="font-size: large;">And here you will put the body of your message</span>.</em></span> <strong> [附上help訊息]</strong> <h2>mini_sendmail Manual File</h2> <pre>mini_sendmail(8) mini_sendmail(8) <strong>NAME</strong> mini_sendmail - accept email on behalf of real sendmail <strong>SYNOPSIS</strong> <strong>mini_sendmail [-f<name>] [-t] [-s<server>] [-p<port>] [-T<timeout>]</strong> <strong>[-v] address ...</strong> <strong>DESCRIPTION</strong> With no flags, mini_sendmail reads its standard input up to an end-of- file and sends a copy of the message found there to all of the addresses listed. The message is sent by connecting to a local SMTP server. This means mini_sendmail can be used to send email from inside a chroot(2) area. <strong>-f</strong> Sets the name of the "from" person (i.e. the sender of the mail). <strong>-t</strong> Read message for recipients. To:, Cc:, and Bcc: lines will be scanned for recipient addresses. The Bcc: line will be deleted before transmission. <strong>-s</strong> Specifies the SMTP server to use. Without this it uses local- host. <strong>-p</strong> Specifies the port to use. Without this it uses 25, the stan- dard SMTP port. <strong>-T</strong> Specifies timeout - defaults to one minute. <strong>-v</strong> Verbose mode - shows the conversation with the SMTP server. <strong>SEE ALSO</strong> sendmail(8) <strong>AUTHOR</strong> Copyright © 1999 by Jef Poskanzer <jef@mail.acme.com>. All rights reserved. END 12 July 2001 mini_sendmail(8) |