Send Email Error: Unabled to send undefined email. The SMTP server has unexpectedly disconnected.
Hi Matt.
I am using Vendr 2.4.1 and Vendr Checkout 2.1.2 and the default workflows, e.g. no custom pipeline.
I have copied Application.Web\App_Plugins\VendrCheckout\views\emails\VendrCheckoutOrderConfirmationEmail.cshtml to Application.Web\Views\Emails\VendrCheckoutOrderConfirmationEmail.cshtml and configured the template to my requirements.
I have updated the Order Confirmation email template view path to ~/Views/Emails/VendrCheckoutOrderConfirmationEmail.cshtml.
Now, whenever I submit an order through the checkout process, or Send Email via the backoffice on an existing order, I get the following error:
System.AggregateException: AsyncHelper.RunSync method threw an exception. (The SMTP server has unexpectedly disconnected.)
---> MailKit.Net.Smtp.SmtpProtocolException: The SMTP server has unexpectedly disconnected.
at MailKit.Net.Smtp.SmtpStream.ReadAheadAsync(Boolean doAsync, CancellationToken cancellationToken)
at MailKit.Net.Smtp.SmtpStream.ReadResponseAsync(Boolean doAsync, CancellationToken cancellationToken)
at MailKit.Net.Smtp.SmtpClient.ConnectAsync(String host, Int32 port, SecureSocketOptions options, Boolean doAsync, CancellationToken cancellationToken)
at Umbraco.Cms.Infrastructure.Mail.EmailSender.SendAsyncInternal(EmailMessage message, String emailType, Boolean enableNotification)
at Umbraco.Cms.Infrastructure.Mail.EmailSender.SendAsync(EmailMessage message, String emailType, Boolean enableNotification)
at Vendr.Common.Helpers.AsyncHelper.<>c__DisplayClass1_0.<<RunSync>b__0>d.MoveNext()
--- End of inner exception stack trace ---
at Vendr.Common.Helpers.AsyncHelper.ExclusiveSynchronizationContext.BeginMessageLoop()
at Vendr.Common.Helpers.AsyncHelper.RunSync(Func`1 task)
at Vendr.Core.Pipelines.Email.Tasks.SendEmailTask.Execute(EmailSendPipelineArgs args)
at Vendr.Common.Pipelines.InProcPipelineInvoker.<Vendr.Common.Pipelines.IPipelineInvoker.Invoke>g__next|2_0(PipelineArgs e, <>c__DisplayClass2_0& )
at Vendr.Common.Pipelines.InProcPipelineInvoker.Vendr.Common.Pipelines.IPipelineInvoker.Invoke(IEnumerable`1 pipelineTasks, PipelineArgs args)
at Vendr.Common.Pipelines.Pipeline.Invoke[TPipeline,TArgs,TEntity](Func`2 argsFactory)
at Vendr.Core.Services.EmailTemplateService.SendEmail[TModel](EmailTemplateReadOnly emailTemplate, TModel model, String toEmailAddress, String languageIsoCode)
at Vendr.Core.Services.EmailTemplateService.SendEmail(EmailTemplateReadOnly emailTemplate, OrderReadOnly order)
at Vendr.Core.Events.Notification.Handlers.Order.SendFinalizedOrderEmail.Handle(OrderFinalizedNotification evt)
Although it would suggest an issue with the SMTP server, no change has been made to the SMTP server and it was working fine with the default template before this change to a custom template.
Even if I switch back to the default Vendr email template, I still get the error.
Send Email Error: Unabled to send undefined email. The SMTP server has unexpectedly disconnected.
Hi Matt.
I am using Vendr 2.4.1 and Vendr Checkout 2.1.2 and the default workflows, e.g. no custom pipeline.
I have copied
Application.Web\App_Plugins\VendrCheckout\views\emails\VendrCheckoutOrderConfirmationEmail.cshtml
toApplication.Web\Views\Emails\VendrCheckoutOrderConfirmationEmail.cshtml
and configured the template to my requirements.I have updated the Order Confirmation email template view path to
~/Views/Emails/VendrCheckoutOrderConfirmationEmail.cshtml
.Now, whenever I submit an order through the checkout process, or Send Email via the backoffice on an existing order, I get the following error:
Although it would suggest an issue with the SMTP server, no change has been made to the SMTP server and it was working fine with the default template before this change to a custom template.
Even if I switch back to the default Vendr email template, I still get the error.
Any ideas?
Hey Neil
Are you sure you haven't deployed some changes to the SMTP settings? It sounds like something is off there 🤔
It's a network issue, sorry.
is working on a reply...