1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

error: -2147220973 - The transport failed to connect to the server

Discussion in 'C#' started by bbxrider, Nov 28, 2008.

  1. #1
    just a moved script that worked ok on one site to a new site.
    the new site with the exact same code gives the transport error.
    the cdo code is what i call the full boat, it has all the parameters i have found:
    dim objMessage
    Set objMessage = CreateObject("CDO.Message")
    objMessage.Subject = "volunteer app for " & firstName & " " & lastName
    objMessage.from = fromVariable
    objMessage.sender = fromVariable
    objMessage.To = toEmail
    objMessage.TextBody = "great news.... here's another volunteer application"
    objMessage.AddAttachment appsPath & "\" & firstName & "." & lastNameFile & ".vcf"
    objMessage.AddAttachment appsPath & "\" & firstName & "." & lastNameFile & ".pdf"
    objMessage.Configuration.Fields.Item _
    ("schema url changed so i can post/sendusing") = 2

    'Name or IP of Remote SMTP Server
    objMessage.Configuration.Fields.Item _
    ("schema url changed so i can post/smtpserver") = "mail.someDomain.com"

    'Type of authentication, NONE, Basic (Base64 encoded), NTLM
    objMessage.Configuration.Fields.Item _
    ("schema url changed so i can post/smtpauthenticate") = 1

    'Your UserID on the SMTP server
    objMessage.Configuration.Fields.Item _
    ("schema url changed so i can post/sendusername") = "myusername"

    'Your password on the SMTP server
    objMessage.Configuration.Fields.Item _
    ("schema url changed so i can post/sendpassword") = "mypassword"

    'Server port (typically 25)
    objMessage.Configuration.Fields.Item _
    ("schema url changed so i can post/smtpserverport") = 25

    'Use SSL for the connection (False or True)
    objMessage.Configuration.Fields.Item _
    ("schema url changed so i can post/smtpusessl") = False

    'Connection Timeout In Seconds (The Maximum Time CDO Will Try To Establish A Connection To The SMTP Server)
    ObjMessage.Configuration.Fields.Item _
    ("schema url changed so i can post/Smtpconnectiontimeout") = 60
    objMessage.Configuration.Fields.update
    objMessage.Send

    now here's the weird part to me anywayat the new site, what i call the short cdo version works!!!! see below
    dim objmessage
    Set objMessage = server.CreateObject("CDO.Message")
    objMessage.Subject = "volunteer app for " & firstName & " " & lastName
    objMessage.from = fromVariable
    objMessage.To = toEmail
    objMessage.TextBody = "great news.... here's another volunteer application"
    objMessage.AddAttachment appsPath & "\" & firstName & "." & lastNameFile & ".vcf"
    objMessage.AddAttachment appsPath & "\" & firstName & "." & lastNameFile & ".pdf"
    objMessage.Send

    anybody know what could cause this? the new site is happy to send/relay email without authentication? since i'm able to send the emails, i don't need a solution but i expect this to come up again and when dealing with support at the various hosting sites, it will help for me to understand why these differences exist.
    i vividly remember how i started with the 'short cdo version' at the first site and it wouldn't work, until i added all the other parms, and even with all the configuration fields it still didn't work until i had both .from and .sender
    bbxrider, Nov 28, 2008 IP