problem with size of characters in @BLIND_COPY_RECIPIENTS using SP_SEND_DBMAIL
Dear All, In my application, mails are being sent through SQL Server in the following manner, EXEC MSDB.DBO.SP_SEND_DBMAIL @PROFILE_NAME = 'Mail Alerts', @RECIPIENTS ='AnyEMailID', @BLIND_COPY_RECIPIENTS='MultipleEMailIdsSeparatedBy;', @file_attachments='D:\Birthday Reminders\FINAL2.jpg', @BODY ='Testing', @BODY_FORMAT ='HTML', @SUBJECT = 'BCC Text Size Test' The above works well when size of charatcters in @BLIND_COPY_RECIPIENTS is around 8000 characters. But when the size goes beyond 8000 characters, the mail does not shoot. The sysmail_mailitems table shows status as 2 for the same. Checking the sysmail_log table shows following exception: The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2013-04-26T17:29:34). Exception Message: Cannot send mails to mail server. (Failure sending mail.). ) I fail to understand the issue as teh size of @BLIND_COPY_RECIPIENTS is varchar(max). I have searched a lot on the internet but could not find anything related to this issue. Please help as I need to close this issue ASAP. Thanks,
There are several possible reasons for this failure. You will need to work with whoever manages your SMTP servers to take a look at what happens when the messages are being received to see what the exact problem is, but it is more than likely related to one of the following: - Installed anti-spam software is seeing many entries on the BCC line and rejecting the message as spam - There is a limit on the SMTP software that limits the number of entries that can be in the BCC field - The SMTP software rejects BCC lines that are longer than a certain character length Unfortunately it is not something you will be able to figure out on your own. Have a chat with your email admin, they should have some logs which will provide much more detail.