Help - Search - Members - Calendar
Full Version: Email and CDOSYS
The Planet Forums > Operating Systems > Microsoft Windows
budwaiser
Hi,
Why in you opinion this code works fine

<%
Set objCDOSYSMail = Server.CreateObject("CDO.Message")
Set objCDOSYSCon = Server.CreateObject ("CDO.Configuration")

objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost"
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
objCDOSYSCon.Fields.Update

'Update the CDOSYS Configuration
Set objCDOSYSMail.Configuration = objCDOSYSCon

objCDOSYSMail.From = "xxxx@xxxxxxxxxxxx"
objCDOSYSMail.To = "xxxx@xxxxxxxxxxx"
objCDOSYSMail.Subject = "Your Subject"

'Set the e-mail body format (HTMLBody=HTML TextBody=Plain)
objCDOSYSMail.HTMLBody = "Your message"

objCDOSYSMail.Send

Set objCDOSYSMail = Nothing
Set objCDOSYSCon = Nothing
%>


and this not?

<%

Set cdoConfig=server.CreateObject("CDO.Configuration")

set cdoMessage=Server.CreateObject("CDO.Message")
cdoMessage.Configuration = cdoConfig
cdoMessage.From = "xxxx@xxxxxxxxxx"
cdoMessage.To = "xxx@xxxxxxxxxxx"
cdoMessage.Subject = Request.Form("subject")
cdoMessage.TextBody = Request.Form("body")
cdoMessage.send

Set cdoMessage=Nothing
Set cdoConfig=Nothing

%>

Settings on my dedicated are wrong?

PLEASE HELP ME!!
budwaiser
Anyone?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.