Sending mail via Persits.MailSender

Here's a complex example of sending an email with SMTP authentication and attachments.

<%

Set Mail = Server.CreateObject("Persits.MailSender")
Mail.Host = "mail.yourdomain.com"
Mail.Username = "emailaddress@yourdomain.com"
Mail.Password = "your password"
Mail.From = "webmaster@yourdomain.com"
Mail.FromName = "Your Name"
Mail.AddAddress "recipient@somedomain.com"
Mail.AddCC "you@yourdomain.com"
Mail.Subject = "Subject goes here"
Mail.Body = "Message body goes here"
On Error Resume Next
Mail.SendToQueue
Set Mail = Nothing

%>

Was this answer helpful?

 Print this Article

Also Read

Is there a limit to the number of email I can send?

Yes,  There is a limit on the number of mail you can send from our server using sendmail....

How to set up email with Outlook Express?

  Follow the steps below to set up Outlook Express to retrieve email from our mail server....

I received a bounced message for an email that I did not send. OR I received a complaint from someone saying I sent a virus, but I didn't send the email. What is going on?

Internet email messages can be forged. The email sender can set their “From:” header...

I get this error when trying to download email: Server Response: '+OK 752 octets follow.', Port: 110, Secure(SSL): No, Error Number: 0x800CCC0F

SummaryIt is a known problem with Outlook / Outlook Express that when a malformed message (i.e.,...

With my email client, I can receive email but I cannot seem to send email. What can I do?

SYMPTOMS When I try send emails I get the error: The connection to the server has failed....