How to specific the name for the receipt when using the program 'mail'?
Peng Yu
pengyu.ut at gmail.com
Wed Mar 18 17:58:20 UTC 2015
On Wed, Mar 18, 2015 at 12:31 PM, Nils Kassube <kassube at gmx.net> wrote:
> Peng Yu wrote:
>> Something like the following does not work.
>>
>> echo 'Message body' | mail -s 'Email subject' 'First
>> Last<somebody at example.com>'
>>
>> Does anybody know how to specific the name of the recipient? Thanks.
>
> Works for me - according to [1] you may only use US-ASCII characters for
> the header fields. Are you perhaps using characters from a different
> coding for the name?
I only use ASCII characters.
> [1] <http://en.wikipedia.org/wiki/Email#Header_fields>
Here is the error message after I run the mail command.
send-mail: recipient address First Last<somebody at example.com> not
accepted by the server
send-mail: server message: 555 5.5.2 Syntax error. x135sm8782271oix.25 - gsmtp
send-mail: could not send mail (account default from /home/xxx/.msmtprc)
Can't send mail: sendmail process failed with error code 65
BTW, I have the following ~/.mailrc. But I think msmtp should be
compatible with sendmail. So I guess the problem is not due to msmtp?
~$ cat ~/.mailrc
set sendmail=/usr/bin/msmtp
--
Regards,
Peng
More information about the ubuntu-users
mailing list