centos 7 rhel7怎么用mail发送邮件 到163 外部邮箱
2017-11-06 23:14
507 查看
centos7种自带 mail,不用再安装其他软件
1.在mail.rc下配置文件追加以下内容, vim /etc/mail.rc
#163发邮件配置
set from=***@163.com
# ***@163.com 是自己发送方的邮箱
set smtp=smtp.163.com:25
set smtp-auth=login
# 登授权登陆
set smtp-auth-user=****@163.com
#此处还是填写发送方的邮箱
set smtp-auth-password=123456
#此处密码是客户端授权码,不是163邮箱的登陆的密码
set ssl-verify=ignore
set nss-config-dir=/etc/maildbs/
#特别注意上述文件的等号两边不能有空格,否则会出现错误,同时要启动163的smtp服务,并且设置客户端登陆授权密码
2.发送邮件方式
1. mail -s "test" ***@163.com
# -s 邮件主题,按enter后输入自己要发送的邮件内容,Ctrl + d 结束
2 . echo "test" |mail -s "test" ***@163.com
# 用echo 输入数据流, "test3"是邮件的内容
3. mail -s "test" ***@163.com < test.txt
#重定向数据流,test.txt 是文本文件,将test.txt作为发送邮件的内容
4. echo "testa" | mail -s"testb" -a test.txt ***@163.com
#添加附件,"testa" 邮件内容, “testb” 主题, test.txt附件
3查看邮件 命令 mail
1.在mail.rc下配置文件追加以下内容, vim /etc/mail.rc
#163发邮件配置
set from=***@163.com
# ***@163.com 是自己发送方的邮箱
set smtp=smtp.163.com:25
set smtp-auth=login
# 登授权登陆
set smtp-auth-user=****@163.com
#此处还是填写发送方的邮箱
set smtp-auth-password=123456
#此处密码是客户端授权码,不是163邮箱的登陆的密码
set ssl-verify=ignore
set nss-config-dir=/etc/maildbs/
#特别注意上述文件的等号两边不能有空格,否则会出现错误,同时要启动163的smtp服务,并且设置客户端登陆授权密码
2.发送邮件方式
1. mail -s "test" ***@163.com
# -s 邮件主题,按enter后输入自己要发送的邮件内容,Ctrl + d 结束
2 . echo "test" |mail -s "test" ***@163.com
# 用echo 输入数据流, "test3"是邮件的内容
3. mail -s "test" ***@163.com < test.txt
#重定向数据流,test.txt 是文本文件,将test.txt作为发送邮件的内容
4. echo "testa" | mail -s"testb" -a test.txt ***@163.com
#添加附件,"testa" 邮件内容, “testb” 主题, test.txt附件
3查看邮件 命令 mail
相关文章推荐
- CentOS 7 使用外部邮箱 发送邮件和附件—mail,mailx
- 如何在Linux下使用mail命令发送邮件到外部邮箱
- CentOS 6.5 and Ubuntu 14.04 使用外部邮箱发送邮件
- CentOS6.5下调用外部邮箱发送邮件
- centos mail使用外部SMTP发送邮件
- Ubuntu 使用 heirloom-mail 调用外部邮箱 SMTP 服务器发送邮件
- linux下用mail发送邮件利用外部邮箱发送邮件的方法
- CentOS 6.5 and Ubuntu 14.04 使用外部邮箱发送邮件
- Ubuntu 使用 heirloom-mail 调用外部邮箱 SMTP 服务器发送邮件
- SpringEmail 使用 163 邮箱发送邮件报错 MailAuthenticationException: Authentication failed
- 服务器使用阿里云安装的CentOS7, 配置外部邮件服务器,使用mail命令发送邮件
- Linux上通过mail调用外部邮箱发送外部邮件
- 发送邮件到 163、Gmail、QQ 等邮箱时,全丢垃圾箱中怎么办?
- CentOS 6.5 and Ubuntu 14.04 使用外部邮箱发送邮件
- centos7 发送邮件给外部邮箱
- 发送邮件到 163、Gmail、QQ 等邮箱时,全丢垃圾箱中怎么办?
- Linux——使用mail发送邮件给外部邮箱
- Centos7 下配置mail使用163邮箱发送邮件
- [ASP]调用Jmail组件发送邮件过程(绝对能发到126等外部邮箱)