<%
' mail object
set msg = Server.CreateOBject( "JMail.Message" )
' logging for debugging, silent for errors
' msg.Logging = true
' msg.Silent = true
' sender
msg.From = "sender@mcraefamily.com"
msg.FromName = "Elmer J. Fudd"
' recipients -- may be used multiple times to add additional recipients
msg.AddRecipient "feedback@mcraefamily.com","Feedback"
msg.AddRecipientCC "feedback@mcraeclan.com","Feedback (clan)"
msg.AddRecipientBCC "feedback@mcraeclan.com","Feedback (again)"
' subject
msg.Subject = "This is the subject of my message"
' create message and add to it
'msg.Body = "Hello," & vbNewLine & vbNewLine & "This is a test."
'msg.AppendText vbNewLine & "Sincerely," & vbNewLine & vbNewLine & "The Web Site"
'HTML email
msg.HTMLBody = "<h2>The message itself</h2><p>This is the message itself.</p>"
msg.appendHTML "<p>This is the text. This is the text. This is the text."
' send message and capture errors
if not msg.Send("mail.mcraefamily.com" ) then
Response.write "<pre>" & msg.log & "</pre>"
else
Response.write "Message sent successfully!"
end if
'close connection
msg.Close
Set msg = Nothing
%> |
Message sent successfully!
|