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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

CRM emails getting stuck in the outlook queue

(0) ShareShare
ReportReport
Posted on by

I am hoping someone can shed some light... we are using CRM 2011 on premise and it is using exchange web services to integrate with Outlook  to thread mail. Quite frequently messages are getting stuck in the inbox (even though they say sent in CRM) and it causes a huge backlog. So my questions are: If one email does not get processed in a thread of 20... does it stop all 19 following emails from getting processed? it seems like it does but want to know for sure how the threading works. 2) what could be stopping these emails from processing? I can't find a pattern other than potentially it may be due to the pdf attachments? but why?

any expertise would be greatly appreciated.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    tpeschat Profile Picture
    4,930 on at

    Hi,

    i am also using email router on crm 2011 on prem and it also gets regularly stuck.

    Reasons I've identified so far, which are blocking the email router (mostly for incoming mails):

    - digitally signed mails

    - mails without sender or recipient (often being sent by mail daemons - non delivery reports)

    In this case also an error is being thrown in event viewer, which helps me to identify which mail is blocking the router. Then I delete this mail from the mailbox or I increase the treshold date in the systemstate.xml

    If an email blocks the router, no more emails are being processed.

    Hth Thomas

  • Suggested answer
    tpeschat Profile Picture
    4,930 on at

    Hi,

    I am facing this problem from time to time to, but I am using POP3 and SMTP for synchronizing the mails.

    I now "developed" a powershell script, that checks the event log at the server, where email router is running, for any logged errors for source MSCRMEmail for the current day.

    If an error is returned, an e-Mail containing the error is sent to my admin users.

    I have created a recurring task in the application Task Scheduler, which starts at 7 in the morning and runs every hour for 12 hours, which executes this script.

    So at least 1 hour later I am notified, in case e-mails are stuck in the email router.

    Currently my script is configured to return all errors for source MSCRMEmail. It could also be reduced to certain event ids.

    Maybe this is also of help for you, in case you should be able to send mails via smtp from the Server.

    br Thomas

    Script:

    --------

    # Filter Event log for MSCRMEmail Router for errors for the current day - reduce to 10 latest entries

    $date = get-date -format d

    $eventlog = Get-EventLog -logname Application -Source MSCRMEmail -after $date -EntryType Error -Newest 10 | select timegenerated, entrytype, source, message, eventid

    # If an error is returned, an e-mail is sent

    if ($eventlog -ne $null) {

    $text = $eventlog | out-string

    $smtp = new-object Net.Mail.SmtpClient("<your smtp server>")

    if( $Env:SmtpUseCredentials -eq "true" ) {

       $credentials = new-object Net.NetworkCredential("username","password")

       $smtp.Credentials = $credentials

    }

    $objMailMessage = New-Object System.Net.Mail.MailMessage

    $objMailMessage.From = "<your sender mail address>"

    $objMailMessage.To.Add("<recipient e-Mail address 1")

    $objMailMessage.To.Add("<recipient e-Mail address 2")

    $objMailMessage.Subject = "CRM - Email Router Error"

    $objMailMessage.Body = "$text"

    $smtp.send($objMailMessage)}

  • Community Member Profile Picture
    on at

    Thank you for the insight... I am not familiar with Powershell at all. Where would I apply this script?

  • Suggested answer
    tpeschat Profile Picture
    4,930 on at

    Hi,

    the application powershell should be available on your server.

    You need to search for Powershell ISE in the start menu.

    You then need to save the script as .ps1 file.

    Then you can schedule a recurring task using task scheduler.

    Hth Thomas

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans