Below is a sample script you can copy and paste in order to test CDOSYS functionality:
<%
Dim MyMail
Set MyMail = CreateObject("CDO.Message")
MyMail.From = "You@YourDomain.com"
MyMail.To = "YouAgain@YourOtherAddress.com"
MyMail.Subject = "Test message using CDOSYS"
MyMail.TextBody ="This is a test email message" & vbcrlf & "sent with CDOSYS"
MyMail.Send
Set MyMail= nothing
Response.Write("Your e-mail has been sent")
%>© 2011-2013 Rackspace US, Inc.
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License

6 Comments
The sample code above needs
<code>
<%
Dim MyMail
Set MyMail = CreateObject("CDO.Message")
MyMail.From = "You@YourDomain.com"
MyMail.To = "YouAgain@YourOtherAddress.com"
MyMail.Subject = "Test message using CDOSYS"
MyMail.TextBody ="This is a test email message" & vbcrlf & "sent with CDOSYS"
MyMail.Send
Set MyMail= nothing
Response.Write("Your e-mail has been sent")
%>
</code>
Re: newlines
Jerred,
I spent many hours trying to test this code. I should have read the comment below that Will made. I would recommend updating the script above, as I am sure other will come across the same issue!
Thanks!
re: newlines
No problem, just thought I
Mail Sensitivity
I've tried cdoMessage.Sensitivity = cdoPrivate, but I'm getting the "object not supported" error.
Many thanks in advance!
Add new comment