centos 6.4 通过mail 发送邮件

  1. 从上面的命令看,系统已经安装了mail,对些我们还需要设置一下mail,让它使用外面的邮箱进行发邮件。设置文件是 /etc/mail.rc


2. 我使用的是163邮件,所以设置mail使用163代理发邮件,只需要在  /etc/mail.rc   最后添加两行即可,如下 

set [email protected] smtp=smtp.163.com
set [email protected] smtp-auth-password=sf12y45 smtp-auth=login

3虽然我们设置了linux使用客户端用163的发邮件,可是还需要登陆到邮箱里设置POP3/SMTP/IMAP。

4.发送测试echo test | mail -s test [email protected]

你可能感兴趣的:(centos,发送邮件,6.4,通过mail)