Date:  05/03/2018 09:07:03 PM Msg ID:  004948
From:  Joe Goldsmiith Thread:  004942
Subject:  Re: ASPSmartMail
Great! Thanks!!&nbsp;
Sent by FoxWeb Support on 05/03/2018 08:14:46 PM:
Here&#39;s the code:
&lt;BODY BGCOLOR=&quot;white&quot;&gt;
&lt;H1&gt;aspSmartMail : Sample 1&lt;/H1&gt;
mySmartMail =CREATEOBJECT(&quot;aspSmartMail.SmartMail&quot;)
*SMTP Mail Server
mySmartMail.Server = &quot;;
mySmartMail.SenderName = &quot;Your Name&quot;
mySmartMail.SenderAddress = &quot;;
mySmartMail.Recipients.Add(&quot;;, &quot;Friend&#39;s name&quot;)
mySmartMail.Subject = &quot;aspSmartMail Sample 1&quot;
mySmartMail.Body = &quot;This mail has been sent with aspSmartMail.&quot;
* Capture send errors
SendFailed = .F.
OldErr = ON(&quot;ERROR&quot;)
ON ERROR SendFailed = .T.
*Send the message
* 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())
Response.write(&quot;An e-mail has just been sent to &quot; + mySmartMail.Recipients.Item(1).Name)
FoxWeb Support Team