Hi Team,
We have recently download the ASP.Net Core 3x with Anguylar 9.x (version 8.6) and we deployed the solutin to azure using release mode. I have set the AllowTenantsToChangeEmailSettings to true in the YourProjectNameConsts.cs under the *.Core.Shared project. Looking at a previous users questoin answere via ASP.NET zero team, i have set the following setting on the Email(SMTP) tab under admin -> settings,
Default from (sender) email address: Set to address of choice Default from (sender) display name: Set to address of choice SMTP host: smtp.sendgrid.net SMTP port: 587 Use SSL: unchecked Use default credentials: unchecked Domain name: sendgrid.net User name: Your SendGrid Username Password: Your SendGrid Password
but no matter what I set when I click the "Send Test Email" button under the Email(SMTP) tab under admin -> settings, I get "An internal error occurred during your request!" error. As shown on screenshot below
Is there anyting I have missed?
Thanks
4 Answer(s)
-
0
hi andry3ag
Please check the log of your application. It contains detailed information about the error.
-
0
andry3ag,
Not sure if you solved this yet or not, but thought I'd post my findings here in case it helps someone. I just went through setting this up and found this posting:
https://sendgrid.com/docs/API_Reference/SMTP_API/getting_started_smtp.html
The most important part of it is that the credentials are not your credentials for the SendGrid site. You first need to create an API Key here:
https://app.sendgrid.com/settings/api_keys
NOTE: Make sure to save the generated value as you can never get it back
Then for the SMTP credentials use the following:
Username: apikey (this is the same for everyone as per the first url) Password: {apikey value you generated}
Also, the post mentions a couple of different ports that are available. Both 25 and 587 worked for me. Port 465 with SSL checked also worked for me. I hope this helped.
-
0
Thanks @sanjayeig @andry3ag, you can check the log files for error details as @maliming suggested. We can try top help you when you share the error message. But, such problems are related to misconfiguration most of the time.
-
2
Hey,
I've also had success with sendgrid recently
See my answer here
https://support.aspnetzero.com/QA/Questions/4661/Is-anyone-using-SendGrid-emails-successfully#answer-efedb2ba-e4a5-4118-5735-39f728ca6d9a