2

Environment: Sitecore 9.2 & SXA 1.8

I have created an Automated Email Campaign while running the quick test I am facing this error:

2916 16:47:37 INFO  Registered email: {personal-email-here}
2916 16:47:37 INFO  Test Dispatch Message (Testing): Started
  Message Id:      {0DDCFB68-5348-41C4-BDA6-32056770DD40}
  Message Path:    /sitecore/content/Email/Messages/2020/05/27T115133/Testing
  Included Recipient Lists: 
  Excluded Recipient Lists: 

MessageTaskRunner worker thread 21 16:47:37 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, Boolean failIfNotExists)
   at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain)
   at Sitecore.Modules.EmailCampaign.Core.PipelineHelper.RunPipeline(String pipelineName, PipelineArgs args)
   at Sitecore.EmailCampaign.Cm.Dispatch.TestMessageTask.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()<---

2916 16:47:37 INFO  Critical Error:
One or more errors occurred.


2916 16:47:37 INFO  
2916 16:47:37 INFO  Test Dispatch Message (Testing): Finished
  Result:          ABORTED
  Message Id:      {0DDCFB68-5348-41C4-BDA6-32056770DD40}
  Message Path:    /sitecore/content/Email/Messages/2020/05/27T115133/Testing
  Recipients Processed:    0

CustomSMTP.config:

<smtpSettings type="Sitecore.EDS.Core.Net.Smtp.SmtpSettings, Sitecore.EDS.Core" singleInstance="true">
          <server>smtp.sendgrid.net</server>
          <port>587</port>
          <userName>apikey</userName>
          <password>password</password>
          <authenticationMethod>LOGIN</authenticationMethod>
          <startTls>false</startTls>
          <proxySettings ref="exm/eds/proxySettings" />
        </smtpSettings>

How to fix this issue? Thanks.

5
  • How is your EXM configured for sending the mails? Custom smtp? If so, is that correctly configured?
    – Gatogordo
    Commented May 27, 2020 at 15:04
  • yes, I am using SendGrid as CustomSMTP. It is configured correctly. Please check the edit. Thanks.
    – PSS
    Commented May 27, 2020 at 15:28
  • @PSS - did you resolve this issue?
    – Calum
    Commented Oct 13, 2022 at 11:13
  • @Calum yes, I guess it was related to SMTP settings, send requests were blocked. If you want to debug EXM on your local, try this tool - github.com/ChangemakerStudios/Papercut-SMTP.
    – PSS
    Commented Oct 18, 2022 at 8:51
  • 1
    Thanks @PPS - I already use Papercut :) I have posted my resolution as an answer to your question.
    – Calum
    Commented Oct 18, 2022 at 15:03

1 Answer 1

2

I was receiving this error and looking at the SMTP response in the Sitecore logs, specifically readSmtpResponse: I could see that the cause of the error was that the from address I was using was not allowed to send as - I updated the from address to the correct address and I began to see emails being sent without error.

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.