In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article is to share with you about the example analysis of sendEmail- parameters, the editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.
Still worrying about the lack of convenient mail programs under Linux, and setting up Google N multi-web pages for complex mail servers? For small, convenient Linux command-line mail programs, sendEmail makes it easy and feasible. Let's take a look.
Click (here) to collapse or open
[python] view plain copy print?
1. Introduction of 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]
Overall, sendEmail is simple, lightweight, command-line, scalable, and cross-platform.
Download and install
The following address is the download and detailed description of sendEmail
Http://caspian.dotconf.net/menu/Software/SendEmail/
Here is the installation description, which is done in a total of four steps.
-
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
III. Usage
Enter sendEmail directly and an introduction to the usage of the tool will appear, as shown below. As the usage is also simple and clear, it cannot be explained one by one.
Robin@SZDB:~/dba_scripts/sendEmail-v1.56 >. / sendEmail
SendEmail-1.56 by Brandon Zehm
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=
-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=-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
View the detailed help file as follows:
. / sendEmail-- help addressing
. / sendEmail-- help message
IV. Examples
# the sender uses any mailbox to send mail
Robin@SZDB:~ > sendEmail-f robinson@oracle.com\
>-t robinson.cheng@trade.com\
>-u "Test Mail"\
>-m "This is a test mail from Robinson"
Dec 18 14:10:23 szdb sendEmail [18494]: Email was sent successfully!
# the sender uses a real Internet mail server to send mail
Robin@SZDB:~ > sendEmail-f rocket010824@163.com\
>-t robinson.cheng@trade.com\
>-u "Test Mail"\
>-s smtp.163.com\
>-xu jackson\
>-xp temp_000\
>-m "This is test mail from Robinson"
Dec 18 14:13:24 szdb sendEmail [18500]: Email was sent successfully!
Send to multiple email recipients
Robin@SZDB:~ > sendEmail-f robinson@oracle.com\
>-t "Robinson cheng" jackson@163.com\
>-u "Send email to mutiple people"\
>-m "This is a test mail"
Dec 18 14:24:57 szdb sendEmail [18537]: Email was sent successfully!
Use CC, BCC recipient
Robin@SZDB:~ > sendEmail-f robinson@oracle.com\
>-t "Robinson cheng"\
>-cc jason.wu@trade.com\
>-bcc jackson@163.com\
>-u "Test mail"\
>-m "This is a test mail"
Send a message with an attachment
Robin@SZDB:~ > sendEmail-f robinson@oracle.com\
>-t "Robinson cheng"\
>-cc jason.wu@trade.com\
>-u "Test mail with multi attached"\
>-m "This is a test mail with multi attached"\
>-a / users/robin/addmrpt_1_11584_11649.txt "/ users/robin/Temp log"
Dec 18 14:43:35 szdb sendEmail [18664]: Email was sent successfully!
# use the contents of the file as the body of the message
Robin@SZDB:~ > sendEmail-f robinson@oracle.com\
>-t "Robinson cheng"\
>-u "Test mail and the body from file contents"\
>-o message-file=/users/robin/addmrpt_1_11584_11649.txt
Dec 18 14:50:39 szdb sendEmail [18715]: Email was sent successfully!
Robin@SZDB:~ > cat addmrpt_1_11584_11649.txt | sendEmail-f robinson@oracle.com\
>-t "Robinson cheng"\
>-u "Test mail and the body from file contents"
Reading message body from STDIN because the'- m
The above is an example analysis of sendEmail- parameters, and the editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.