locked
CRM 2011 Emails Stuck with "Sending" Status Reason RRS feed

  • Question

  • Hello,

    We are currently using CRM 2011 with Rollup 3 On Premise and are using the Email Router with our SMTP server.  When we create email activities, the email is sent multiple times, and the status reason stays as "Sending".  In the event viewer for the MSCRMEmailLog, we do see errors containing the following:

    Property value must be non null.
    Parameter name: value (Fault Detail is equal to Microsoft.Xrm.Sdk.OrganizationServiceFault).

    Does anyone know of a solution to this?  Thanks!


    • Edited by Fruscus Thursday, April 26, 2012 7:02 PM
    Thursday, April 26, 2012 7:00 PM

Answers

  • We figured out our issue.  It turned out we had a plugin incorrectly registered to fire on updates on all entities, which was throwing an exception in the router.  Once we removed the offending registration our emails updated correctly.
    • Marked as answer by Fruscus Wednesday, May 2, 2012 12:53 PM
    Tuesday, May 1, 2012 3:04 PM

All replies

  • Are they kind of workflows or plugins that were triggered on the creation of new record on the emails?

    Regards,

    JP

    Friday, April 27, 2012 8:19 AM
  • We do not have any plugins on the activity, but we are creating the emails using a plugin.  Below is the basic code we are currently using.  Is there something that we are missing?  Thanks!

    Email email = new Email
                {
                    From = new ActivityParty[] { fromParty },
                    To = toPartyArray,
                    Subject = string.Format("Subject text"),
                    Description = emailBody.ToString(),
                    RegardingObjectId = new EntityReference("entityname", guid),
                    DirectionCode = true,
                };

     Guid emailId = _service.Create(email);

    SendEmailRequest sendEmailreq = new SendEmailRequest
                {
                    EmailId = emailId,
                    TrackingToken = "",
                    IssueSend = true
                };

                _service.Execute(sendEmailreq);

    Friday, April 27, 2012 12:16 PM
  • can you use the following code once

    SendEmailResponse sendEmailresp = (SendEmailResponse)_service.Execute(sendEmailreq);

    Regards,

    JP

    Friday, April 27, 2012 1:00 PM
  • Getting the service response didn't really reveal anything as I had hoped. Anyone else have any suggestions?
    Monday, April 30, 2012 12:33 PM
  • I looked at the windows event log again and see two messages:

    #23521 - Cannot confirm the message with subject "Test Email CRM:00060077" in mailbox SMTP: http://myserver/dev for delivery to mailrelay.wherever.com. System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]: Property value must be non null.
    Parameter name: value (Fault Detail is equal to Microsoft.Xrm.Sdk.OrganizationServiceFault).

    #37083 - The SetState action failed for the e-mail message with Id: e0c8a048-ee92-e111-9be6-005056ab48bf, status: 3, mailbox: SMTP: http://myserver/dev. System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]: Property value must be non null.

    Parameter name: value (Fault Detail is equal to Microsoft.Xrm.Sdk.OrganizationServiceFault).



    Monday, April 30, 2012 6:07 PM
  • We figured out our issue.  It turned out we had a plugin incorrectly registered to fire on updates on all entities, which was throwing an exception in the router.  Once we removed the offending registration our emails updated correctly.
    • Marked as answer by Fruscus Wednesday, May 2, 2012 12:53 PM
    Tuesday, May 1, 2012 3:04 PM