This article was previously published under Q293422
This article has been archived. It is offered "as is" and will no longer be updated.
When SQLMail is set to use a MAPI profile that is configured against a Microsoft Exchange 2000 mailbox, an xp_sendmail command may fail with one of the following error messages:
18025 level 16 state 1 line 0 xp_sendmail failed with mail error 0x80004005
18025 Level 16 State 1 Line 0 xp_sendmail failed with mail error 0x80070005
If you log into the mailbox on the SQL Server server by using a MAPI client, such as Microsoft Outlook, mail is sent successfully. Also, using a Microsoft Exchange 5.5 mailbox, instead of a Microsoft Exchange 2000 mailbox, works successfully.
Exchange 2000 introduces a different security structure, Access Control List (ACL), because it is completely integrated into the Microsoft Windows 2000 Active Directory. This new ACL method requires permission for "Send As" to exist both at the Exchange 2000 Information Store level as well as the Active Directory level. In this case, the SQL Server service account does not have "Send As" rights at the Active Directory level, therefore xp_sendmail fails on the submit of a message.
To make sure that the Active Directory account the MSSQLServer service is logging in as has "Send As" rights on the Exchange 2000 mailbox object in the Active Directory, follow these steps:
Open the Active Directory Users and Computers Snap-In.
Locate the user object directly associated with the Exchange 2000 mailbox and select it.
Right-click to get the properties for this account or mailbox object.
Click the Security tab. (If the Security tab is not showing, select Advanced Features from the View menu; this will show the Security tab.)
In the Security dialog box, click Advanced.
In the Access Control Settings for XXX dialog box, click ADD.
Locate, and then select the Active Directory account that the MSSQLServer service is logging in as.
Make sure that the Apply onto list box is set to This object and all child objects.
In the Permission Entry for XXX dialog box, scroll down in the Permission pane, and under the Allow column, select Send As.
Press OK three (3) times to apply the change on all the open dialog boxes.
This change may take some time to replicate through the Active Directory.