Umbraco Forms Error: MailKit.Net.Smtp.SmtpCommandException
Hi,
I have a strange issue with Umbraco Forms on my umbraco 11.4.1 Cloud instance, my form has been working fine, but all of a sudden the workflow audit shows a fail see image below there have been no changes deployed and comes with the following error code:
MailKit.Net.Smtp.SmtpCommandException: Requested action not taken: mailbox unavailable
Sender address is not allowed.
at MailKit.Net.Smtp.SmtpClient.OnSenderNotAccepted(MimeMessage message, MailboxAddress mailbox, SmtpResponse response)
at MailKit.Net.Smtp.SmtpClient.ParseMailFromResponse(MimeMessage message, MailboxAddress mailbox, SmtpResponse response)
at MailKit.Net.Smtp.SmtpClient.MailFromAsync(FormatOptions options, MimeMessage message, MailboxAddress mailbox, SmtpExtensions extensions, Int64 size, Boolean pipeline, CancellationToken cancellationToken)
at MailKit.Net.Smtp.SmtpClient.SendAsync(FormatOptions options, MimeMessage message, MailboxAddress sender, IList`1 recipients, CancellationToken cancellationToken, ITransferProgress progress)
at MailKit.Net.Smtp.SmtpClient.SendAsync(FormatOptions options, MimeMessage message, MailboxAddress sender, IList`1 recipients, CancellationToken cancellationToken, ITransferProgress progress)
at Umbraco.Cms.Infrastructure.Mail.EmailSender.SendAsyncInternal(EmailMessage message, String emailType, Boolean enableNotification)
at Umbraco.Cms.Infrastructure.Mail.EmailSender.SendAsync(EmailMessage message, String emailType)
at Umbraco.Forms.Core.Services.WorkflowEmailService.SendEmailAsync(SendEmailArgs args)
at Umbraco.Forms.Core.Providers.WorkflowTypes.SendRazorEmail.Execute(WorkflowExecutionContext context)
Any help with this error would be much appreciated as ever,
Username and password obviously commented out, double checked the username and password still no joy. The only error message receive is the one above, I've also tried with different recipient email address where I know the mailbox is available but still the same error message :-(
I've beenn messing around with the Umbraco Forms workflow, and think I might of stumbled across something when choosing a workflow for the form I am presented with the following options:
My current workflow which is failing uses a Razor template to send emails, if I just select the Send Email option and test everything works fine, so in conclusion looks like the Razor template is an issue I've tried the stand alone razor template in addition to my modified version and they both fail.
It's a short-term fix for now using withotu Razor but ideally I would liek to use the template for the emails, here is the code below if anybody can see any issues:
Managed to get this working now, it seems the from address also needs to be the same as the smtp user email, doesn't seem that should work but it does.
Umbraco Forms Error: MailKit.Net.Smtp.SmtpCommandException
Hi,
I have a strange issue with Umbraco Forms on my umbraco 11.4.1 Cloud instance, my form has been working fine, but all of a sudden the workflow audit shows a fail see image below there have been no changes deployed and comes with the following error code:
Any help with this error would be much appreciated as ever,
Many thanks
Nick
NUDGE
Just ondered if anyone has any thoughts on this issue?
What SMTP service are you using? Does that have any more details for why it’s failing?
Hi Kevin,
Thanks for getting back to me on this, these are the SMTP settings within the Appsettings.json file:
Username and password obviously commented out, double checked the username and password still no joy. The only error message receive is the one above, I've also tried with different recipient email address where I know the mailbox is available but still the same error message :-(
UPDATE
I've beenn messing around with the Umbraco Forms workflow, and think I might of stumbled across something when choosing a workflow for the form I am presented with the following options:
My current workflow which is failing uses a Razor template to send emails, if I just select the Send Email option and test everything works fine, so in conclusion looks like the Razor template is an issue I've tried the stand alone razor template in addition to my modified version and they both fail.
It's a short-term fix for now using withotu Razor but ideally I would liek to use the template for the emails, here is the code below if anybody can see any issues:
UPDATE
Managed to get this working now, it seems the from address also needs to be the same as the smtp user email, doesn't seem that should work but it does.
Thanks for all your help
is working on a reply...