web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Delete mails when assigned by mail router?

(0) ShareShare
ReportReport
Posted on by 620

Hi there,

I'm wondering how I can achieve that mails will be deleted in a mail account when they have been inserted into CRM by the email router!? The only way I've found so far is to use forwarding, but this is not really an ideal solutions in my case.

Regards,

Thomas

*This post is locked for comments

I have the same question (0)
  • Carsten Groth mscrm Profile Picture
    2,085 on at

    You can edit the Microsoft.Crm.Tools.EmailAgent.Xml File and set <DeleteEMail>true</<DeleteEMail>

  • ThomasO Profile Picture
    620 on at

    Perfect, I wasn't aware of this file. But it still doesn't work. I've changed the settings and restartet the router. Mail is still available in mail account. Do I have to do something else?

  • Carsten Groth mscrm Profile Picture
    2,085 on at

    It should work. Does the E-Mail Router account has full access to the postoffice-box?

  • ThomasO Profile Picture
    620 on at

    I've double checked by logging in with the router account to Outlook web app, switched to the box and deleted a mail. This all is working fine. Also I'll check the events while sending a test mail and no errors are shown. Mail gets assigned, but not deleted.

    Any idea?

  • ThomasO Profile Picture
    620 on at

    Ok, I've found the reason. When I set the parameters and restart the router it resets my settings to "false". Problem is: I don't know why.

  • ThomasO Profile Picture
    620 on at

    I've researched a bit on the web and it seems these settings are only valid for forwarding mail boxes and therefore will be reset after router restarts and validates the XML file.

    I there no way to delete mails for "regular" mail accounts?

  • Verified answer
    ThomasO Profile Picture
    620 on at

    Ok, there isn't as I found out.

  • Suggested answer
    Thomas Rath Profile Picture
    665 on at

    I just want to post an update to this thread. I'm experiencing the exact same problem. The really strange thing is that if you change the DeleteEmails parameter to true in the Microsoft.Crm.Tools.EmailAgent.xml file and DONT restart the e-mail router service the tracked e-mails actually are deleted from the tracked mail box. As soon as you restart the e-mail router service the configuration is reset back to false in the file and the router stops deleting the tracked e-mails.

    In other words, the functionality actually works (not only for forwarding mail boxes) if you can avoid restarting the service. In real life you properly can't and it's a hassle to always have to remember to change the configuration file after the restart. WHYYY MS... WHYYY?? buh huh.  

  • Suggested answer
    Community Member Profile Picture
    on at

    Please stop the email router servie.

    2) Change the following field in EmailAgent.xml

    deploymentId= Manual

    DeleteEmails = True

    3) Save the file and Restart the service

  • Gareth.Cheyne Profile Picture
    on at

    You seem to know about this email router, are you able to offer any guidance on my post.

    https://community.dynamics.com/crm/f/117/t/177462

    Thanks.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
JS-09031509-0 Profile Picture

JS-09031509-0 3

#2
AS-17030037-0 Profile Picture

AS-17030037-0 2

#2
Mark Eckert Profile Picture

Mark Eckert 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans