We're currently migrating an Umbraco 7.9.2 application to Azure, and have decided to use Sendgrid for sending mail. However, we're now facing issues with the user invite mail from backoffice, when trying to invite a user the following exception is thrown "System.Net.Mail.SmtpException: The server committed a protocol violation".
I went about installing a local instance of Umbraco 7.9.2 to try this out without the past experience I had with Umbraco 8.x where I was able to get this to work.
The setup I'm sharing is one where I established a API key within SendGrid's administration site. I have also set this up through Azure's setup and there are some slightly different settings in that scenario.
I was able to get this to work locally on IIS just now with the following settings in my web.config,
I very quickly deployed to the Azure App service and the same settings worked as they did locally from the post above.
Hopefully this will work out for you too!
Please let me know if you went about establishing the SendGrid account information within the Azure Portal as there will be some slight differences when it comes to setting your userName and password settings.
Problem with user invite email and SendGrid
We're currently migrating an Umbraco 7.9.2 application to Azure, and have decided to use Sendgrid for sending mail. However, we're now facing issues with the user invite mail from backoffice, when trying to invite a user the following exception is thrown
"System.Net.Mail.SmtpException: The server committed a protocol violation".
Sendgrid is configured in mailSettings in web.config according to this article https://sendgrid.com/docs/for-developers/sending-email/v2-csharp-code-example/#using-nets-built-in-smtp-library. I've also tried adding the enableSsl attribute without success.
The issue occurs both locally and when deployed on Azure.
Has anyone else experienced this or might know something about the issue?
I went about installing a local instance of Umbraco 7.9.2 to try this out without the past experience I had with Umbraco 8.x where I was able to get this to work.
The setup I'm sharing is one where I established a API key within SendGrid's administration site. I have also set this up through Azure's setup and there are some slightly different settings in that scenario.
I was able to get this to work locally on IIS just now with the following settings in my web.config,
I was surprised by the generic 'apikey' used as the userName, but that's what worked.
I was able to get this to send successfully locally. I'm going to try and deploy this to Azure and see if this continues to work there as well.
I very quickly deployed to the Azure App service and the same settings worked as they did locally from the post above.
Hopefully this will work out for you too!
Please let me know if you went about establishing the SendGrid account information within the Azure Portal as there will be some slight differences when it comes to setting your userName and password settings.
Setting userName to apikey did the trick! Thanks a lot for your help!
A virtual bouquet of flowers from our team:
is working on a reply...
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.