PRB: sp_processmail Gets Ambiguous Recipient Error

ID: Q152415


The information in this article applies to:
  • Microsoft SQL Server versions 6.0, 6.5, 7.0

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 : kbbug6.00
Version : winnt:6.0,6.5,7.0
Platform : winnt
Issue type : kbprb


Last Reviewed: September 14, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.