Configuring CDOSYS to use SMTP Authentication

Configuring CDOSYS to use SMTP Authentication

Some servers require you to have authentication. The following instructions will assist you in adding authentication code to be used with your CDOSYS mail server.

Step 1: First in your administration go to Everyday Tasks > Advanced > Edit Tables

Step 2: Select configuration from the dropdown menu

Step 3: Select from the top left "Add a Record" and enter the following details in the following page
fieldname - xemailusername
fieldvalue - your email username
fieldgroup - main
fieldyesno - False
message - This is the username used for email authentication
showfield - leave blank
fieldgroup2 - details
Then click Add Record

Now add another option but this time with the following values

fieldname - xemailpassword
fieldvalue - your email password
fieldgroup - main
fieldyesno - False
message - This is the password used for email authentication
showfield - leave blank
fieldgroup2 - details

You have now created the configuration fields that will hold your username and password, these are called xemailusername and xemailpassword

Step4: You will now need to make some modifications to your shopmail.asp file. below approximately line 13
Dim my_fromaddress
add the following code
dim strEmailUser, strEmailPass
strEmailUser = getconfig("xemailusername")
strEmailPass = getconfig("xemailpassword")

In VPASP 6.0, on approximately line 298 of the same file you will find:
flds.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 10

Below this line add the following
flds.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
flds.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") =
strEmailUser
flds.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") =strEmailPass


If you are using VPASP 5.5, you will need to add the following code:


.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") =strEmailUser
.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") =strEmailPass

You have now successfully added code to handle authentication. Your username and password are stored in the configuration values xemailusername and xemailpassword respectively.


Times Viewed:
5508
Added By:
Steve Baldwin
Date Created:
5/31/2006
Last Updated:
11/28/2006