ASP for 2003 server (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


rothacher -> ASP for 2003 server (9/14/2004 15:47:16)

could someone please help me! i am needing to convert my cdonts (used on 2000 server) to cdosys (used on 2003 server). we have changed the coding, but the when the user "submits" the order form, the email that is supposed to be generated, sits in the job que. Here is the code we currently have....
'Send using the Pickup directory on the IIS server

Dim iMsg

Dim iConf

Dim Flds

Dim strHTML

Const cdoSendUsingPickup = 1

set iMsg = CreateObject("CDO.Message")

set iConf = CreateObject("CDO.Configuration")

' set the CDOSYS configuration fields to use the SMTP service pickup directory

Set Flds = iConf.Fields

With Flds

.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPickup

.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory") = "c:\inetpub\mailroot\pickup"

.Update

End With

' build HTML for message body

'strHTML = "<HTML>"

'strHTML = strHTML & "<HEAD>"

'strHTML = strHTML & "<BODY>"

'strHTML = strHTML & "<b>"&t&"</b></br>"

'strHTML = strHTML & "</BODY>"

'strHTML = strHTML & "</HTML>"

' apply settings to the message

With iMsg

Set .Configuration = iConf

.To = emailbcc

.Bcc = emailbcc

.From = emailfrom

.Subject = "This is a test CDOSYS message (Pickup directory)"

.HTMLBody = t

' if requestor includes email address then send them confirm email

if trim(emailconfirm) <> "" then .To = emailconfirm end if

.Send

End With

' cleanup of variables

Set iMsg = Nothing

Set iConf = Nothing

Set Flds = Nothing

'***************************************************************************************

response.write t

%>




Spooky -> RE: ASP for 2003 server (9/15/2004 3:39:51)

Try something like this?

				Set oMail = Server.CreateObject(theComponent("CDO.Message"))
				Set iConf = Server.CreateObject("CDO.Configuration")
				Set Flds = iConf.Fields
				iConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 1
				iConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "Localhost"
				iConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 10
				iConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
				iConf.Fields.Update
				Set oMail.Configuration = iConf
				oMail.To 			= strTo
				oMail.From 			= strFrom
				oMail.CC			= strCC
				oMail.Subject 		= strSubject
				oMail.TextBody 		= strBody
				oMail.Send
				Set iConf = Nothing
				Set Flds = Nothing




rothacher -> RE: ASP for 2003 server (9/15/2004 14:33:38)

Thanks! We changed the code to read as below, but it still is not processing the email properly. It still sits in the que...........a person here is going to look into the SMTP configuration and determine if that is the problem. Do you see anything below, in our changed code that would cause any problem?

<%
Set oMail = Server.CreateObject("CDO.Message")
Set iConf = Server.CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
iConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 1
iConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost"
iConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 10
iConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
iConf.Fields.Update
Set oMail.Configuration = iConf
oMail.To = emailbcc
oMail.From = "sbridges@......"
' if requestor includes email address then send them confirm email
'if trim(emailconfirm) <> "" then omail.To = emailconfirm end if
oMail.Subject = emailsubject
oMail.htmlBody = t
oMail.Send
Set omail = nothing
Set iConf = Nothing
Set Flds = Nothing
%>




UFOMike -> RE: ASP for 2003 server (2/8/2005 13:01:21)

Is there any way to tell if a CDONTS or CDOSYS email has actually been sent? I am not using SMTP -- we just use an internal mail server, so we SEND the email and just hope it gets delivered. Sometimes it does, sometimes it doesnt![:(]




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.078125