iis服务器助手广告广告
返回顶部
首页 > 资讯 > 精选 >sendEmail-参数的示例分析
  • 694
分享到

sendEmail-参数的示例分析

2023-06-06 04:06:49 694人浏览 独家记忆
摘要

本篇文章给大家分享的是有关sendEmail-参数的示例分析,小编觉得挺实用的,因此分享给大家学习,希望大家阅读完这篇文章后可以有所收获,话不多说,跟着小编一起来看看吧。还在为linux下没有便捷的邮件程序苦恼,还在为复杂的邮件服务器架设G

本篇文章给大家分享的是有关sendEmail-参数的示例分析,小编觉得挺实用的,因此分享给大家学习,希望大家阅读完这篇文章后可以有所收获,话不多说,跟着小编一起来看看吧。

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

点击(此处)折叠或打开

  1. [python] view plain copy print?

  2. 一、sendEmail介绍

  3.    SendEmail is a lightweight, command line SMTP email client. If you have the need to send email from a command line, this

  4. free program is perfect: simple to use and feature rich. It was designed to be used in bash scripts, batch files, Perl

  5. programs and WEB sites, but is quite adaptable and will likely meet your requirements. SendEmail is written in Perl and is

  6. unique in that it requires NO MODULES. It has an intuitive and flexible set of command-line options, making it very easy to

  7. learn and use.

  8.     SendEmail is licensed under the GNU GPL, either version 2 of the License or (at your option) any later version.

  9.     [Supported PlatfORMs: Linux, BSD, OS X, windows 98, Windows NT, Windows 2000, & Windows XP]

  10.   

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

  12.   

  13. 二、下载与安装

  14.   下面的地址是sendEmail的下载及详细说明

  15.   Http://caspian.dotconf.net/menu/Software/SendEmail/

  16.   

  17.   下面是安装描述,总共四个步骤就搞定。

  18.   ------------------

  19.   Installation

  20.   ------------------

  21.     

  22.   SendEmail is a perl script/program, and only needs to be copied to a directory

  23.   in your path to make it accessible. Most likely the following steps will

  24.   be sufficient:

  25.     

  26.   1) Extract the package

  27.       tar -zxvf sendEmail-v1.XX.tar.gz

  28.     

  29.   2) Copy the sendEmail script to /usr/local/bin

  30.       cp -a sendEmail-v1.XX/sendEmail /usr/local/bin

  31.     

  32.   3) Make sure its executable

  33.       chmod +x /usr/local/bin/sendEmail

  34.     

  35.   4) Run it

  36.       sendEmail

  37.         or

  38.       /usr/local/bin/sendEmail

  39.   

  40. 三、用法

  41.   直接输入sendEmail,将出现该工具的用法介绍,如下所示。由于用法也简单明了,因此不一一解释

  42.   robin@SZDB:~/dba_scripts/sendEmail-v1.56> ./sendEmail

  43.     

  44.   sendEmail-1.56 by Brandon Zehm <caspian@dotconf.net>

  45.     

  46.   Synopsis: sendEmail -f ADDRESS [options]

  47.     

  48.     Required:

  49.       -f ADDRESS from (sender) email address

  50.       * At least one recipient required via -t, -cc, or -bcc

  51.       * Message body required via -m, STDIN, or -o message-file=FILE

  52.     

  53.     Common:

  54.       -t ADDRESS [ADDR ...] to email address(es)

  55.       -u SUBJECT                message subject

  56.       -m MESSAGE                message body

  57.       -s SERVER[:PORT] smtp mail relay, default is localhost:25

  58.     

  59.     Optional:

  60.       -a   FILE [FILE ...] file attachment(s)

  61.       -cc  ADDRESS [ADDR ...] cc  email address(es)

  62.       -bcc ADDRESS [ADDR ...] bcc email address(es)

  63.       -xu  USERNAME             username for SMTP authentication

  64.       -xp  PASSWord             password for SMTP authentication

  65.     

  66.     Paranormal:

  67.       -b BINDADDR[:PORT] local host bind address

  68.       -l LOGFILE                log to the specified file

  69.       -v                        verbosity, use multiple times for greater effect

  70.       -q                        be quiet (i.e. no STDOUT output)

  71.       -o NAME=VALUE             advanced options, for details try: --help misc

  72.           -o message-content-type=<auto|text|html>

  73.           -o message-file=FILE -o message-format=raw

  74.           -o message-header=HEADER -o message-charset=CHARSET

  75.           -o reply-to=ADDRESS -o timeout=SECONDS

  76.           -o username=USERNAME -o password=PASSWORD

  77.           -o tls=<auto|yes|no> -o fqdn=FQDN

  78.     

  79.     

  80.     Help:

  81.       --help                    the helpful overview you're reading now

  82.       --help addressing         explain addressing and related options

  83.       --help message            explain message body input and related options

  84.       --help networking         explain -s, -b, etc

  85.       --help output             explain logging and other output options

  86.       --help misc               explain -o options, TLS, SMTP auth, and more

  87.   

  88.   查看详细的帮助文件,如下方式:

  89.   ./sendEmail --help addressing

  90.   ./sendEmail --help message

  91.   

  92. 四、示例

  93.   #发送者使用任意的邮箱方式发送邮件

  94.   robin@SZDB:~> sendEmail -f robinson@oracle.com \

  95.   > -t robinson.cheng@trade.com \

  96.   > -u "Test Mail" \

  97.   > -m "This is a test mail from Robinson"

  98.   Dec 18 14:10:23 szdb sendEmail[18494]: Email was sent successfully!

  99.     

  100.   #发送者使用一个真实存在的互联网邮件服务器来发送邮件

  101.   robin@SZDB:~> sendEmail -f rocket010824@163.com \

  102.   > -t robinson.cheng@trade.com \

  103.   > -u "Test Mail" \

  104.   > -s smtp.163.com \

  105.   > -xu jackson \

  106.   > -xp temp_000 \

  107.   > -m "This is test mail from Robinson"

  108.   Dec 18 14:13:24 szdb sendEmail[18500]: Email was sent successfully!

  109.     

  110.   发送给多个邮件接收人

  111.   robin@SZDB:~> sendEmail -f robinson@oracle.com \

  112.   > -t "Robinson cheng <robinson.cheng@trade.com>" jackson@163.com \

  113.   > -u "Send email to mutiple people" \

  114.   > -m "This is a test mail"

  115.   Dec 18 14:24:57 szdb sendEmail[18537]: Email was sent successfully!

  116.     

  117.   使用抄送,密送接收人

  118.   robin@SZDB:~> sendEmail -f robinson@oracle.com \

  119.   > -t "Robinson cheng <robinson.cheng@trade.com>" \

  120.   > -cc jason.wu@trade.com \

  121.   > -bcc jackson@163.com \

  122.   > -u "Test mail " \

  123.   > -m "This is a test mail"

  124.     

  125.   发送带有附件的邮件

  126.   robin@SZDB:~> sendEmail -f robinson@oracle.com \

  127.   > -t "Robinson cheng <robinson.cheng@trade.com>" \

  128.   > -cc jason.wu@trade.com \

  129.   > -u "Test mail with multi attached" \

  130.   > -m "This is a test mail with multi attached" \

  131.   > -a /users/robin/addmrpt_1_11584_11649.txt "/users/robin/Temp log"

  132.   Dec 18 14:43:35 szdb sendEmail[18664]: Email was sent successfully!

  133.     

  134.   #使用文件内容作为邮件的body

  135.   robin@SZDB:~> sendEmail -f robinson@oracle.com \

  136.   > -t "Robinson cheng <robinson.cheng@trade.com>" \

  137.   > -u "Test mail and the body from file contents" \

  138.   > -o message-file=/users/robin/addmrpt_1_11584_11649.txt

  139.   Dec 18 14:50:39 szdb sendEmail[18715]: Email was sent successfully!

  140.     

  141.   robin@SZDB:~> cat addmrpt_1_11584_11649.txt | sendEmail -f robinson@oracle.com \

  142.   > -t "Robinson cheng <robinson.cheng@trade.com>" \

  143.   > -u "Test mail and the body from file contents"

  144.   Reading message body from STDIN because the '-m

以上就是sendEmail-参数的示例分析,小编相信有部分知识点可能是我们日常工作会见到或用到的。希望你能通过这篇文章学到更多知识。更多详情敬请关注编程网精选频道。

--结束END--

本文标题: sendEmail-参数的示例分析

本文链接: https://www.lsjlt.com/news/246086.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
  • sendEmail-参数的示例分析
    本篇文章给大家分享的是有关sendEmail-参数的示例分析,小编觉得挺实用的,因此分享给大家学习,希望大家阅读完这篇文章后可以有所收获,话不多说,跟着小编一起来看看吧。还在为Linux下没有便捷的邮件程序苦恼,还在为复杂的邮件服务器架设G...
    99+
    2023-06-06
  • mysql参数的示例分析
    这篇文章给大家分享的是有关mysql参数的示例分析的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。慢查询是否开启select @@log_slow_queries; 慢查...
    99+
    2022-10-19
  • pip参数的示例分析
    这篇文章将为大家详细讲解有关pip参数的示例分析,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。pip参数解释# pip --help   U...
    99+
    2022-10-19
  • 函数参数的示例分析
    这篇文章将为大家详细讲解有关函数参数的示例分析,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。函数的参数(实参和形参):形参变量只有在被调用时才分配内存单元,在调用结束时, 即刻释放所分配的内存单元。因此,...
    99+
    2023-06-15
  • Assert.assertEquals()方法参数的示例分析
    这篇文章主要介绍了Assert.assertEquals()方法参数的示例分析,具有一定借鉴价值,感兴趣的朋友可以参考下,希望大家阅读完这篇文章之后大有收获,下面让小编带着大家一起了解一下。junit.framework包下的Assert提...
    99+
    2023-06-22
  • MySQL中slave_exec_mode参数的示例分析
    这篇文章主要介绍MySQL中slave_exec_mode参数的示例分析,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!无意当中看到参数slave_exec_mode,从手册里的说明看...
    99+
    2022-10-18
  • mysql中innodb_flush_log_at_trx_commit参数的示例分析
    这篇文章主要介绍mysql中innodb_flush_log_at_trx_commit参数的示例分析,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!一、参数解释0:log buffe...
    99+
    2022-10-18
  • MySQL性能参数的示例分析
    这篇文章主要介绍MySQL性能参数的示例分析,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完! max_connect_errors是一个MySQL中与安全有关的计数器值,它负责阻止过...
    99+
    2022-10-18
  • MYSQL中my.cnf参数的示例分析
    这篇文章主要介绍了MYSQL中my.cnf参数的示例分析,具有一定借鉴价值,感兴趣的朋友可以参考下,希望大家阅读完这篇文章之后大有收获,下面让小编带着大家一起了解一下。mysql常用配置文件参数介绍和使用方...
    99+
    2022-10-18
  • Oracle中out参数的示例分析
    这篇文章主要为大家展示了“Oracle中out参数的示例分析”,内容简而易懂,条理清晰,希望能够帮助大家解决疑惑,下面让小编带领大家一起研究并学习一下“Oracle中out参数的示例分析”这篇文章吧。Ora...
    99+
    2022-10-18
  • $.Ajax()方法参数的示例分析
    这篇文章给大家分享的是有关$.Ajax()方法参数的示例分析的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。Ajax概念AJAX即“Asynchronous Javascript ...
    99+
    2022-10-19
  • JQuery中AJAX参数的示例分析
    这篇文章主要介绍JQuery中AJAX参数的示例分析,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!context类型:Object这个对象用于设置 Ajax 相关回调函数的上下文。也...
    99+
    2022-10-19
  • JVM参数设置的示例分析
    这篇文章主要介绍了JVM参数设置的示例分析,具有一定借鉴价值,感兴趣的朋友可以参考下,希望大家阅读完这篇文章之后大有收获,下面让小编带着大家一起了解一下。 不管是YGC还是Full GC,GC过程中都会对导致程序运行中中断,正确的...
    99+
    2023-06-02
  • Elasticsearch参数配置的示例分析
    小编给大家分享一下Elasticsearch参数配置的示例分析,相信大部分人都还不怎么了解,因此分享这篇文章给大家参考一下,希望大家阅读完这篇文章后大有收获,下面让我们一起去了解一下吧!Elasticsearch的config文件夹里面有两...
    99+
    2023-06-04
  • python选项参数的示例分析
    这篇文章将为大家详细讲解有关python选项参数的示例分析,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。#!c:python26python.exeimport optparsedef main(): &...
    99+
    2023-06-03
  • PHP中函数参数的示例分析
    小编给大家分享一下PHP中函数参数的示例分析,相信大部分人都还不怎么了解,因此分享这篇文章给大家参考一下,希望大家阅读完这篇文章后大有收获,下面让我们一起去了解一下吧!PHP 函数参数可以通过参数向函数传递...
    99+
    2022-10-19
  • ES6函数参数必须的示例分析
    小编给大家分享一下ES6函数参数必须的示例分析,相信大部分人都还不怎么了解,因此分享这篇文章给大家参考一下,希望大家阅读完这篇文章后大有收获,下面让我们一起去了解一下吧!函数参数必须ES6中可以给参数指定默...
    99+
    2022-10-19
  • vue中组件参数的示例分析
    这篇文章给大家分享的是有关vue中组件参数的示例分析的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。1.vue中组件参数我们可以为组件的 prop 指...
    99+
    2022-10-19
  • iframe中各项参数的示例分析
    这篇文章主要为大家展示了“iframe中各项参数的示例分析”,内容简而易懂,条理清晰,希望能够帮助大家解决疑惑,下面让小编带领大家一起研究并学习一下“iframe中各项参数的示例分析”这篇文章吧。ifram...
    99+
    2022-10-19
  • JS解析url查询参数的示例分析
    这篇文章主要介绍了JS解析url查询参数的示例分析,具有一定借鉴价值,感兴趣的朋友可以参考下,希望大家阅读完这篇文章之后大有收获,下面让小编带着大家一起了解一下。具体代码如下所述:var path...
    99+
    2022-10-19
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作