How do I send an e-mail with Smart Mail from my ASP / Plesk website?

Procédure

How do I send an e-mail using the Smart Mail component?

Here is an example of code to send an e-mail with an attachment and the SmartMail component:

On error resume next Dim mySmartMail Set mySmartMail = Server.CreateObject("aspSmartMail.SmartMail") 'Email server mySmartMail.Server = "127.0.0.1" 'Sender mySmartMail.SenderName = "SenderName" mySmartMail.SenderAddress = "expediteur@domaine.com" 'Recipients mySmartMail.Recipients.Add "destinataire1@2plat.com", "RecipientName1" mySmartMail.Recipients.Add "destinataire2@2plat.com", "RecipientName2" 'Message mySmartMail.Subject = "Test aspSmartMail" mySmartMail.Body = "This is a test of the aspSmartMail component." 'Attachment mySmartMail.Attachments.Add ("C:\sample.txt"),, false 'Sending the message mySmartMail.SendMail 'Error handling If err.number <> 0 Then response.write("Error no. " & err.number - vbobjecterror & " = " & err.description & " ") Else Response.Write "Message sent with aspSmartMail " Response.Write mySmartMail.Attachments.Item(1).FilePathName End If 'Destroy object Set mySmartMail = Nothing