Solved

CDO.Message.1 error '80040220'

Posted on 2004-10-08
5
313 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

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

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 was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
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…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

635 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