[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [msmtp-users] confused about display name in "from" address specification
On Tue, 02. Jan 2007, 15:51:40 +0000, Philip Wilson wrote:
> I'm using msmtp to talk to Google's SMTP server. I'd like to specify
> the From address as "My Company Name <info@...91...>", i.e.,
> the display name "My Company Name" followed by the actual delivery
> address in angle brackets.
>
> But I can't figure out how to have msmtp pass the full string directly
> to the SMTP server. Rather, it seems to want to treat the whole
> string as the delivery address, and enclose it in angle brackets like
> this: <My Company Name <info@...91...>>. The SMTP server
> legitimately rejects this string.
> (I've tried using both the -f option and the from: line in my config
> file. If I just use info@...91..., the mail is delivered
> normally.)
>
> I can't work out whether this is a limitation of msmtp, or a problem
> with my reading of the docs, or a problem with my understanding of
> SMTP in general. Is there a special trick to include a display name
> with the actual address?
RFC 2821 sections 3.3, 4.1.1.2, and 4.1.2 allow only a "Mailbox" in
brackets in the "MAIL FROM" SMTP command, which means something like
<info@...91...>. Other strings are not allowed.
More informative strings are reserved for the "From:" header of the
mail, which is completely independent from the envelope from address
that is used for the MAIL FROM command.
Sending the following mail with "msmtp -f info@...91..." should
do what you want:
----
From: My Company Name <info@...91...>
Subject: A test.
Some text.
----
Regards,
Martin