3

We have Sitecore 8.2.0 instance with EXM 3.4 on it and during one of campaigns we have experienced strange behavior. The message was sent to more than 41K recepients, however 2 of them were not and that caused the campaign to stop and it currently is on "Pause" mode and still appears "in progress" section.

The error message is next:

MessageTaskRunner worker thread 408 10:34:06 ERROR Failed to send '[NAME]' to 'xdb:dbf29ac0-f193-413b-bcf5-b7819f00xxxx'.
MessageTaskRunner worker thread 407 10:34:06 ERROR Message sending error: System.AggregateException: One or more errors occurred. ---> Sitecore.EDS.Core.Exceptions.InvalidMessageException: Failed to send the email message due to incorrect data.
   at Sitecore.EDS.Core.Net.Smtp.ChilkatTransportClient.SendAsync(Email message)
   at Sitecore.EDS.Core.Net.Smtp.ChilkatMessageTransport.<RetryOnFault>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Sitecore.EDS.Core.Net.Smtp.ChilkatMessageTransport.<SendTaskAsync>d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Sitecore.EDS.Providers.CustomSmtp.DispatchProvider.<SendEmailAsync>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Sitecore.EDS.Core.Dispatch.DispatchProviderBase.<SendAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Sitecore.EDS.Core.Dispatch.DispatchManager.<SendAsync>d__6.MoveNext()
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at Sitecore.EmailCampaign.Cm.Pipelines.SendEmail.SendEmail.Process(SendMessageArgs args)
   at (Object , Object[] )
   at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
   at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain)
   at Sitecore.Modules.EmailCampaign.Core.PipelineHelper.RunPipeline(String pipelineName, PipelineArgs args)
   at Sitecore.Modules.EmailCampaign.Core.Dispatch.DispatchTask.OnSendToNextRecipient()
---> (Inner Exception #0) Sitecore.EDS.Core.Exceptions.InvalidMessageException: Failed to send the email message due to incorrect data.
   at Sitecore.EDS.Core.Net.Smtp.ChilkatTransportClient.SendAsync(Email message)
   at Sitecore.EDS.Core.Net.Smtp.ChilkatMessageTransport.<RetryOnFault>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Sitecore.EDS.Core.Net.Smtp.ChilkatMessageTransport.<SendTaskAsync>d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Sitecore.EDS.Providers.CustomSmtp.DispatchProvider.<SendEmailAsync>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Sitecore.EDS.Core.Dispatch.DispatchProviderBase.<SendAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Sitecore.EDS.Core.Dispatch.DispatchManager.<SendAsync>d__6.MoveNext()<---

I have looked into decompiled code of Sitecore.Modules.EmailCampaign.Core.Dispatch.DispatchTask class and can see that System.AggregateException with inner InvalidMessageException should not cause the message to be put on pause, however it does.

So what I want to ask is:

  • How can I ignore that and make the mail campaign to be in Sent state so we can see stats on it?
  • Is there any way to figure out what was the incorrect data and how come these two recepients cause it to stop?
  • I have tried to implement my own dispatch task which would handle the Pause state differently, however there is to many references to internal classes and methods which makes it very hard to implement.
  • I have also tried to remove those two recepients from the list for send-out, and from the mail engagement plan, however they are not getting removed from the send-out and when clicking "Resume", EXM attemts to send to those two again and faisl again.
  • Any suggestions on what I can try on that one?

1 Answer 1

3

This is expected behaviour. See exm error pauses the sending of letters

In 3.4, and earlier versions, the campaign is set to paused state by design if dispatch fails to some recipients. I believe the thinking was that this would allow the person doing the dispatch to fix/clean up the bad recipients and then resume the dispatch.

They might fail for any number of reasons e.g. an invalid email address. You should be able to see the exact reason in the EDS log file.

How can I ignore that and make the mail campaign to be in Sent state so we can see stats on it?

You should be able to see stats, even if it's not in Sent state. If not, you can try forcing it in Sent state by editing the corresponding item in the content editor.

Is there any way to figure out what was the incorrect data and how come these two recepients cause it to stop?

See the EDS log file, and if that doesn't help, try enable debug logging.

I have tried to implement my own dispatch task which would handle the Pause state differently, however there is to many references to internal classes and methods which makes it very hard to implement.

You should not try to change this behaviour. It's by design. In 3.5+ this has been changed and will move the email campaign into sent state even if some recipients fail.

I have also tried to remove those two recepients from the list for send-out, and from the mail engagement plan, however they are not getting removed from the send-out and when clicking "Resume", EXM attemts to send to those two again and faisl again.

You need to remove them from the DispatchQueue table in the exm.master database. Look for the message id.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.