Monthly Archives: October 2012

CRM 2011 E-mail router issue – SetPriority null


ACTION: Trying to send an email via workflow step.

RESULT: The below error appears on the event log.

#61042 – An error occurred while processing the outgoing e-mail message with subject “xxxxxxx” for SMTP: for delivery through SMTP-SERVER-NAME.

System.NullReferenceException: Object reference not set to an instance of an object.

at Microsoft.Crm.Tools.Email.Providers.SmtpPollingSendEmailProvider.SetPriority(OptionSetValue priority, MailMessage mailMessage) at Microsoft.Crm.Tools.Email.Providers.SmtpPollingSendEmailProvider.PrepareMessage(Entity sendEmail)   at Microsoft.Crm.Tools.Email.Providers.SmtpPollingSendEmailProvider.ProcessMessageInternal(Entity emailMessage)

   at Microsoft.Crm.Tools.Email.Providers.CrmPollingSendEmailProvider.Run()

CAUSE: The migration from CRM4.0 to CRM2011 caused some email templates to become corrupted.

RESOLUTION: Recreated email fields (removed and replaced To and From fields).

I had a session with Microsoft Support on this issue and we found a solution. The problem was that the workflows were created in CRM 4.0 and then upgraded to CRM 2011. The solution was to re-save all the e-mail templates within the workflows.

I opened the “create e-mail task”, removed To and From recipients and then re-inserted the same recipients and saved and re-activated the workflows. Now I could se that the Priority of the mail message was set to Normal instead of “blank”. And the mail got through.

So if you upgraded from CRM 4.0 this might be your problem.