Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • cheng 1 post 71 karma points
    Apr 21, 2022 @ 14:25
    cheng
    0

    Umbraco smtp mail, Task cancelled error

    User submit the form and smtp not working

    Anyone can help me on this issue, i cant find any similar issue online, I setup the SMTP config in AppSetting.Json, when the form submitted, the user cant receive any email and these error was thrown. I also test the SMTP config input, it can be connect using other smtp connection tester eg: "GMass"

    Umbraco Version 9.4.3 Umbraco Forms package 9.3.0

    Appsetting.Json

    "Umbraco": {
            "CMS": {
                "Global": {
                    "Smtp": {
                        "From": "email taken out",
                        "Host": "smtp.office365.com",
                        "Port": "587",
                        "Username": "user name taken out",
                        "Password": "password taken out",
                        "SecureSocketOptions": "Auto"
                    }
                }
            }
        }
    

    Error In Backend Log

    System.Threading.Tasks.TaskCanceledException: A task was canceled.
       at MailKit.Net.NetworkStream.ReadAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken)
       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)
       at Umbraco.Forms.Core.Services.WorkflowEmailService.SendEmailAsync(SendEmailArgs args)
       at Umbraco.Forms.Core.Providers.WorkflowTypes.SendRazorEmail.Execute(WorkflowExecutionContext context)
    
  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies