Written by Mr Li2020-10-21
在Linux命令行上发送电子邮件附件的两种方法 Centos7操作系统
帮助手册 Article
你是否有其他方法可以从Linux终端发送带有附件的电子邮件?
总结
其中的-s
:指定邮件主题。-a
:添加附件。
[root@localhost ~]# echo "Message Body Here" | mutt -s "Subject Here" -a anaconda-ks.cfg user@example.com
安装完成,我们可以使用下面发送带附件的邮件:
[root@localhost ~]# yum -y install mutt
安装mutt安装包:
使用mutt命令
[root@localhost ~]# mail -s "Subject here" -t user@example.com -A anaconda-ks.cfg < message.txt
其中的-s
:指定邮件主题。-a
:添加附件。
也可以在文件中保存消息内容,然后使用mail发送:
[root@localhost ~]# echo "Message Body Here" | mail -s "Subject Here" user@example.com -a anaconda-ks.cfg
安装完成,我们可以使用下面发送带附件的邮件:
[root@localhost ~]# yum -y install mailx
安装mailx安装包
使用mail命令
需要有一个工作正常的邮件系统。本文将不介绍如何配置邮件服务器。
本文使用Centos7操作系统。
需求
You may also like
You may be interested
php中的mysql_fetch_row/mysql_fetch_array/mysql_fetch_object的区分区别和使用方法
星期一, 29 7 月 2019By 99122524
1、mysql_fe...
归档
- 2023 年 9 月
- 2023 年 8 月
- 2023 年 7 月
- 2023 年 6 月
- 2023 年 5 月
- 2023 年 4 月
- 2023 年 3 月
- 2023 年 2 月
- 2022 年 11 月
- 2022 年 10 月
- 2022 年 1 月
- 2021 年 12 月
- 2021 年 10 月
- 2021 年 7 月
- 2021 年 4 月
- 2021 年 3 月
- 2021 年 2 月
- 2020 年 11 月
- 2020 年 10 月
- 2020 年 5 月
- 2020 年 4 月
- 2020 年 3 月
- 2020 年 2 月
- 2020 年 1 月
- 2019 年 12 月
- 2019 年 11 月
- 2019 年 10 月
- 2019 年 8 月
- 2019 年 7 月
Calendar
一 | 二 | 三 | 四 | 五 | 六 | 日 |
---|---|---|---|---|---|---|
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 |