12/27/2011 14:03 p.m.
Adding Friendly "From" Name e.g. John Doe
If you're looking to add friendly names to your FROM address, e.g. "John Doe <john@doe.com>", the following is a working example that is compatible with most popular servers, including Exchange, Sendmail, and services such as Gmail, Yahoo and MSN.
<MvCOMMENT>It is important clear output level to avoid inserting blank space or line feeds into the wrong areas of the MvSMTP function</MvCOMMENT>
<MIVA
STANDARDOUTPUTLEVEL
=""
>
<MvCOMMENT>"From" address contains "John Doe" in parenthesis for friendly name</MvCOMMENT>
<MvASSIGN
NAME
="
l.to
"
VALUE
="
{ 'test@example.com' }
>"
<MvASSIGN
NAME
="
l.from
"
VALUE
="
{ 'john@doe.com(John Doe)' }
>"
<MvASSIGN
NAME
="
l.subject
"
VALUE
="
{ 'Testing' }
>"
<MvASSIGN
NAME
="
l.server
"
VALUE
="
{ 'localhost' }
>"
<MvASSIGN
NAME
="
l.lf
"
VALUE
="
{asciichar(13) $ asciichar(10)}
>"
<MvSMTP
TO
="
{ l.to }
"
FROM
="
{ l.from }
"
SUBJECT
="
{ l.subject }
"
MAILHOST
="
{ l.server }
>"
<MvEVAL
EXPR
="
{ l.lf $ 'Message Body' }
>"
</MvSMTP>