sta*_*ack 3 email mail-server 14.04
我从我的服务器发送电子邮件是这样的:
echo "This is the body of the email" | mail -s "This is the subject line" user@example.com
Run Code Online (Sandbox Code Playgroud)
注意到我user@example.com
用真实的电子邮件地址替换。它有效。我只想知道,这个昵称是怎么来的?
我在服务器上使用 ubuntu 14.04,我想知道如何更改该名称?
不要使用mail
,有更好的命令行 MUA,例如mailx
(package bsd-mailx
) 或mutt
.
mailx
将用-r
标志做你想做的事:
echo Test. | mailx -r "Joe Sender <sender@domain.com>" -s Test recipient@domain.com
Run Code Online (Sandbox Code Playgroud)
顺便说一下,您也可以为收件人指定一个显示名称。
例如,在 gmail.com 中显示的昵称来自于From
外部的字段部分<sender@domain.com>
,因此在本例中它将是 Joe Sender。
归档时间: |
|
查看次数: |
5491 次 |
最近记录: |