XP_SENDMAIL problem after windows trust with exchange server established

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Eric Timely

    XP_SENDMAIL problem after windows trust with exchange server established

    After a trust with exchange server established the xp_SendMail
    gives the following error:

    xp_sendmail: failed with mail error 0x80070005

    Prior to the trust everything worked fine.

    I have tried the following:
    1)Checking SQL and SQLAgents accounts all match up with default mail
    profile.
    2)Confirmed I could send from outlook logged in under the account.
    3)xp_stopmail and xp_startmail
    4)restarted the SQL Agent
    5)Confirmed outlook settings as defined in:
    kb153159 -


    I also tried a pop3 account just to test, but no luck.

    I think what is happening is now that the trust is established when SQL
    makes a mail contection it thinks it is user admin@<otherdom ain> rather
    than admin@<normaldo main> and therefore thinks that agent account is
    different than the mail account.

    Please help if you can.

    Thanks.

  • Greg D. Moore \(Strider\)

    #2
    Re: XP_SENDMAIL problem after windows trust with exchange server established


    "Eric Timely" <enow@consultan t.com> wrote in message
    news:1115654083 .368422.326690@ o13g2000cwo.goo glegroups.com.. .[color=blue]
    > After a trust with exchange server established the xp_SendMail
    > gives the following error:
    >
    > xp_sendmail: failed with mail error 0x80070005
    >
    > Prior to the trust everything worked fine.
    >
    > I have tried the following:
    > 1)Checking SQL and SQLAgents accounts all match up with default mail
    > profile.
    > 2)Confirmed I could send from outlook logged in under the account.
    > 3)xp_stopmail and xp_startmail
    > 4)restarted the SQL Agent
    > 5)Confirmed outlook settings as defined in:
    > kb153159 -
    >[/color]
    http://www.sqlnewsgroups.net/link.as.../153159/EN-US/[color=blue]
    >
    > I also tried a pop3 account just to test, but no luck.
    >
    > I think what is happening is now that the trust is established when SQL
    > makes a mail contection it thinks it is user admin@<otherdom ain> rather
    > than admin@<normaldo main> and therefore thinks that agent account is
    > different than the mail account.
    >[/color]

    That's probably it.

    One tip I've found helpful is to make sure your Outlook agent (or whatever
    MAPI email aganit you're using) has ALL its mailboxes (sent, deleted,
    in,etc)EMPTY

    BTW, if you're simply SENDING email, the most bulletproof thing I've found
    is to setup the IIS SMTP mail server on the same physical box as SQL Server,
    lock it down so only that box can send email through it and point your MAPI
    client to the SMTP server for sending email.

    Since I've done this, I've eliminated the problem of XP_sendmail locking up
    when it tries to send mail and the MAPI client has hung because of a timeout
    waiting for the server it's sending too.

    [color=blue]
    > Please help if you can.
    >
    > Thanks.
    >[/color]


    Comment

    • Eric Timely

      #3
      Re: XP_SENDMAIL problem after windows trust with exchange server established

      Thanks.
      Eventually I deleted the account on the remote domain. Recreated it and
      added permissions (mailbox and security "send as") and everything
      worked.

      We were trying to stay away from an SMTP/POP account for stability and
      security reasons.

      Comment

      Working...