You can send e-mails via ASP via the CDO object, using the following piece of code:

<%
     Set mijnMail = CreateObject("CDO.Message")
     mijnMail.Subject = "My Message"
     mijnMail.From = "name@domain.be"
     mijnMail.To = "receiver@domain.be"
     mijnMail.TextBody = "Dear receiver," & VbCrLf & "This is a simple message!"
 
     mijnMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
     mijnMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost"
     mijnMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
     mijnMail.Configuration.Fields.Update
 
     mijnMail.Send
     Set mijnMail = Nothing
%>

The combination VbCrLf matches a new line.

Kunnen we je nog ergens anders mee helpen?

Bel of mail ons. We helpen je snel met een antwoord.

Contacteer ons