Haneef Puttur

ASP mail Script for PLESK

Collaboration Data Objects (CDO)

Originally known as Active Messaging, the Collaboration Data Objects (CDO) library allows users to send mails through ASP Scripts.

Collaboration Data Objects (CDO) is Microsoft’s technology for building messaging or collaboration applications or adding these capabilities to existing applications. Part of the Microsoft Exchange Server product, CDO has evolved from what Microsoft formerly called Object Linking and Embedding Messaging and, more recently, Active Messaging.

You would need to change the Email Address in the field myMail.From to any Email Address on the domain name on which you are incorporating the script.

Example:

If your Domain Name is abc.com, then you would define the From Email Address as some-name@abc.com. This Email Address need not be existing on the Mail Server of abc.com, however, the domain name in the myMail.From field has to be yours. You may use an Email Address such as Do_Not_reply@abc.com.

The Email Address in the myMail.To field needs to be changed to your Email Address, where you wish to receive Emails submitted through the form.

Sample Script


Set myMail=CreateObject(“CDO.Message”)
myMail.Subject=”Sending email with CDO”
myMail.From=”something@domainname.com”
myMail.To=”xyz@abc.com”
myMail.TextBody=”This is a message.”
myMail.Configuration.Fields.Item _
(“http://schemas.microsoft.com/cdo/configuration/sendusing”)=2
‘Name or IP of remote SMTP server
myMail.Configuration.Fields.Item _
(“http://schemas.microsoft.com/cdo/configuration/smtpserver”)=”localhost”
‘Server port
myMail.Configuration.Fields.Item _
(“http://schemas.microsoft.com/cdo/configuration/smtpserverport”)=25
myMail.Configuration.Fields.Update
myMail.Send
%>

 

.

Exit mobile version