Web Hosting and Design by Burton Networks
Google  
 
adodb
cdonts
countries
device reports
domains
e-mail setup
html attributes
html color names
html elements
states
unicode data
web publishing
zip codes

CDONTS.NewMail Object

Sending e-mail using Active Server Pages (ASP) from your Burton Networks hosted web site can be achieved rather easily with the CDONTS.NewMail object. The following code illustrates this object's abilities to send HTML or plain text mail:

<%

'Dim obj_CDONTS...

Dim obj_CDONTS

'Instantiate object...

Set obj_CDONTS = Server.CreateObject("CDONTS.NewMail")

'Set From property...

obj_CDONTS.From = "support@twbii.com"

'Set To property to specify a single To: recipient...

obj_CDONTS.To = "support@twbii.com"

'Set To property to specify multiple To: recipients...

obj_CDONTS.To = "support@twbii.com;contact@twbii.com"

'Set Cc property to specify a single Cc: (carbon copy) recipient...

obj_CDONTS.Cc = "support@twbii.com"

'Set Cc property to specify multiple Cc: (carbon copy) recipients...

obj_CDONTS.Cc = "support@twbii.com;contact@twbii.com"

'Set Bcc property to specify a single Bcc: (blind carbon copy) recipient...

obj_CDONTS.Bcc = "support@twbii.com"

'Set Bcc property to specify multiple Bcc: (blind carbon copy) recipients...

obj_CDONTS.Bcc = "support@twbii.com;contact@twbii.com"

'Set Subject property...

obj_CDONTS.Subject = "CDONTS.NewMail Object"

'Set Importance property for low importance...

obj_CDONTS.Importance = 0

'Set Importance property for normal importance...

obj_CDONTS.Importance = 1

'Set Importance property for high importance...

obj_CDONTS.Importance = 2

'Set MailFormat, BodyFormat and Body properties to send HTML mail...

obj_CDONTS.MailFormat = 0

obj_CDONTS.BodyFormat = 0

Dim str_HTML

str_HTML = str_HTML & "<html>"

str_HTML = str_HTML & "<body bgcolor='black'>"

str_HTML = str_HTML & "<p align='center'>"

str_HTML = str_HTML & "<font color='gold' face='verdana' size='5'>"

str_HTML = str_HTML & "CDONTS.NewMail Object"

str_HTML = str_HTML & "</font>"

str_HTML = str_HTML & "</p>"

str_HTML = str_HTML & "</body>"

str_HTML = str_HTML & "</html>"

obj_CDONTS.Body = str_HTML

'Set MailFormat, BodyFormat and Body properties to send plain text mail...

obj_CDONTS.MailFormat = 1

obj_CDONTS.BodyFormat = 1

obj_CDONTS.Body = "CDONTS.NewMail Object"

'Call Send method to send mail...

obj_CDONTS.Send

'Destroy object after use...

Set obj_CDONTS = Nothing

%>
top...
Valid HTML 4.01! Web Hosting and Design by Burton Networks
Copyright © 2000-2008 Burton Networks, Inc. All rights reserved.
Terms of Use
burtonnetworks.com thomasburton.com twbii.com
web hosting, web design, web site hosting, web site design, website hosting, website design