CDO authentication problem

Discussion in 'ASP General' started by Brett, Jun 30, 2004.

  1. Brett

    Brett Guest

    Can someone explain why the following doesn't work?

    <%
    sch = "http://schemas.microsoft.com/cdo/configuration/"

    Set cdoConfig = CreateObject("CDO.Configuration")

    With cdoConfig.Fields

    ..Item(sch & "smtpserver") = "mail.midvalleyfurniture.com"
    ..item("http://schemas.microsoft.com/cdo/configuration/sendusing").value
    =2
    ..item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate").value
    = 1
    ..item("http://schemas.microsoft.com/cdo/configuration/sendpassword").value
    ="yadayadayada"
    ..item("http://schemas.microsoft.com/cdo/configuration/sendusername").value
    =""

    ..update

    End With

    Set cdoMessage = CreateObject("CDO.Message")

    With cdoMessage
    Set .Configuration = cdoConfig
    .From = ""
    .To = ""
    .Subject = "Daily Report"
    .TextBody = mailMessage

    .Send
    End With

    Set cdoMessage = Nothing
    Set cdoConfig = Nothing
    %>


    If I take out the 3 authentication lines and send an email that's on
    the same domain server ( to ), it
    goes through.
    If outside the domain, I put the 3 lines back in and though I receive
    no error message, the mail doesn't go through.



    Thanks for any help,
    Brett
    Brett, Jun 30, 2004
    #1
    1. Advertising

  2. "Brett" <> wrote in message
    news:...
    > Can someone explain why the following doesn't work?
    >
    > <%
    > sch = "http://schemas.microsoft.com/cdo/configuration/"
    >
    > Set cdoConfig = CreateObject("CDO.Configuration")
    >
    > With cdoConfig.Fields
    >
    > .Item(sch & "smtpserver") = "mail.midvalleyfurniture.com"
    > .item("http://schemas.microsoft.com/cdo/configuration/sendusing").value
    > =2
    >

    ..item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate").val
    ue
    > = 1
    > .item("http://schemas.microsoft.com/cdo/configuration/sendpassword").value
    > ="yadayadayada"
    > .item("http://schemas.microsoft.com/cdo/configuration/sendusername").value
    > =""
    >
    > .update
    >
    > End With
    >
    > Set cdoMessage = CreateObject("CDO.Message")
    >
    > With cdoMessage
    > Set .Configuration = cdoConfig
    > .From = ""
    > .To = ""
    > .Subject = "Daily Report"
    > .TextBody = mailMessage
    >
    > .Send
    > End With
    >
    > Set cdoMessage = Nothing
    > Set cdoConfig = Nothing
    > %>
    >
    >
    > If I take out the 3 authentication lines and send an email that's on
    > the same domain server ( to ), it
    > goes through.
    > If outside the domain, I put the 3 lines back in and though I receive
    > no error message, the mail doesn't go through.
    >
    >
    >
    > Thanks for any help,
    > Brett


    It could be a relaying permission problem. Check with the mail admin that
    the IP of the server trying to initiate the mail session, as well as the
    sendusername, aren't restricted from sending (relaying) mail to recipients
    outside the mailserver's domain.

    Alan
    J. Alan Rueckgauer, Jun 30, 2004
    #2
    1. Advertising

  3. Brett

    Brett Guest

    "J. Alan Rueckgauer" <> wrote in message news:<>...
    > "Brett" <> wrote in message
    > news:...
    > > Can someone explain why the following doesn't work?
    > >
    > > <%
    > > sch = "http://schemas.microsoft.com/cdo/configuration/"
    > >
    > > Set cdoConfig = CreateObject("CDO.Configuration")
    > >
    > > With cdoConfig.Fields
    > >
    > > .Item(sch & "smtpserver") = "mail.midvalleyfurniture.com"
    > > .item("http://schemas.microsoft.com/cdo/configuration/sendusing").value
    > > =2
    > >

    > .item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate").val
    > ue
    > > = 1
    > > .item("http://schemas.microsoft.com/cdo/configuration/sendpassword").value
    > > ="yadayadayada"
    > > .item("http://schemas.microsoft.com/cdo/configuration/sendusername").value
    > > =""
    > >
    > > .update
    > >
    > > End With
    > >
    > > Set cdoMessage = CreateObject("CDO.Message")
    > >
    > > With cdoMessage
    > > Set .Configuration = cdoConfig
    > > .From = ""
    > > .To = ""
    > > .Subject = "Daily Report"
    > > .TextBody = mailMessage
    > >
    > > .Send
    > > End With
    > >
    > > Set cdoMessage = Nothing
    > > Set cdoConfig = Nothing
    > > %>
    > >
    > >
    > > If I take out the 3 authentication lines and send an email that's on
    > > the same domain server ( to ), it
    > > goes through.
    > > If outside the domain, I put the 3 lines back in and though I receive
    > > no error message, the mail doesn't go through.
    > >
    > >
    > >
    > > Thanks for any help,
    > > Brett

    >
    > It could be a relaying permission problem. Check with the mail admin that
    > the IP of the server trying to initiate the mail session, as well as the
    > sendusername, aren't restricted from sending (relaying) mail to recipients
    > outside the mailserver's domain.
    >
    > Alan


    the webserver and the email server are the same machine/same ip.
    sneding email thru the account from a client authenticates fine. the
    asp code does not.

    can MS's smtp server be set up to allow all relays or authenticate
    relays per ip address?
    Brett, Jul 1, 2004
    #3
    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. Anthony Fine
    Replies:
    3
    Views:
    3,168
    Jure Spik
    Feb 12, 2004
  2. Guest
    Replies:
    2
    Views:
    862
    dave wanta
    Jul 11, 2003
  3. Chris V
    Replies:
    0
    Views:
    2,261
    Chris V
    Jan 21, 2004
  4. Phil

    CDO 2000 slow with authentication?

    Phil, Aug 1, 2004, in forum: ASP General
    Replies:
    3
    Views:
    134
  5. Replies:
    0
    Views:
    270
Loading...

Share This Page