0

I encountered the strangest bug I have ever seen...

I have a stored procedure that sends an email. The DB status (msdb.dbo.sysmail_mailitems) always sais 'sent' and the send_status is always 1 (success).

However, the mails don't arrive always. I have traced it back to the @subject parameter. It depends on the value of it.

ARRIVES: 'FAIL', 'FAILD', 'FAIEED' 'ECOA', 'eCoA', 'Creation of the eCoA'

DOESN'T ARRIVE: 'FAILED', 'FAILEED' 'Creation of the e-CoA'

It is reproducable. I tried the query outside the stored procedure (running it straight from a query window in SSMS) with the same results for the same subjects.

Query:

EXEC msdb.dbo.sp_send_dbmail
    @profile_name ='MyProfile',
    @recipients = 'MyEmail@address.com',
    @body = 'Body',
    @subject = 'FAILED'

note: I changed email, profile and body. However, those seems to have no influence on the entire problem...

Can someone PLEASE help me? I have eaten my entire desk from frustration...

Thanks guys!!!

Jan Solo
  • 183
  • 1
  • 8
  • 19
  • This sounds like a spam filter issue of some kind. – Jeremy Holovacs Dec 11 '13 at 14:21
  • I'd expect the issue isn't in the sending code - it'll be in the mailservers or in the email client in which you're checking for emails being received. – Damien_The_Unbeliever Dec 11 '13 at 14:22
  • Will not be solved (unless it goes really wrong). It will take too much time to search for the problem since it probably wont go wrong (subject fixed value). There's gonna be excessive testing so IF it goes wrong we can look at it later. – Jan Solo Dec 12 '13 at 12:49

0 Answers0