We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >

The "SendUsing" configuration value is invalid. [Answered]RSS

6 replies

Last post Jun 11, 2010 04:52 PM by drmonal86

  • The "SendUsing" configuration value is invalid.

    Oct 04, 2007 09:48 AM|lipos|LINK

    I'm working on a form html form that uses asp. After submitting the content on html webpage i see something like this:

     

    CDO.Message.1 error '80040220'

    The "SendUsing" configuration value is invalid.

     

     This is a code for this website:

     

    <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
    <%
    Dim objCDOMail    'Hold the CDONTS NewMail Object
    Dim EmailBody, txtEmailFrom, txtEmailTo, txtEmailSubject
    Set objCDOMail = Server.CreateObject("CDO.Message")



    If Request.Form("txtEmail") = "" then
        txtEmailFrom = "server"
    Else
        txtEmailFrom = Request.Form("txtEmail")
    End If

        txtEmailTo = "some email address"

        txtEmailSubject = "Website Inquiry"

        EmailBody = "You have received a website inquiry." & vbCrLf & vbCrLf
        EmailBody = EmailBody & "Name: " & Request.Form("txtName") & vbCrLf
        EmailBody = EmailBody & "Company: " & Request.Form("txtCompany") & vbCrLf & vbCrLf
        EmailBody = EmailBody & "Address: " & Request.Form("txtAddress1") &  vbCrLf
        If Request.Form("txtAddress2") <> "" then
        EmailBody = EmailBody & Request.Form("txtAddress2") & vbCrLf
        End IF
        EmailBody = EmailBody & Request.Form("txtCity") & ", " & Request.Form("txtTheState") & ", " & Request.Form("txtZip") & vbCrLf & vbCrLf
        If Request.Form("txtTelephone") <> "" then
        EmailBody = EmailBody & "Telephone: " & Request.Form("txtTelephone")& vbCrLf
        End If
        EmailBody = EmailBody & "Email: " & Request.Form("txtEmail")& vbCrLf & vbCrLf
        EmailBody = EmailBody & "Financing Need: "  & Request.Form("txtFINANCING_NEED")& vbCrLf


    objCDOMail.From = txtEmailFrom
    objCDOMail.To = txtEmailTo
    objCDOMail.Subject = txtEmailSubject
    objCDOMail.TextBody = EmailBody
    objCDOMail.Send

    Set objCDOMail = Nothing
    %>


    Website was moved form one server to another. I assume that this has something to do with SMTP, but I'm not able to figure out how to add the IP address for the server in mu network.

    Any ideas? 

  • Re: The "SendUsing" configuration value is invalid.

    Oct 04, 2007 10:00 AM|jeff@zina.com|LINK

    Try this format:

    <%
    Set myMail=CreateObject("CDO.Message")
    myMail.Subject="Sending email with CDO"
    myMail.From="mymail@mydomain.com"
    myMail.To="someone@somedomain.com"
    myMail.TextBody="This is a message."
    myMail.Configuration.Fields.Item _
    ("http://schemas.microsoft.com/cdo/configuration/sendusing")=2
    'Name or IP of remote SMTP server
    myMail.Configuration.Fields.Item _
    ("http://schemas.microsoft.com/cdo/configuration/smtpserver") _
    ="smtp.server.com"
    'Server port
    myMail.Configuration.Fields.Item _
    ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") _
    =25 
    myMail.Configuration.Fields.Update
    myMail.Send
    set myMail=nothing
    %>
    It's from:  http://www.w3schools.com/asp/asp_send_email.asp
    Send using is either port or pickup, but if there's no local SMTP service then neither works.  In this code, smtp.server.com is the FQDN of your mail server, or it can be the IP address.  That you can get from your administrator.
    Jeff
    Have you Binged a solution before posting?
  • Re: The "SendUsing" configuration value is invalid.

    Oct 05, 2007 02:11 PM|lipos|LINK

    You will go to heaven some day :)

    It's working great.

    Thx! 

  • Re: The "SendUsing" configuration value is invalid.

    Feb 06, 2009 12:30 PM|dmelgarejo|LINK

    worked great!!! thanks a lot

  • Re: The "SendUsing" configuration value is invalid.

    Jan 31, 2010 09:26 AM|sitdap|LINK

    Worked great, thanks, you saved my afternoon!

  • Re: The "SendUsing" configuration value is invalid.

    Feb 17, 2010 01:45 PM|AllanThiago2005|LINK

    Hi Jeff, I'm getting trouble with the CDO. I am using the same code you posted, and the error is in the line: myMail.send

    The error is '80040213'

    Ttransport connection to the server failed

    Can you help me please? I've tried several other examples usind CDONTS and CDO, but I am not having success.

    Thank you very much.

    Carlos 

     

  • Re: The "SendUsing" configuration value is invalid.

    Jun 11, 2010 04:52 PM|drmonal86|LINK

     Hi Jeff,

                     You will have to check for your smtp server name: Ask your company for that.