Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to send email to external reviewer #247

Open
Perficient-DomKenney opened this issue May 6, 2024 · 6 comments
Open

Unable to send email to external reviewer #247

Perficient-DomKenney opened this issue May 6, 2024 · 6 comments
Labels

Comments

@Perficient-DomKenney
Copy link

When creating the external review link, the share button correctly pulls up the email modal & I am able to populate this.

However, once I hit the send button it fails to ever send out.

This appears to be happening on multiple clients, and their configuration regarding AdvancedReviews is the same as the test provided in this repo (so far as I have been able to identify).

@barteksekula
Copy link
Member

Hi, any callstack?

@Perficient-DomKenney
Copy link
Author

Perficient-DomKenney commented May 6, 2024

The only error I receive is the following output from Application Insights:

{
  "name": "AppRequests",
  "time": "2024-05-06T17:14:43.8227581Z",
  "iKey": "a230e1d2-20b6-49a4-ac58-8e63aeb4bd84",
  "tags": {
    "ai.application.ver": "6.0.0.0",
    "ai.cloud.roleInstance": "localhost",
    "ai.user.id": "VUGN4GI7HHz1ONBtJiwBIR",
    "ai.operation.id": "7e0a2144ace8e5fba7c9738c8eb0114b",
    "ai.operation.name": "POST /EPiServer/advanced-cms-external-reviews/Stores/externalreviewstore/45bb7064-3cce-426a-a2ee-657ef17530ae",
    "ai.location.ip": "127.0.0.1",
    "ai.internal.sdkVersion": "aspnet5c:2.21.0+5e2e7ddda961ec0e16a75b1ae0a37f6a13c777f5",
    "ai.internal.nodeName": "localhost"
  },
  "data": {
    "baseType": "RequestData",
    "baseData": {
      "ver": 2,
      "id": "def65d17006d0586",
      "name": "POST /EPiServer/advanced-cms-external-reviews/Stores/externalreviewstore/45bb7064-3cce-426a-a2ee-657ef17530ae",
      "duration": "00:00:00.0325029",
      "success": false,
      "responseCode": "400",
      "url": "https://localhost:44338/EPiServer/advanced-cms-external-reviews/Stores/externalreviewstore/45bb7064-3cce-426a-a2ee-657ef17530ae",
      "properties": {
        "AspNetCoreEnvironment": "Local",
        "_MS.ProcessedByMetricExtractors": "(Name:'Requests', Ver:'1.1')",
        "DeveloperMode": "true"
      }
    }
  }
}

No breakpoints or logs are generated on any DXP environment, but debugging locally I can see this. This is the only fragment related to this behavior I have been able to identify.

@Perficient-DomKenney
Copy link
Author

Hi @barteksekula,

Is there any additional information I should obtain to assist with identifying a cause for this?

@barteksekula
Copy link
Member

@Perficient-DomKenney sorry, holidays were a bit busy
Please try to add this line to any test controller in your app
https://github.com/advanced-cms/advanced-reviews/blob/master/src/Advanced.CMS.ExternalReviews/ReviewLinksRepository/ExternalReviewStore.cs#L147

Does it work?
We do not have any email logic inside advanced-reviews, just reusing INotificationProvider from EPiServer.

@Perficient-DomKenney
Copy link
Author

I am testing this now, however we have confirmed last week that emails coming from EPiServer Forms are still working without issue. I am uncertain if this would indicate any further context, but it feels relevant to this while I test this scenario.

@Perficient-DomKenney
Copy link
Author

@barteksekula Using that line to send an email fails, and this is the exception that is populated from the message error state:

09/10/2024 12:29:29 Failed to send email
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.SendCommandAsync(String command, Boolean doAsync, CancellationToken cancellationToken)
   at MailKit.Net.Smtp.SmtpClient.AuthenticateAsync(Encoding encoding, ICredentials credentials, Boolean doAsync, CancellationToken cancellationToken)
   at EPiServer.Notification.Internal.SmtpClientImplementation.SendAsync(MimeMessage message)
   at EPiServer.Notification.Internal.EmailNotificationProvider.SendAsync(IEnumerable`1 messages, Action`1 succeededAction, Action`2 failedAction)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants