I had an issue since last week wherein the last received e-mail was last Dec 29.
The job had no problem since it was created (months ago).
The problem is we haven't receiving the e-mail even when the status of the job had no problem.
Below is the script:
USE msdb EXEC sp_send_dbmail @profile_name='eapb_profile', @email@example.com', @subject='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Message', @body='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Message', @file_attachments='\\sharedfolder\generate_file.txt'
When I'm doing a trial and error in my local database, it really was being run without error but still not receiving the e-mail. But when I tried to change the body/subject (I tried to shortened it), I am now receiving the e-mail.
When I checked though the documentation of MS, limit of body is NVARCHAR(MAX) yet my original body subject is far to reach the limit.
What seems to be the problem?
Take note of the following:
- No problem in mail server since I can send with shortened body / subject.
- Attachment is present in the shared folder.
- Shared folder is accessible.
- No problems with database mail profile and account.
I've already checked
dbo.sysmail_allitems and its status is