emails not being sent

  • Hello,

    We upgraded our database server from windows server 2008 r2 sp1 to windows server 2012 r2.

    I tested stored procedure is sending emails or not and it was sending.

    After that we did windows update.

    we were sending result of our stored procedure every morning.

    Now Next morning no one gets email.

    We are using below stored procedure to send a stored procedure result.

    EXEC CUS_sp_CreateNotificationSingleRecipient @FROM, @TO, 'EXTERNALEMAIL', @SUBJ, @MESSAGE, 'html','Y'

    Do you have any idea about this issue?

    DBMail is setup fine. I get test email from that. If we really needs for this procedure.

    Do you know any troubleshooting task that I have to follow to solve this issue?

    Do you ever had this kind of situation before?

    If you know solution of this situation that would be great.

    Thanks

  • Can you check the output of your procedure? check the HTML. if the HTML is null then the email will not be received.

  • If the failures are something with database mail, you can query the catalog views to see if there are issues showing up. You could take a look at these:

    SELECT * FROM msdb.dbo.sysmail_allitems

    SELECT * FROM msdb.dbo.sysmail_faileditems

    SELECT * FROM msdb.dbo.sysmail_unsentitems

    SELECT * FROM msdb.dbo.sysmail_event_log

    If your not finding errors in there, it's likely the process or stored procedure itself that is having the problems.

    Sue

  • Actually, you can send an email with a NULL body. I'd start with msdb.dbo.sysmail_mailitems. Find your rows where the email is sent and that should tell you where to look - the procedure/parameters or database mail.

    Without the code of the procedure, I can only comment on your command to execute it. Where do you get the values for your @FROM and @TO variables? If they're NULL, it won't be sent. You should also look at your call to sp_send_dbmail and make sure you're passing things like a valid profile name, valid recipients, etc.

  • Hello,

    It is solved by restarting our ERP's service.

    Thanks for your reply.

    It was configuration issue after the upgrade.

    It wasn't too difficult that I was thinking about.

    Thanks

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply