locked
CRM 2011 Email Router: SOME emails stuck in pending send RRS feed

  • Question

  • I have a CRM 2011 Server running with a large amount of users, in which the CRM Email Router has been installed. Whenever a user creates an email, the outgoing contact is automatically set to a certain user, so that all emails are sent from "The Organization".

    This works 99.9% of the time, but some emails are stuck in Pending Send indefinitely for no apparent reason, and the sender is set to the contact who wrote the e-mail - even though the user sent it with "the Organization" as a sender.

    What could be the cause of seemingly random emails being stuck in Pending Send indefinitely?

    Thanks.

    Wednesday, February 1, 2012 12:11 PM

All replies

  • I am not sure if this is valid or not, but It happened with me:

    1. Exchange server defines the  length of subject ( number of characters) for an email. If subject is longer than this, it remains as pending.

    2. Presence of some special characters in Subject which Exchange does not permit

    I also found following links: (In case something matches your scenario)

    http://technet.microsoft.com/en-us/library/dd979089.aspx

    http://social.microsoft.com/Forums/eu/crmdevelopment/thread/154f0476-3f1a-499c-b890-cb4624f0760b

    Wednesday, February 1, 2012 12:36 PM
  • I would start by checking security roles to see what permissions the users who are having problems have compared to other users.  It sounds like your users will need the ability to "Send email as another user"

     


    Visit my Blog: http://matthewchurilla.blogspot.com/
    Wednesday, February 1, 2012 2:40 PM
  • Valid point, and I checked this - however, all users are able to send messages as intended, only sometimes does it fail, which leads me to believe the user security rules are in order.
    Thursday, February 2, 2012 9:08 AM
  • Thanks, that at least gave me something to look for.. I haven't been able to find anything special about the failing emails, though..

    The odd thing is there are 5000+(exact number doesn't show above 5K, i know its well above that) emails in the system and only 28 have failed so far.

    Some of them have obvious flaws like invalid emails, but most of them are just regular emails with nothing special about them. No special signs in either the subject or the content and with valid recipients.

    Thursday, February 2, 2012 9:28 AM
  • Just trying to narrow this down to something that can be debugged..

    Is this happening consistently for a user or set of users or does it just seem to affect random messages?

    Are you changing the email address for outgoing emails via a workflow or some other mechansim?

    Are users using the email router or outlook plugin?


    Visit my Blog: http://matthewchurilla.blogspot.com/
    Thursday, February 2, 2012 2:16 PM
  • 1. Completely random message from any user can get stuck.

    2. I'm doing it through simple javascript replacement when an email is opened (maybe not the best way, but it seems to work.)

    3. Email Router :-)

    Monday, February 6, 2012 1:10 PM
  • If I had to guess I would say it is a problem with your custom javascript and that under certain circumstances it doesn't fire off appropriately.  Unfortunately with javascript there can be a whole lot of timing problems that can cause issues.  

    If you want to post it we can take a look at it.  But i'm guessing it is just a simple onload that sets the from field to the organization email address.  Most likely some of your users are just typing up messages before the javascript completes running.


    Visit my Blog: http://matthewchurilla.blogspot.com/
    Monday, February 6, 2012 3:43 PM
  • Yeah, I considered whether that could be the problem - However, in this particular organization, we disallow sending email from anything other than the "Organizational"  user - so users will get an error (Email address not allowed to send) when trying to send in their own name.
    Tuesday, February 7, 2012 11:16 AM
  • A better (And most likely more reliable method) might be to rewrite all outbound mail that comes from the router.  Here is rewriting on exchange (http://technet.microsoft.com/en-us/library/aa996806.aspx) if you are using another SMTP mail server it is most likely possible there also. 

    Either way your problem seems very much related to javascript timing which is a sucky thing.

    

    Visit my Blog: http://matthewchurilla.blogspot.com/

    Tuesday, February 7, 2012 1:34 PM
  • Same Problem with me. I have used the mail router with a simple smtp server. I have set the admin with the mail info@myorganisation.com to send mail to each person through a workflow. What i get, is on the same i.x case on the first time (lets say on the creation of a service activity) the workflow creates a mail , an its send in a minute or so. If in the same case, create a second service activity , the workflows again created a mail but it remains in the Pending for Send status, and after a while it becomed Fail. 

    The problem is that tha this happens randomly, i cant blame spacial characters os something else because both service activities are identical.

    Is there another way to see something like a log , so i can have a better look , why the mail dosent send?

    Friday, November 2, 2012 8:50 AM
  • Hi George,

    You can enable verbose logging for the email router:

    1. Log on to the server where the Microsoft CRM E-mail Router is installed by using local administrator permissions.
    2. Click Start, click Run, type regedit, and then click OK.
    3. Locate and then click the following registry subkey:
      HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSCRMEmail
    4. Right-click the LogLevel registry entry, click Modify, and then change the value to 3. By default, this value is set to 1.
    5. Update the Microsoft.Crm.Tools.EmailAgent.xml configuration file for the E-mail Router Service. To do this, follow these steps:
      1. In Windows Explorer, locate the Microsoft.Crm.Tools.EmailAgent.xml file. By default, this file is located in the following folder:
        SystemDrive:\Program Files\Microsoft CRM Email\Service
      2. Open the file by using Notepad or another text-editing program.
      3. In the file, examine the <SystemConfiguration> node, and then scroll down the text toward the end of the file to find the following statement:
        <LogLevel>1</LogLevel>
        By default, this value is set to 1 (one). Modify this statement so that it reads as follows:
        <LogLevel>3</LogLevel>
      4. Save the file.
      5. Restart the E-mail Router Service. You will find a new Event Viewer log view that is named MSCRMEmailLog. It is in this Event Viewer log view that the events appear.

    Visit my blog for CRM material, improving performance, kerberos, IFD, development tips, etc. :) http://quantusdynamics.blogspot.com



    Friday, November 2, 2012 9:47 AM
    Answerer