Post Reply  Post Thread 
CDOSYS Mail Script
Author Message
Nilesh
Super Moderator
******


Posts: 42
Group: Super Moderators
Joined: Jul 2007
Status: Offline
Reputation: 0
Thank 0
0 was given thank in 0 posts
Post: #1
CDOSYS Mail Script

CDOSYS Mail Script

Following is script by which you can use CDOSYS object to send mails via asp.

The Object (CDO.Message) has several properties and methods that you must know:

.From E-mail address of the sender
.To E-mail address of the recipient
.CC E-mail address of the CC recipient
.Subject Subject of the message
.TextBody Body of the message in plain text
.HTMLBody Body of the message in HTML
.Send Calling this method the message is sent


The following example is the simplest email you can send. As you can see it couldn't be easier:

Quote:
<%
Dim sMsg [/font]
Dim sTo
Dim sFrom
Dim sSubject
Dim sTextBody

sTo = "recipient@maildomain.com"
sFrom = "fromaddress@maildomain.com"
sSubject = "Insert here your subject text"
sTextBody = "Insert here your plain body text"

Dim objMail
'Create the mail object
Set objMail = Server.CreateObject("CDO.Message")

'Set key properties
objMail.From = sFrom
objMail.To = sTo
objMail.Subject= sSubject
objMail.TextBody = sTextBody

'Send the email
objMail.Send

'Clean-up mail object
Set objMail = Nothing
%>


~~~ Cool Buddy ~~~

ADD TO DEL.ICIO.US  ADD TO DIGG  ADD TO FURL  ADD TO NEWSVINE  ADD TO NETSCAPE 
ADD TO TECHNORATI FAVORITES  Technorati ADD TO SQUIDOO  ADD TO WINDOWS LIVE  ADD TO YAHOO MYWEB  ADD TO ASK 
ADD TO REDDIT  ADD TO STUMBLEUPON  ADD TO GOOGLE   

07-15-2007 09:42 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Asp Email Test Script Nilesh 0 785 07-16-2007 08:26 PM
Last Post: Nilesh

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: