CDOSys- SendUsing config value is invalid

Discussion in 'Classic ASP' started by dsjackson, Sep 15, 2004.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. I am trying to write an email form using cdosys, but I am getting the following error
    -The "SendUsing" configuration value is invalid

    It seems like everybody in the world is having this problem. I've looked through a ton of post and tried everything. Following is my code:

    set objMail=Server.CreateObject("CDO.Message")
    set cdoConfig = Server.CreateObject("CDO.Configuration")
    With cdoConfig.Fields
    .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mysmtp.server.com"
    .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
    .Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
    .Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "username"
    .Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "password"
    .Update
    End With

    With objMail
    .SUBJECT = "Help Form"
    .SENDER = "[email protected]"
    .TO = "[email protected]"
    .HTMLBody = "Email body"
    .Send
    End With
    set objMail = Nothing
    set cdoConfig = Nothing


    Unless I am missing something obvious, I think it has something to do with smtp authentication. Any help would be greatly appreciated.

    Dave
     
  2. I can't use localhost. I don't have smtp installed on the server I am working off of. I am bouncing it off a valid smtp mail server and authenticating with a valid sign on (username and password).
     
  3. Takeshi Eto

    Takeshi Eto DiscountASP.NET Staff

    Web applications that email and our uploaded to DiscountASP.NET web servers need to use "localhost" as the SMTP host.

    DiscountASP.NET
    http://www.DiscountASP.NET
     
  4. this worked for us. put this line in:
    with MyMessage
    .to = blah blah blah
    .from = .....
    .Fields.Add(http://schemas.microsoft.com/cdo/configuration/smtpauthenticate, 2)
    end with

    apparently this forces NTLM authentication when relaying through exchange virtual smtp server, or IIS virtual smpt server.
    0=basic
    1=something else
    2=NTLM authentication
    if this works for you, spread the word through other forums, cuz we spent tonns of time trying to figure this error out.
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page