ASP: the various solutions to send an email

    Sending aemails with ASP can be done through 3 different solutions:

    • Aspemail
    • CDonts
    • CDosys

    ASP: the various solutions to send an email

    Here is an example of sending Email with Aspemail:

    Set objASPEMail = Server.CreateObject ("Persits.MailSender") objASPEMail.Host = "smtp.host.com" objASPEMail.From = email objASPEMail.FromName = sender objASPEMail.AddAddress recipient objASPEMail.Subml.Is object objASPEMail = true objASPEMail. Body = text 'we prevent from giving an error in case of failure to send On Error Resume Next objASPEMail.Send () If Err <> 0 Then Response.Write "This error has occurred:" & Err.Description End If Set objASPEMail = Nothing




    Here is an example with CDonts:

    Set objMail = Server.CreateObject("CDONTS.NewMail") objMail.From=mittente objMail.To=destinatario objMail.Subject=oggetto objMail.BodyFormat=0 objMail.Body=testo objMail.importance=1 objMail.Send Set objMail = nothing

    Here is an example with CDosys:


    Dim Mail set Mail = server.CreateObject ("CDO.Message") With Mail .From = sender .To = recipient .Subject = object .BodyFormat = MailFormat.HTML 'if we want to attach an attached file = server.mappath ("/ folder /file.ext ") .AddAttachment attachment .TEXTBody = text .Send end With set Mail = nothing


    add a comment of ASP: the various solutions to send an email
    Comment sent successfully! We will review it in the next few hours.