1.vi /etc/mail.rc 在末尾追加如下内容: set from=user@domain.com //默认对外发送邮件的用户邮箱地址 set smtp=smtp.domain.com //选用默认发送邮件的公共邮件域名 set smtp-auth-user=user@domain.com //默认对外发邮件的用户 set smtp-auth-password=password //对应默认用户的密码 set smtp-auth=login /...
set smtp=smtp.qq.com(qq固定) set smtp-auth-user=qq邮箱账号 set smtp-auth-password=授权码 set smtp-auth=login 注:"="两边无空格 3、报错 1 2 3 4 5 6 [app@127-0-0-1~]# echo"Content"| mail -s"Title"1378943543@qq.com [app@127-0-0-1~]# smtp-server:550User has no permission...
echo “set smtp=your_smtp_server_address” >> ~/.mailrc # 设置SMTP服务器地址 “` 将上述命令中的`your_email_address`替换为你的实际发件人地址,将`your_smtp_server_address`替换为你的实际SMTP服务器地址。 5. 使用mail命令发送和接收邮件:现在已经可以使用mail命令发送和接收邮件了。以下是一些常用的m...
2、编辑mail配置文件,对发件人身份、服务器、端口等进行基本配置,/etc/mail.rc ###vim /etc/mail.rc ## smtp服务器发信的用户名和昵称 set from=nickname<test@tompig.cn> ## smtp服务器的地址 set smtp=smtp://smtp.mxhichina.com ## 邮件认证的方式 set smtp-auth=login ## smtp服务器认证的用户名...
1、安装mail,使用yum install mailx即可直接安装。 2、编辑mail配置文件,对发件人身份、服务器、端口等进行基本配置,/etc/mail.rc ###vim /etc/mail.rc ## smtp服务器发信的用户名和昵称set from=nickname<test@tompig.cn> ## smtp服务器的地址set smtp=smtp://smtp.mxhichina.com ...
set from “your_email@example.com” “` 将”your_email@example.com”替换为你的实际发件人邮箱地址。 ### 2.2 SMTP服务器配置 “` set smtp_server “smtp.example.com” set smtp_port 25 “` 将”smtp.example.com”替换为你的SMTP服务器地址,25是SMTP服务器的默认端口。如果需要使用SSL / TLS加密...
setfrom=psinfomail@163.com smtp=smtp.163.com setsmtp-auth-user=邮箱用户名 smtp-auth-password=邮箱密码 smtp-auth=login 说明: from是发送的邮件地址 smtp是发生的外部smtp服务器的地址 smtp-auth-user是外部smtp服务器认证的用户名 smtp-auth-password是外部smtp服务器认证的用户密码 ...
2、报错信息如下,一般是因为配置smtp-auth-user没有添加邮箱后缀,也就是说user是 userxxx@yyy.com而不是userxxx root@pts/0$ smtp-server:535Error:��ʹ����Ȩ���¼�������뿴:<http://service.mail.qq.com/cgi-bin/help?subtype=1&&id=28&&no=1001256>...
在底部添加:setfrom="xxx@163.com"setsmtp=smtp.163.comsetsmtp-auth-user=xxx@163.comsetsmtp-auth-password=自己填写的授权码setsmtp-auth=login 测试发送 代码语言:javascript 复制 echo-e"你好!n我来看看你n哈哈"|mail-s"测试邮件"shoujianren@163.com ...
smtp: smtp服务器地址 smtp-auth: 指定SMTP的认证方式。默认是LOGIN方式 smtp-auth-user: 指定用户名 smtp-auth-password: 指定密码(163是授权码) 测试 终端输入: echo -e "你好!n我来看看你n哈哈" | mail -s "测试邮件" aahanzi@163.com 到163邮箱中查看收件箱,发现邮件: ...