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

I get this error when trying load my ASP page : \"Disallowed Parent Path \"

  DETAILS I get the following error when I try to execute my ASP application  Active...

I am using ASP.NET and Internet Explorer Web Controls and it does not work when I open the page. What is wrong?

For Internet Explorer Web Controls to work properly you need to have the required HTML...

How to enable ASP.NET SQL Server Session on your web application

SQLServer mode stores session state in a SQL Server database. Using this mode ensures that...

Sample Code : Connecting to a MySQL database with ASP using a DSN-less connection

  Here is the connection string, you can use to connect to a MySQL database with ASP :...

I get an error 'Server.CreateObject Failed' when I try to use CDONTs. What can I do?

  CDONTs is no longer supported on Windows 2003 server.  Microsoft introduced CDO back...