Send mail with JMail component

It is possible to use the JMail component, to send mail via websmtp.simply.com.

Here is an example on how to to that:

<%
set msg = Server.CreateOBject("JMail.Message")
msg.Logging = true
msg.silent = true
msg.Charset = "UTF-8"
msg.From = "admin@xxxxx.com"
msg.FromName = "admin@xxxx.com"
msg.AddRecipient "test@ue-example.com"
msg.Subject = "Your subject"
msg.Body = "Your message"
msg.MailServerUserName = "admin@xxxx.com"
msg.MailServerPassword = "xxxxx"
 
msg.Send("websmtp.simply.com:587")

Response.write "<pre>" & msg.log & "</pre>"

%>

Article from the support category: ASP & ASP.NET