locked
Removing Queued Outgoing Emails RRS feed

  • Question

  • We have a development Dynamics CRM 4.0 system on which the Microsoft CRM Email Router has been stopped for a couple of months. I need start this server again in order to test some updates to the CRM I have been developing but I don't want any emails that may be sitting in CRM waiting to be sent through the router to go out.

    Is there anyway to show and identify these queued up emails and to purge them so that when I switch the router back on (start the service) they won't all suddenly get sent out.

    Many thanks,

    Phil.

    Friday, November 5, 2010 11:41 AM

Answers

  • Hi pbarham,

    If you have access to the CRM database, it be can fixed rather quickly.

    In dbo.ActivityPointerBase
    Email Activity has ActivityTypeCode of 4202, with the following StatusCode:
    3 = Sent
    5 = Canceled
    6 = Pending Send

    So, you can select all email activity records with statuscode=6 and confirm that these are the records you want to change first

    SELECT * FROM dbo.ActivityPointerBase WHERE ActivityTypeCode=4202 AND StatusCode=6
    

    Then, update all email activity records with statuscode=6 to either statuscode=3 or 5 

    UPDATE dbo.ActivityPointerBase SET StatusCode=3 WHERE ActivityTypeCode=4202 AND StatusCode=6
    

    CRM service will not try to send these pending e-mails then, because they are now either in canceled or sent state.

    Hope this helps,
    Danny
     

    Friday, November 5, 2010 3:38 PM