当前位置:首页 > 操作系统 > Linux

Linux-萌新之路-发送邮箱

 

一、环境准备

  #使用linux连接至网易邮箱的服务器(需要开启SMTP-设置授权码)发送至其他邮箱

  163邮箱、qq邮箱

二、编写配置文件 /etc/mail.rc

  set from = 邮箱地址

  smtp = smtp.163.com

  set smtp -auth-user = 邮箱账号

  smtp-auth-password = 授权码

  smtp-auth = login

  保存退出  

三、重启服务

  systemctl restart postfix.service 

  echo "测试文件" | mail -s "主题"  [邮箱地址]

  发送文件格式

  mail -s "fiel" [mail@xxx.com] </etc/hosts    --文件的绝对路径

 

原文:https://www.cnblogs.com/tangdapang/p/12240467.html


【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!

相关教程推荐

其他课程推荐