Microsoft KB Archive/152415

= PRB: sp_processmail Gets Ambiguous Recipient Error =

Article ID: 152415

Article Last Modified on 11/14/2003

-

APPLIES TO


 * Microsoft SQL Server 6.0 Standard Edition
 * Microsoft SQL Server 6.5 Standard Edition
 * Microsoft SQL Server 7.0 Standard Edition

-



This article was previously published under Q152415



BUG #: 13309 (SQLBUG_60)



SYMPTOMS
The system stored procedure sp_processmail can fail to reply to a message sent to the SQL Server if the sender uses an ambiguous e-mail address.



CAUSE
Suppose there are the following two email addresses, "SQL" and "SQLSERVER." If e-mail user "SQL" sends a message to a SQL Server that has sp_processmail running, SQL Server will receive the message, but SQL Server fails in sending a reply because the intended recipient's address is ambiguous. The address is ambiguous because e-mail address resolution says that both "SQL" and "SQLSERVER" are possibilities for the address "SQL."



WORKAROUND
To work around this problem, either:
 * Make sure that there are no ambiguous e-mail addresses. -OR-


 * Modify the sp_processmail stored procedure to perform the xp_sendmail back to the value of @originator_address instead of @originator.

NOTE: If you are running SQL Server 6.0, you must install SQL Server 6.0 Service Pack 3 or above in order to use this second workaround.



MORE INFORMATION
Here is the updated documentation of xp_readmail:   Syntax xp_readmail ([@msg_id = msg_id] [, @type = type [OUTPUT]] [, @peek =  {'true' | 'false'}]   [, @suppress_attach = {'true' | 'false'}]   [, @originator = @sender OUTPUT]   [, @subject = @subject_line OUTPUT]   [, @message = @body_of_message OUTPUT]   [, @recipients = @recipient_list OUTPUT]   [, @cc_list = @cc_list OUTPUT]   [, @bcc_list = @bcc_list OUTPUT]   [, @date_received = @date OUTPUT]   [, @unread = {'true' | 'false'} OUTPUT]   [, @attachments = @temp_file_paths OUTPUT]) [, @skip_bytes = @bytes_to_skip OUTPUT] [, @msg_length = @length_in_bytes OUTPUT] [, @originator_address = @originator_address OUTPUT])  where   @originator_address   Specifies the resolved mail address of the originator of the mail   message. The @originator_address variable must be varchar(255). For additional syntax information for xp_readmail see the Microsoft SQL Server Transact-SQL Reference.

Additional query words: xp_readmail xp_sendmail

Keywords: kbprb KB152415

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.