Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

CDO.Message.1 error '80040220'

Posted on 2004-10-08
5
Medium Priority
?
316 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 500 total points
ID: 12260979
0
 
LVL 20

Assisted Solution

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

Expert Comment

by:jitganguly
ID: 12261001
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

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…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

730 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