Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
May 21, 2012, 05:52:53 AM

Pages: [1]   Go Down
  Print  
Author Topic: I need help. CDOSYS and CDONTS  (Read 788 times)
LLNichol
Newbie
*
Offline Offline

Posts: 1


« on: June 19, 2006, 07:11:22 AM »

The program I used to set up my website uses CDONTS for email handling. Lunar Pages does not support this format. I need to rewrite some ASP pages, but don't have the foggiest notion where to start. 'Tis Greek to me. Give me a database anytime.
Any assistance would be appreciated.
Thanks
Logged
Danielle
Guest
« Reply #1 on: June 19, 2006, 07:18:06 AM »

Hi LLNichol,

For CDOSYS on Windows, you could use the following example:

Code:
<%@ Language=VBScript %>
<%
Dim iMsg
Dim iConf
Dim Flds
Dim strHTML
Dim strSmartHost
Const cdoSendUsingPort = 2
StrSmartHost = "localhost"
set iMsg = CreateObject("CDO.Message")
set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
With Flds
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strSmartHost
.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 10
.Update
End With
strBody = "This is a test of sending an email via ASP" & vbCrLf & vbCrLf
strBody = strBody & "This is line 2. " & vbCrLf
strBody = strBody & "you can have as many as you want" & vbCrLf
strBody = strBody & "THIS IS AN AUTOMATED EMAIL - PLEASE DO NOT REPLY"
' apply the settings to the message
With iMsg
Set .Configuration = iConf
.To = "touser@domain.com"
.From = "user@domain.com"
.Subject = "This is a test message from an ASP Email"
.textbody = strBody
'redirect code goes here
.Send
End With
' cleanup of variables
Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing
%>

There are a few things you need to change, namely the to and from addresses, and the mail server that should be used. The MS URLs need to be left in.

Have a Blessed Day
Logged
support3
Newbie
*
Offline Offline

Posts: 5


« Reply #2 on: August 09, 2006, 08:03:39 AM »

I cannot find any information on what mail host to use for my CDO pages.  I need to get a CDO working before I transfer my domain.

Thanks in advance.

-Support3
Logged
Danielle
Guest
« Reply #3 on: August 09, 2006, 12:44:30 PM »

In the above example, it is using localhost (StrSmartHost = "localhost"), so you dont have to change the mail host?  If you mean the from email address, then you could likely put anything there and it would still send.  You should first try doing that and testing it just to see what happens.
Logged
Pages: [1]   Go Up
  Print  
 
Jump to: