Answer the question
In order to leave comments, you need to log in
How to set up Gmail SMTP on ubuntu + nginx + asp.net?
Good afternoon. I want to use email confirmation to register on the site. When I ran the project in visual studio, the mail came in as it should. But with the site uploaded to the server, the following error already pops up when trying to register:
Feb 06 16:38:14 testvds dotnet[707484]: fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[1]
Feb 06 16:38:14 testvds dotnet[707484]: An unhandled exception has occurred while executing the request.
Feb 06 16:38:14 testvds dotnet[707484]: MailKit.Security.AuthenticationException: 534: 5.7.14 <https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbt
Feb 06 16:38:14 testvds dotnet[707484]: 5.7.14 A-_pDOhSafDTp_etpXkmB3ppujBWY7knRO_vyxd1BTaqSTE1zzL3aW5TIVRWrkPxuZXDQ
Feb 06 16:38:14 testvds dotnet[707484]: 5.7.14 9UxknBuGN0Nq4A7XL-J2qwN78JmSrSapV-mcVa9R6XbYAIHD3bwZgUOfVvI0hST5>
Feb 06 16:38:14 testvds dotnet[707484]: 5.7.14 Please log in via your web browser and then try again.
Feb 06 16:38:14 testvds dotnet[707484]: 5.7.14 Learn more at
Feb 06 16:38:14 testvds dotnet[707484]: 5.7.14 https://support.google.com/mail/answer/78754 x9sm1102550lfr.141 - gsmtp
Feb 06 16:38:14 testvds dotnet[707484]: ---> MailKit.Net.Smtp.SmtpCommandException: 5.7.14 <https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbt
Feb 06 16:38:14 testvds dotnet[707484]: 5.7.14 A-_pDOhSafDTp_etpXkmB3ppujBWY7knRO_vyxd1BTaqSTE1zzL3aW5TIVRWrkPxuZXDQ
Feb 06 16:38:14 testvds dotnet[707484]: 5.7.14 9UxknBuGN0Nq4A7XL-J2qwN78JmSrSapV-mcVa9R6XbYAIHD3bwZgUOfVvI0hST5>
Feb 06 16:38:14 testvds dotnet[707484]: 5.7.14 Please log in via your web browser and then try again.
Feb 06 16:38:14 testvds dotnet[707484]: 5.7.14 Learn more at
Feb 06 16:38:14 testvds dotnet[707484]: 5.7.14 https://support.google.com/mail/answer/78754 x9sm1102550lfr.141 - gsmtp
Feb 06 16:38:14 testvds dotnet[707484]: --- End of inner exception stack trace ---
Feb 06 16:38:14 testvds dotnet[707484]: at MailKit.Net.Smtp.SmtpClient.AuthenticateAsync(Encoding encoding, ICredentials credentials, Boolean doAsync, CancellationToken cancellationToken)
Feb 06 16:38:14 testvds dotnet[707484]: at MetanitConfirmEmail.Services.EmailService.SendEmailAsync(String email, String subject, String message) in C:\Users\user\source\repos\MyProject\Services\EmailService.cs:line 24
...
Answer the question
In order to leave comments, you need to log in
I'm looking for information on setting up smtp in nginx but can't find anything.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question