Jul 11, 2018
Aug 13, 2018
Built-in elements
Closed, Fixed and tested
Steps to reproduce
1. Create a Form with a text and send button and add a "Send email after form submission".
2. Add some placeholders in the email, so you can see the text from the form, like #summary# and #Text#.
3. Submit the form from two different browsers at the same time. (Might have to do this a couple of times. Try and open both browsers in incognito mode).
Expected:
Should send email.
Actual:
Sometimes emails aren't sent. Can see this in the log:
*ERROR EPiServer.Forms.Core.PostSubmissionActor.PostSubmissionActorBase: Failed to send email
System.InvalidOperationException: An asynchronous call is already in progress. It must be completed or canceled before you can call this method.
at System.Net.Mail.SmtpClient.Send(MailMessage message)
at EPiServer.Forms.Implementation.Actors.SendEmailAfterSubmissionActor.SendMessage(EmailTemplateActorModel emailConfig)
System.InvalidOperationException: An asynchronous call is already in progress. It must be completed or canceled before you can call this method.
at System.Net.Mail.SmtpClient.Send(MailMessage message)
at EPiServer.Forms.Implementation.Actors.SendEmailAfterSubmissionActor.SendMessage(EmailTemplateActorModel emailConfig)*