"Fossies" - the Fresh Open Source Software Archive

Member "sendEmail-v1.56/README" (29 Sep 2009, 7949 Bytes) of package /linux/privat/sendEmail-v1.56.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 sendEmail - Send email from a console near you!
    2 Written by: Brandon Zehm <caspian@dotconf.net>
    3 http://caspian.dotconf.net/
    4 http://www.tsheets.com/
    5 
    6 
    7 
    8 ------------------
    9 What is sendEmail?
   10 ------------------
   11 
   12 SendEmail is a lightweight, completly command line based, SMTP email agent.
   13 If you have the need to send email from the command line, this tool is perfect.
   14 It was designed to be used in bash scripts, Perl programs, and web sites, but
   15 it is also quite useful in many other contexts.  SendEmail is written in Perl 
   16 and is unique in that it requires NO SPECIAL MODULES. It has an intuitive and
   17 flexible set of command-line options, making it very easy to learn and use.
   18 
   19 
   20 
   21 
   22 ------------------
   23 Installation
   24 ------------------
   25 
   26 SendEmail is a perl script/program, and only needs to be copied to a directory
   27 in your path to make it accessible.  Most likely the following steps will
   28 be sufficient:
   29 
   30 1) Extract the package
   31     tar -zxvf sendEmail-v1.XX.tar.gz
   32 
   33 2) Copy the sendEmail script to /usr/local/bin
   34     cp -a sendEmail-v1.XX/sendEmail /usr/local/bin
   35 
   36 3) Make sure its executable
   37     chmod +x /usr/local/bin/sendEmail
   38 
   39 4) Run it
   40     sendEmail
   41       or
   42     /usr/local/bin/sendEmail
   43 
   44 NOTES:
   45   * Running sendEmail without any arguments will produce a usage summary.
   46   * SendEmail is written in Perl, so no compilation is needed.
   47   * On a Unix/Linux OS if your perl binary is not installed at /usr/bin/perl
   48     you may need to edit the first line of the script accordingly.
   49 
   50 
   51 
   52 
   53 
   54 
   55 ---------------
   56 Usage Overview
   57 ---------------
   58 
   59 sendEmail-1.56 by Brandon Zehm <caspian@dotconf.net>
   60 
   61 Synopsis:  sendEmail -f ADDRESS [options]
   62 
   63   Required:
   64     -f ADDRESS                from (sender) email address
   65     * At least one recipient required via -t, -cc, or -bcc
   66     * Message body required via -m, STDIN, or -o message-file=FILE
   67 
   68   Common:
   69     -t ADDRESS [ADDR ...]     to email address(es)
   70     -u SUBJECT                message subject
   71     -m MESSAGE                message body
   72     -s SERVER[:PORT]          smtp mail relay, default is localhost:25
   73 
   74   Optional:
   75     -a   FILE [FILE ...]      file attachment(s)
   76     -cc  ADDRESS [ADDR ...]   cc  email address(es)
   77     -bcc ADDRESS [ADDR ...]   bcc email address(es)
   78     -xu  USERNAME             username for SMTP authentication
   79     -xp  PASSWORD             password for SMTP authentication
   80 
   81   Paranormal:
   82     -b BINDADDR[:PORT]        local host bind address
   83     -l LOGFILE                log to the specified file
   84     -v                        verbosity, use multiple times for greater effect
   85     -q                        be quiet (i.e. no STDOUT output)
   86     -o NAME=VALUE             advanced options, for details try: --help misc
   87         -o message-content-type=<auto|text|html|other>
   88         -o message-file=FILE         -o message-format=raw
   89         -o message-header=HEADER     -o message-charset=CHARSET
   90         -o reply-to=ADDRESS          -o timeout=SECONDS
   91         -o username=USERNAME         -o password=PASSWORD
   92         -o tls=<auto|yes|no>         -o fqdn=FQDN
   93 
   94   Help:
   95     --help                    the helpful overview you're reading now
   96     --help addressing         explain addressing and related options
   97     --help message            explain message body input and related options
   98     --help networking         explain -s, -b, etc
   99     --help output             explain logging and other output options
  100     --help misc               explain -o options, TLS, SMTP auth, and more
  101 
  102 
  103 
  104 ---------------
  105 Examples
  106 ---------------
  107 
  108 Simple Email:
  109   sendEmail -f me@gmail.com        \
  110             -t friend@yahoo.com    \
  111             -s smtp.gmail.com:587  \
  112             -xu me@gmail.com       \
  113             -xp MY-PASSWORD        \
  114             -u "Test email"        \
  115             -m "Hi buddy, this is a test email."
  116 
  117 Sending to mutiple people:
  118   sendEmail -f myaddress@isp.net \
  119             -t "Scott Thomas <scott@isp.net>" jason@isp.net renee@isp.net \
  120             -s relay.isp.net     \
  121             -u "Test email"      \
  122             -m "Hi guys, this is a test email."
  123 
  124 Sending to multiple people using cc and bcc recipients:
  125 (notice the different way I specified multiple To recipients, you can do this for cc and bcc as well)
  126   sendEmail -f myaddress@isp.net \
  127             -t scott@isp.net;jason@isp.net;renee@isp.net \
  128             -cc jennifer@isp.net paul@isp.net jeremiah@isp.net \
  129             -bcc troy@isp.net miranda@isp.net jay@isp.net \
  130             -s relay.isp.net \
  131             -u "Test email with cc and bcc recipients" \
  132             -m "Hi guys, this is a test email."
  133 
  134 
  135 Sending to multiple people with multiple attachments:
  136   sendEmail -f myaddress@isp.net \
  137             -t jason@isp.net \
  138             -cc jennifer@isp.net paul@isp.net jeremiah@isp.net \
  139             -s relay.isp.net \
  140             -u "Test email with cc and bcc recipients" \
  141             -m "Hi guys, this is a test email." \
  142             -a /mnt/storage/document.sxw "/root/My Documents/Work Schedule.kwd"
  143 
  144 
  145 Sending an email with the contents of a file as the message body:
  146   cat /tmp/file.txt | sendEmail -f myaddress@isp.net \
  147                                 -t jason@isp.net \
  148                                 -s relay.isp.net \
  149                                 -u "Test email with contents of file"
  150 
  151 
  152 Sending an email with the contents of a file as the message body (method 2):
  153   sendEmail -f myaddress@isp.net \
  154             -t jason@isp.net \
  155             -s relay.isp.net \
  156             -o message-file=/tmp/file.txt \
  157             -u "Test email with contents of file"
  158 
  159 
  160 Sending an html email:  (make sure your html file has <html> at the beginning)
  161   cat /tmp/file.html | sendEmail -f myaddress@isp.net \
  162                                  -t jason@isp.net \
  163                                  -s relay.isp.net \
  164                                  -u "Test email with html content"
  165 
  166 
  167 
  168 
  169 
  170 
  171 
  172 
  173 
  174 ------------
  175 Contributors
  176 ------------
  177 
  178 Many thanks go to the people who have submitted ideas and patches.
  179 I know I've forgotten to mention everyone who's helped with sendEmail,
  180 but here is a small list.  Please let me know if you feel your name
  181 should be here!
  182 
  183   v1.56
  184    - Several people submitted fixes for the authentication bug.
  185      Thanks to all of you for nagging me to get this release out!
  186 
  187   Simon Matter (v1.55)
  188    - Local bind address patch
  189 
  190   CBL Team <http://cbl.abuseat.org/> and Chris Peay (v1.55)
  191    - Bug reports about sendEmail causing people get blacklisted.
  192 
  193   Jared Cheney (v1.42)
  194    - More bare LF bug fixes and bare period encoding.
  195    - Mime encoding patch
  196 
  197   Buddy Nahay (v1.41)
  198    - Bare LF bug report
  199 
  200   John Rouillard (v1.41)
  201    - html detection bug report
  202 
  203   Reidar Johansen (v1.40)
  204    - Added support for HTML email
  205    - Created a function called tz_offset that determines the local timezone
  206    - Many other fixes and suggestions
  207 
  208   Paul Kreiner (v1.40)
  209    - Submitted a patch that forces the timestamp string to always follow
  210      the HH:MM:SS convention required by the RFCs.
  211 
  212   Al Danial
  213    - Found and reported a logging/typo/attachment issue in v1.32
  214 
  215   Svante Gerhard
  216    - Found and reported the file attachment/padding issue in v1.31
  217 
  218   Charles Leeds
  219    - Put together all the original file attachment code and got me
  220      on the path to v1.3x
  221    - Provided the compiled Windows executable version of sendEmail
  222      for a LONG time.  I really appreciate your help!
  223 
  224   Nick Pasich
  225    - Passing the email message via STDIN
  226    - Multiple <to> recpients
  227    - Log file option
  228    - Quiet option
  229    - Cc option
  230    - Lots of other suggestions and code
  231 
  232   Richard Duim
  233    - For mime/content-type/attachment suggestions
  234 
  235   Ulisses Montenegro
  236    - First one to report problems with bare LF's on qmail servers
  237 
  238   Michael Santy
  239    - Reported problems with various SMTP servers and helped me fix a few
  240      fairly serious problems.
  241 
  242   Many other people have submitted bug reports and helped to make sendEmail
  243   what it is today, and my best regards go out to all those .. complainers ;-)
  244