Registrations are now open. Join us today!
There is still a lot of work to do on the wiki yet! More information about editing can be found here.
Already have an account?

Microsoft KB Archive/820220

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 18:06, 18 July 2020 by 3155ffGd (talk | contribs) (importing KB archive)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Knowledge Base


PRB: 0x80070005 or 0x80040005 Error Occurs When You Send E-Mail by Using the Xp_sendmail Extended Stored Procedure

Article ID: 820220

Article Last Modified on 5/8/2003



APPLIES TO

  • Microsoft SQL Server 2000 Standard Edition



SYMPTOMS

When you use the xp_sendmail extended stored procedure to send e-mail from SQL Mail with SQL Server 2000, you might receive one of the following error messages:


Server: Msg 18025, Level 16, State 1, Line 0
xp_sendmail: failed with mail error 0x80070005


-or-



Server: Msg 18025, Level 16, State 1, Line 0
xp_sendmail: failed with mail error 0x80040005

CAUSE

The alias name of the Microsoft Exchange 2000 mailbox that is configured for the SQL Mail profile contains special characters such as a period ("."), or the at sign (@). For example, Sql.mail.

WORKAROUND

To work around the problem, create a new Microsoft Exchange 2000 mailbox with an alias that does not contain any special characters, and then configure the mailbox for the SQL Mail profile.

MORE INFORMATION

SQL Mail uses extended MAPI for submitting e-mail messages to the MAPI spooler for delivery (SubmitMessage API call). The SubmitMessage procedure tries to parse the alias name, and it truncates the alias name when the procedure encounters a special character. Because the alias name is truncated, MAPI cannot find a mailbox or security credentials, or both, to match with the mailbox. Hence, you might receive an "access denied", 0x80070005, or 0x80040005 error.

When you use the Microsoft Outlook client on a computer that is running SQL Server, and you use the SQL Server Agent to send e-mail messages, the delivery of the messages is not affected by this configuration. SQL Agent Mail and Microsoft SQL Server 7.0 SQL Mail use the Simple MAPI API call to perform xp_sendmail operations. The Simple MAPI method (MAPISendMail API call) for delivering e-mail is not affected by the special characters.

REFERENCES

For additional information, click the following article numbers to view the articles in the Microsoft Knowledge Base:

293422 PRB: xp_sendmail Using a Microsoft Exchange 2000 Mailbox Fails with Mail Error 0x80004005 or 0x80007005


811035 PRB: The xp_sendmail Stored Procedure Fails with Error 0x80070005 When the Mailbox of the SQL Mail Profile is Different From the MSSQLServer Service Startup Domain Account Default Mailbox


Keywords: kberrmsg kbsqlservmail kbprb KB820220