Article ID: 296098 - View products that this article applies to.
This article was previously published under Q296098
This article has been archived. It is offered "as is" and will no longer be updated.
BUG #: 353394 (SHILOH_BUGS)
The xp_sendmail extended stored procedure may raise the following error if you try to send query results by e-mail using the @attach_results parameter from SQL Server 2000 Personal Edition:
This problem does not occur when SQL Server 2000 Personal Edition is installed on Microsoft Windows 2000 Professional.
Server: Msg 18024, Level 16, State 1, Line 0
xp_sendmail: failed with operating system error 87
To resolve this problem, obtain the latest service pack for SQL Server 2000. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/290211/EN-US/ )INF: How to Obtain the Latest SQL Server 2000 Service Pack
Microsoft has confirmed that this is a problem in SQL Server 2000. This problem was first corrected in SQL Server 2000 Service Pack 1.
The @attach_results parameter is an optional parameter for xp_sendmail which specifies that the result set of a valid query should be sent in e-mail as an attached file instead of being appended to the message. The default value for @attach_results is FALSE, which means that the query result set is appended to the message. If the @attachments optional parameter for xp_sendmail is not NULL and @attach_results is TRUE, the first file name in @attachments is used as the file name for the query results. If @attachments is NULL, a file name is generated with a .txt extension.
Steps to Reproduce BehaviorExecute the following statements in Query Analyzer after replacing <valid_email_address> with a valid email address:
The correct results on executing the code should be as follows:
Article ID: 296098 - Last Review: October 23, 2013 - Revision: 3.3