FluentEmail
FluentEmail copied to clipboard
SendGrid demands categories to be set
When we upgraded to the latest release, our emails stopped sending via SendGrid with the following error in the response:
"{\r\n \"message\": \"The categories array, when used, must have at least one category.\",\r\n \"field\": \"categories\",\r\n \"help\": \"http://sendgrid.com/docs/API_Reference/Web_API_v3/Mail/errors.html#message.categories\"\r\n}"
Installed version: 3.0.2
Workaround seems to be to set the .Tag
property to some string.
We just hit this same issue with SendGrid e-mails failing to send after updating.
Issue still exists and the ☝️ workaround works
So apparently I had the same issue, the initial call was :
var sendResponse = await _fluentEmail
.To(email)
.Subject(mailTitle)
.Body(body, true)
.Tag("string")
.SendAsync();
which resulted in sending only the first email in a Foreach loop, so I had to replace it to :
var sendResponse = await _fluentEmail
.To(email)
.Subject(mailTitle)
.Body(body, true)
.Tag($"{GenerateUnique()}")
.SendAsync();
to be able to work around this issue.
I think a fix for this has already sneaked into master via this PR. So just a release away 😉
Okay.... this is still not yet realease
Thanks @jazzmanro for the work-around. Seems the PR is merged but not released. I guess @lukencode is buried in his full-time role as dad and CTO (understandable). Does anyone else have release authority? @bjcull? 🙏
I can't release anything on this repo, but I made a fork and integrated a bunch of the open PRs and made my own release:
https://github.com/jcamp-code/FluentEmail