Knowledgebase: Samples Coding
ASP CDOSYS
Posted by - NA - on 01 October 2010 01:04 PM

Issue

Not sure with settings of  ASP Formmail using CDO.Message component


Symptoms

None


Cause


Lack of knowledge with the Formmail using ASP CDO.Message component


Workaround

STEP 1: Open notepad and paste the following code to an asp file after performing the necessary changes highlighted in red.

Subject - Subject of the Email
FromEmail - Sender Email Address, only from your domain email
ToEmail - Recipient Emaill Address
MessageBody - Email Message Contents
MailServerHostName - Mail Server Hostname

EmailID - One of your Email Login ID
EmailPassword - Password for the selected Email

<%
Set objMessage = CreateObject("CDO.Message")
   objMessage.Subject = "Subject"
   objMessage.From = "FromEmail"
   objMessage.To = "ToEmail"
   objMessage.HtmlBody = "MessageBody"
   objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
   objMessage.Configuration.Fileds.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
   objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "MailServerHostName"
   objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 27
   objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") = "EmailID"
   objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "EmailPassword"
   objMessage.Configuration.Fields.Update
   objMessage.Send
   Response.Write("Sent")

%>


Additional Information

FYI, CDOSYS is a built-in component in ASP. This component is used to send e-mails with ASP.

If you are unable to resolve the problem above, kindly issue a ticket to Support Team.


Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).