sendEmail:Linux下不可或缺的邮件程序

还在为Linux下没有便捷的邮件程序苦恼,还在为复杂的邮件服务器架设Google N多网页? 对于小型,便捷的Linux下命令行邮件程序,sendEmail使得这一切变得轻松可行。一起来看看吧。

一、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]

总的来说sendEmail简单,轻量级,命令行,可伸缩,跨平台。

二、下载与安装
  下面的地址是sendEmail的下载及详细说明
 

下面是安装描述,总共四个步骤就搞定。
  ------------------
  Installation
  ------------------
 
  SendEmail is a perl script/program, and only needs to be copied to a directory
  in your path to make it accessible.  Most likely the following steps will
  be sufficient:
 
  1) Extract the package
      tar -zxvf sendEmail-v1.XX.tar.gz
 
  2) Copy the sendEmail script to /usr/local/bin
      cp -a sendEmail-v1.XX/sendEmail /usr/local/bin
 
  3) Make sure its executable
      chmod +x /usr/local/bin/sendEmail
 
  4) Run it
      sendEmail
        or
      /usr/local/bin/sendEmail

三、用法   
  直接输入sendEmail,将出现该工具的用法介绍,如下所示。由于用法也简单明了,因此不一一解释
  robin@SZDB:~/dba_scripts/sendEmail-v1.56> ./sendEmail
 
  sendEmail-1.56 by Brandon Zehm <caspian@dotconf.net>
 
  Synopsis:  sendEmail -f ADDRESS [options]
 
    Required:
      -f ADDRESS                from (sender) email address
      * At least one recipient required via -t, -cc, or -bcc
      * Message body required via -m, STDIN, or -o message-file=FILE
 
    Common:
      -t ADDRESS [ADDR ...]    to email address(es)
      -u SUBJECT                message subject
      -m MESSAGE                message body
      -s SERVER[:PORT]          smtp mail relay, default is localhost:25
 
    Optional:
      -a  FILE [FILE ...]      file attachment(s)
      -cc  ADDRESS [ADDR ...]  cc  email address(es)
      -bcc ADDRESS [ADDR ...]  bcc email address(es)
      -xu  USERNAME            username for SMTP authentication
      -xp  PASSWORD            password for SMTP authentication
 
    Paranormal:
      -b BINDADDR[:PORT]        local host bind address
      -l LOGFILE                log to the specified file
      -v                        verbosity, use multiple times for greater effect
      -q                        be quiet (i.e. no STDOUT output)
      -o NAME=VALUE            advanced options, for details try: --help misc
          -o message-content-type=<auto|text|html>
          -o message-file=FILE        -o message-format=raw
          -o message-header=HEADER    -o message-charset=CHARSET
          -o reply-to=ADDRESS          -o timeout=SECONDS
          -o username=USERNAME        -o password=PASSWORD
          -o tls=<auto|yes|no>        -o fqdn=FQDN
 
 
    Help:
      --help                    the helpful overview you're reading now
      --help addressing        explain addressing and related options
      --help message            explain message body input and related options
      --help networking        explain -s, -b, etc
      --help output            explain logging and other output options
      --help misc              explain -o options, TLS, SMTP auth, and more

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/95503c5516790258460a07a7b793d4d4.html