<MvSMTP>

 
Sends email TO an email address FROM an email address using the SMTP protocol and optionally a copy CC to one or more email addresses. You may specify a SUBJECT. MAILHOST must contain the domain name or IP address of the SMTP server.
Syntax
<MvSMTP FROM = "string: { expression } | string: { expression }"
        TO = "string: { expression } | literal"
        CC = "string: { expression } | literal"
        SUBJECT = "string: { expression } | literal"
        FLAGS = "string: { expression } | literal"
        MAILHOST = "string: { expression } | literal"
        PORT = "string: { number } | literal number"
        USERNAME = "string: { expression } | literal"
        PASSWORD = "string: { expression } | literal"> 
</MvSMTP>
  • Closed Tag
User Annotations: MvSMTP
Ben Walsh : ben at, benwalsh d0t com
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>