Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Persists.MailSender

Status
Not open for further replies.

samy42

Programmer
Oct 12, 2002
1
US
has any one got an example on how to send emails with asp
using Persists.MailSender
many thanks
 
<%
Set Mail = Server.CreateObject(&quot;Persits.MailSender&quot;)
Mail.Host = &quot;smtp.smtp-server.com&quot; ' Specify a valid SMTP server
Mail.From = &quot;sales@veryhotcakes.com&quot; ' Specify sender's address
Mail.FromName = &quot;VeryHotCakes Sales&quot; ' Specify sender's name

Mail.AddAddress &quot;andy@andrewscompany.net&quot;, &quot;Andrew Johnson, Jr.&quot;
Mail.AddAddress &quot;paul@paulscompany.com&quot; ' Name is optional
Mail.AddReplyTo &quot;info@veryhotcakes.com&quot;
Mail.AddAttachment &quot;c:\images\cakes.gif&quot;

Mail.Subject = &quot;Thanks for ordering our hot cakes!&quot;
Mail.Body = &quot;Dear Sir:&quot; & Chr(13) & Chr(10) & _
&quot;Thank you for your business.&quot;

On Error Resume Next
Mail.Send
If Err <> 0 Then
Response.Write &quot;Error encountered: &quot; & Err.Description
End If
%>
Saturday 12.00
im6.gif
im2.gif
im2.gif
20.00
im5.gif
im4.gif
im7.gif
3.00am
im8.gif
Sunday [img http
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top