- collection is read only exception
- PayPal sending incorrect carrier information
- paypal guest user notice
- classic asp dictionary not working
- IE8 not supporting innerHTML
- differences between jet and odbc
- sugarcrm not inserting email
- select random records from access
- button click event firing twice
- how to send an email using cdosys
- installing perl on win2003 64 bit
- asp.net page event order
- rewrite rule for subdomains only
- extra items in javascript array
- IE7 margin auto not working
- IE7 border style dotted glitch
- ByRef and ByVal in vbscript
- weather rss feed
- Classic asp crib sheet
- Firefox onsubmit image change
- limit records in access
- AccessDataSource is thick
- double margins in IE6
- extra image padding in html emails
- decimal places in linux flash player
- broken emails in outlook 2007
- double spaced IE list items
- cannot remove movieclip
articles:
how to send an email using cdosys
The basic code to send an email using classic ASP:
<%
Set myMail=CreateObject("CDO.Message")
myMail.Subject="Sending email with CDO"
myMail.From="mymail@mydomain.com"
myMail.To="someone@somedomain.com"
myMail.TextBody="This is a message."
myMail.Send
set myMail=nothing
%>
Properties:
myMail.Subject = "a subject line"
myMail.From = "some person ‹someperson@domain.com›"
myMail.To = "another@address.com"
myMail.Cc = "ccanother@address.com"
myMail.Bcc = "Bccanother@address.com"
myMail.ReplyTo = "a.different@address.com"
myMail.TextBody = "The message"
myMail.HTMLBody = "‹h1›The message with formatting‹/h1›"
Another very useful property that tells CDOSYS whether or not to auto-generate a multi-format message by creating a text portion from the HTML part that you have provided. Its default is False.
myMail.AutoGenerateTextBody = true
Methods:
myMail.CreateHTMLBody "http://www.freewindowshosting.co.uk"
OR
myMail.CreateHTMLBody "file://c:/mydocuments/test.htm"
myMail.AddAttachment "c:\mydocuments\test.txt"
myMail.Send
References:
W3 Schools - ASP Sending e-mail with CDOSYS
ASP FREE - Sending Emails Using CDO in WSH
Steve Schofield Weblog- How do display a "Friendly name"
Comments
There are no comments on this article yet, be the first to leave one
Post a comment
