Date:  05/03/2018 09:07:03 PM Msg ID:  004948
From:  Joe Goldsmiith Thread:  004942
Subject:  Re: ASPSmartMail
<p>
Great! Thanks!!&nbsp;
</p>
<p>
&nbsp;
Sent by FoxWeb Support on 05/03/2018 08:14:46 PM:
Here&#39;s the code:
&nbsp;
&lt;HTML&gt;
&lt;BODY BGCOLOR=&quot;white&quot;&gt;
&nbsp;
&lt;H1&gt;aspSmartMail : Sample 1&lt;/H1&gt;
&lt;HR&gt;
&lt;%
mySmartMail =CREATEOBJECT(&quot;aspSmartMail.SmartMail&quot;)
&nbsp;
*SMTP Mail Server
mySmartMail.Server = &quot;mail.yourdomain.com&quot;
&nbsp;
*From
mySmartMail.SenderName = &quot;Your Name&quot;
mySmartMail.SenderAddress = &quot;youremail@yourdomain.com&quot;
&nbsp;
*To
mySmartMail.Recipients.Add(&quot;yourfriend@anydomain.com&quot;, &quot;Friend&#39;s name&quot;)
&nbsp;
*Message
mySmartMail.Subject = &quot;aspSmartMail Sample 1&quot;
mySmartMail.Body = &quot;This mail has been sent with aspSmartMail.&quot;
&nbsp;
* Capture send errors
SendFailed = .F.
OldErr = ON(&quot;ERROR&quot;)
ON ERROR SendFailed = .T.
&nbsp;
*Send the message
mySmartMail.SendMail
&nbsp;
* Reset error handler
ON ERROR &amp;OldErr
IF SendFailed
Response.write(&quot;Failed to send e-mail.&nbsp; The error message was:&lt;br&gt;&quot; + MESSAGE())
ELSE
Response.write(&quot;An e-mail has just been sent to &quot; + mySmartMail.Recipients.Item(1).Name)
ENDIF
%&gt;
&lt;/body&gt;
&lt;/html&gt;&nbsp;
&nbsp;
&nbsp;
FoxWeb Support Team
</p>