Solved

CDO.Message.1 error '80040220'

Posted on 2004-10-08
5
312 Views
Last Modified: 2012-05-05
CDO.Message.1 error '80040220'

The "SendUsing" configuration value is invalid.

/scripts/subscribe.asp, line 52

We recently upgraded our ISP account and have to use CDO now with our suscribe.asp.
I have had some help but the script still isn't working.
I have read other help and it's almost as if my ISP has not given me the correct SMTP server name.
I have also received the '80070003' regarding can't find the path specified.
Are both these pointing to the fact that the SMTP server name is wrong?
Or is it something else?
Thank you,
-tlb

<%@LANGUAGE="VBSCRIPT"%>
<%
Const cdoSendUsingMethod                        =            "http://schemas.microsoft.com/cdo/configuration/sendusing"
Const cdoSendUsingPort                              = 2
Const cdoSMTPServer                                          =            "http://schemas.microsoft.com/cdo/configuration/smtpserver"
Const cdoSMTPServerPort                              =            "http://schemas.microsoft.com/cdo/configuration/smtpserverport"
Const cdoSMTPConnectionTimeout      =            "http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout"
Const cdoSMTPAuthenticate                        =            "http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"
Const cdoBasic                                                      = 1
Const cdoSendUserName                                    =            "http://schemas.microsoft.com/cdo/configuration/sendusername"
Const cdoSendPassword                                    =            "http://schemas.microsoft.com/cdo/configuration/sendpassword"

Dim Mailer
Dim iConf
Dim Flds

If Session("req_sent") <> "1" Then
      Set Mailer = Server.CreateObject("CDO.Message")
      Set iConf = Server.CreateObject("CDO.Configuration")
      
      Set Flds = iConf.Fields
      With Flds
            .Item(cdoSendUsingMethod)                        = cdoSendUsingPort
            .Item(cdoSMTPServer)                                    = "mail-fwd.com"
            .Item(cdoSMTPServerPort)                        = 25
            .Item(cdoSMTPconnectiontimeout) = 10
'            .Item(cdoSMTPAuthenticate)                  = cdoBasic
'            .Item(cdoSendUserName)                              = "USERNAME"
'            .Item(cdoSendPassword)                              = "PASSWORD"
            .Update
      End With

      Mailer.From = """" & Trim(Request.Form("FirstName")) & " " & Trim(Request.Form("LastName")) & """ <" & Trim(Request.Form("Email")) & ">"
      Mailer.Subject = "subscribe polb.com"
      Mailer.TextBody = "Tielines: " & Request.Form("Tielines") & VbCrLf & _
                                                            "Interchange: " & Request.Form("News_Bulletins") & VbCrLf & _
                                                            "re_port: " & Request.Form("re_port") & VbCrLf & _
                                                            "Annual Report: " & Request.Form("Annual_Report") & VbCrLf & _
                                                            "Fact Card: " & Request.Form("Fact_Card") & VbCrLf & _
                                                            "Port Directory: " & Request.Form("Economic_Impact") & VbCrLf & _
                                                            "Master Plan: " & Request.Form("Master_Plan") & VbCrLf & _
                                                            "Contact: " & Request.Form("LastName") & ", " & Request.Form("FirstName") & VbCrLf & _
                                                            "         " & Request.Form("Company") & VbCrLf & _
                                                            "         " & Request.Form("Address") & VbCrLf & _
                                                            "         " & "Suite " & Request.Form("Suite") & VbCrLf & _
                                                            "         " & Request.Form("City") & ", " & Request.Form("State") & " " & Request.Form("Zip") & VbCrLf & _
                                                            "         " & Request.Form("Country") & VbCrLf & _
                                                            "Email: " & Request.Form("Email")
      
      Mailer.To = """Webmaster"" <subscribe@polb.com>"

      Mailer.Send

      If Err.Number = 0 Then
            Session("req_sent") = "1"
            Response.Redirect("http://www.polb.com/html/1_about/thankyou.html")
      Else
            Session.Contents.Remove("req_sent")
            Response.Write("<meta http-equiv=""Refresh"" content=""20; url=" & Request.ServerVariables("HTTP_REFERER") & """><p>You must provide a valid email address.")
      End If
Else
      Response.Write("<meta http-equiv=""Refresh"" content=""20; url=" & Request.ServerVariables("HTTP_REFERER") & """><p>Please subscribe only once." & Session("mail_sent"))
End If

Set Mailer = Nothing
%>
0
Comment
Question by:DougAlbrecht
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 6

Accepted Solution

by:
masirof earned 125 total points
ID: 12260979
0
 
LVL 20

Assisted Solution

by:jitganguly
jitganguly earned 125 total points
ID: 12260985
0
 
LVL 20

Expert Comment

by:jitganguly
ID: 12261001
0

Featured Post

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question