Centos7如何发送邮件

 时间:2024-10-13 13:38:01

1、安装sendmail:yum install -y sendmail

Centos7如何发送邮件

2、安装mailx:yum install -y mailx

Centos7如何发送邮件

3、启动sendmail,发现报错:systemctl start sendmail发现是系统中安装了postfix,停止该服务,然后重启sendmail:systemctl stop postfixsystemctl restart sendmail

Centos7如何发送邮件
Centos7如何发送邮件

4、在xshell命令号中输入:echo "this is my test mail" | mail -s 媪青怍牙'mail test' [email protected]请替换成自己的邮箱地址,有的邮箱可能发送不成功,请自行测试。

Centos7如何发送邮件

5、修改/etc/mai.rc,新垢卜埂呦增如下内容:set [email protected](测出是您自己的发件箱)set smtp=smtp.163.comset [email protected](测出是您自己的发件箱)set smtp-auth-password=xxxxxx(此处是邮箱密码或者是授权码)set smtp-auth=login重复步骤4。

Centos7如何发送邮件

6、发送成功,并成功接收。鉴于邮箱本身服务问题,步骤4中可能有些服务商的收件箱收不到邮件或者在垃圾邮件列表。

  • Linux怎么安装软件
  • 怎么解决vmware中虚拟机中无法使用键盘的故障?
  • 如何在ubuntu中安装jdk
  • putty如何设置文本颜色
  • 本地怎样一键安装php的运行环境
  • 热门搜索
    防灾减灾一等奖手抄报 轻叩诗歌的大门手抄报 科技手抄报大全 美丽的家乡手抄报 手抄报安全 平安校园手抄报内容 传统美德手抄报 五城同创手抄报 爱国诚信友善手抄报 关于读书的手抄报资料