cdo transport error

Discussion in 'ASP General' started by MadeOfRose, May 2, 2006.

  1. MadeOfRose

    MadeOfRose Guest

    Hi all

    i was using cdo object for sending email to a customers.
    when use win2000 server or windows xp my script works correctly.
    but not on win2003 server r2.

    Different thing on my script is i use external smtp server to send my
    emails.
    for example, i dont use the iis' virtual smtp server. i assign an
    another smtp server
    like smtp.example.com

    what is the different between environments..

    thank you
    MadeOfRose, May 2, 2006
    #1
    1. Advertising

  2. MadeOfRose

    Mike Brind Guest

    MadeOfRose wrote:
    > Hi all
    >
    > i was using cdo object for sending email to a customers.
    > when use win2000 server or windows xp my script works correctly.
    > but not on win2003 server r2.
    >
    > Different thing on my script is i use external smtp server to send my
    > emails.
    > for example, i dont use the iis' virtual smtp server. i assign an
    > another smtp server
    > like smtp.example.com
    >
    > what is the different between environments..
    >
    > thank you


    It's always a good idea to show the code you are using (just the
    relevant parts), details of the error message you are getting, and
    highlight the specific line that throws the error.

    --
    Mike Brind
    Mike Brind, May 2, 2006
    #2
    1. Advertising

  3. MadeOfRose

    MadeOfRose Guest

    Const cdoSendUsingPickup = 1
    Const cdoSendUsingPort = 2
    Const cdoAnonymous = 0
    ' Use basic (clear-text) authentication.
    Const cdoBasic = 1
    ' Use NTLM authentication
    Const cdoNTLM = 2 'NTLM

    ' Create the message object.
    Set objMessage = CreateObject("CDO.Message")
    'Set the from address this would be your email address.
    objMessage.From = """Mehmet gUlden""<>"
    ' Set the TO Address separate multiple address with a comma
    objMessage.To = ""
    ' Set the Subject.
    objMessage.Subject = "An Email From Active Call Center."
    ' Now for the Message Options Part.
    ' Use standared text for the body.
    objMessage.TextBody = _
    "This is some sample message text.." & _
    vbCRLF & _
    "It was sent using SMTP authentication."

    ' Or you could use HTML as:
    ' objMessage.HTMLBody = strHTML

    ' ATTACHMENT : Add an attachment Can be any valid url
    'objMessage.AddAttachment("file://C:\Program Files\Active Call
    Center\Examples\Goodbye.wav")

    ' This section provides the configuration information for the SMTP
    server.
    ' Specifie the method used to send messages.
    objMessage.Configuration.Fields.Item _
    ("http://schemas.microsoft.com/cdo/configuration/sendusing") = _
    cdoSendUsingPort

    ' The name (DNS) or IP address of the machine
    ' hosting the SMTP service through which
    ' messages are to be sent.
    objMessage.Configuration.Fields.Item _
    ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = _
    "mail.server.com" ' Or "mail.server.com"

    ' Specify the authentication mechanism
    ' to use.
    objMessage.Configuration.Fields.Item _
    ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = _
    cdoBasic

    ' The username for authenticating to an SMTP server using basic
    (clear-text) authentication
    objMessage.Configuration.Fields.Item _
    ("http://schemas.microsoft.com/cdo/configuration/sendusername") = _
    "username"

    ' The password used to authenticate
    ' to an SMTP server using authentication
    objMessage.Configuration.Fields.Item _
    ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = _
    "password"

    ' The port on which the SMTP service
    ' specified by the smtpserver field is
    ' listening for connections (typically 25)
    objMessage.Configuration.Fields.Item _
    ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = _
    25

    'Use SSL for the connection (False or True)
    objMessage.Configuration.Fields.Item _
    ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = _
    False

    ' Set the number of seconds to wait for a valid socket to be
    established with the SMTP service before timing out.
    objMessage.Configuration.Fields.Item _
    ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout")
    = _
    60

    ' Update configuration
    objMessage.Configuration.Fields.Update

    ' Use to show the message.
    ' MsgBox objMessage.GetStream.ReadText

    ' Send the message.
    objMessage.Send


    these script gives an transport error when objMessage.Send executed.
    this script works well on XP.Does not working for external mail server
    (mail.server.com)
    on win2003 r2 server

    any help will be great

    thank you
    MadeOfRose, May 3, 2006
    #3
  4. all that error usually means is whatever email server settings and method
    you are trying to use is not valid from where you are trying the code at

    it could be anything from not being able to see the server over the network
    to invalid information, spleeing errors, smtp authentication issues... etc
    etc


    "MadeOfRose" <> wrote in message
    news:...
    > Const cdoSendUsingPickup = 1
    > Const cdoSendUsingPort = 2
    > Const cdoAnonymous = 0
    > ' Use basic (clear-text) authentication.
    > Const cdoBasic = 1
    > ' Use NTLM authentication
    > Const cdoNTLM = 2 'NTLM
    >
    > ' Create the message object.
    > Set objMessage = CreateObject("CDO.Message")
    > 'Set the from address this would be your email address.
    > objMessage.From = """Mehmet gUlden""<>"
    > ' Set the TO Address separate multiple address with a comma
    > objMessage.To = ""
    > ' Set the Subject.
    > objMessage.Subject = "An Email From Active Call Center."
    > ' Now for the Message Options Part.
    > ' Use standared text for the body.
    > objMessage.TextBody = _
    > "This is some sample message text.." & _
    > vbCRLF & _
    > "It was sent using SMTP authentication."
    >
    > ' Or you could use HTML as:
    > ' objMessage.HTMLBody = strHTML
    >
    > ' ATTACHMENT : Add an attachment Can be any valid url
    > 'objMessage.AddAttachment("file://C:\Program Files\Active Call
    > Center\Examples\Goodbye.wav")
    >
    > ' This section provides the configuration information for the SMTP
    > server.
    > ' Specifie the method used to send messages.
    > objMessage.Configuration.Fields.Item _
    > ("http://schemas.microsoft.com/cdo/configuration/sendusing") = _
    > cdoSendUsingPort
    >
    > ' The name (DNS) or IP address of the machine
    > ' hosting the SMTP service through which
    > ' messages are to be sent.
    > objMessage.Configuration.Fields.Item _
    > ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = _
    > "mail.server.com" ' Or "mail.server.com"
    >
    > ' Specify the authentication mechanism
    > ' to use.
    > objMessage.Configuration.Fields.Item _
    > ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = _
    > cdoBasic
    >
    > ' The username for authenticating to an SMTP server using basic
    > (clear-text) authentication
    > objMessage.Configuration.Fields.Item _
    > ("http://schemas.microsoft.com/cdo/configuration/sendusername") = _
    > "username"
    >
    > ' The password used to authenticate
    > ' to an SMTP server using authentication
    > objMessage.Configuration.Fields.Item _
    > ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = _
    > "password"
    >
    > ' The port on which the SMTP service
    > ' specified by the smtpserver field is
    > ' listening for connections (typically 25)
    > objMessage.Configuration.Fields.Item _
    > ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = _
    > 25
    >
    > 'Use SSL for the connection (False or True)
    > objMessage.Configuration.Fields.Item _
    > ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = _
    > False
    >
    > ' Set the number of seconds to wait for a valid socket to be
    > established with the SMTP service before timing out.
    > objMessage.Configuration.Fields.Item _
    > ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout")
    > = _
    > 60
    >
    > ' Update configuration
    > objMessage.Configuration.Fields.Update
    >
    > ' Use to show the message.
    > ' MsgBox objMessage.GetStream.ReadText
    >
    > ' Send the message.
    > objMessage.Send
    >
    >
    > these script gives an transport error when objMessage.Send executed.
    > this script works well on XP.Does not working for external mail server
    > (mail.server.com)
    > on win2003 r2 server
    >
    > any help will be great
    >
    > thank you
    >
    Kyle Peterson, May 3, 2006
    #4
  5. MadeOfRose

    MadeOfRose Guest

    Thanks kyle

    i found the why this problem occur.I was using isa firewall client on
    2003 server.
    when i connect to the internet directly i dont get the problem.

    the interesting part is my winxp had the same configuration with 2003
    server.
    this is has to be win2003 specific error when you use isa firewall
    client.
    MadeOfRose, May 6, 2006
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Guest
    Replies:
    2
    Views:
    875
    dave wanta
    Jul 11, 2003
  2. Lori McDonald
    Replies:
    0
    Views:
    5,733
    Lori McDonald
    Feb 16, 2004
  3. Marina
    Replies:
    1
    Views:
    943
    =?Utf-8?B?bWFkbWFucGllcnJl?=
    Jun 22, 2004
  4. Joe H
    Replies:
    2
    Views:
    3,210
    M. Zeeshan Mustafa
    Jun 23, 2004
  5. Replies:
    0
    Views:
    278
Loading...

Share This Page