2 Replies Latest reply on Jan 4, 2019 4:40 PM by rstacy

    how can i resend mail that has failed?

    Rookie

      This morning a DNS setting was changed on our mail server and 3 hours worth of outbound messages failed. The 'retry count' was set at 2. I changed it to 3. Is there a way to select those messages to be reprocessed? or Can I use an update command to change 'email faled' to false? is there any way to get these emails out?

        • 1. Re: how can i resend mail that has failed?
          CraigMiddelstadt Master

          --Force Resend on Unsent messages

          --*************************************************************

          update tps_user_message_recipient set tps_email_failed = '0' where tps_email_failed <> '0' and tps_is_email_sent = 0 and tps_email_address is not null

          update tps_user_message_recipient set tps_next_retry_datetime = NULL where tps_is_email_sent = 0 and tps_email_address is not null

          update tps_user_message_recipient set tps_retry_count = '0' where tps_retry_count <> '0' and tps_is_email_sent = 0 and tps_email_address is not null

           

          Craig Middelstadt

          Senior ITSM Consultant

          • 2. Re: how can i resend mail that has failed?
            rstacy Apprentice

            Following in the steps suggested by Craig, I compared the items succeeding against those that were failing and realized that we needed to get tps_is_email_sent involved.  I tested this by running the script in the application SQL database against individual email addresses with good results.

             

            UPDATE       tps_user_message_recipient

            SET                tps_is_email_sent = '0', tps_email_failed = '0', tps_retry_count = '0', tps_next_retry_datetime = NULL, tps_email_address = N'[email protected]'

            WHERE        (tps_email_failed = '1')

             

            This is what we ran in production.  Be sure to make a copy of the table or the DB before making any changes.  No warranties assumed or implied. 

             

            UPDATE       tps_user_message_recipient

            SET                tps_is_email_sent = '0', tps_email_failed = '0', tps_retry_count = '0', tps_next_retry_datetime = NULL

            WHERE        (tps_email_failed = '1')