Sending email with C# sdk gmail block
Hi
I created a SendGrid account (free tier for the moment), and implemented API to send emails from my C# application.
The process seems to work mostly (it ONLY sends a single recipient after a successful credit-card charge), but about half of @gmail.com recipients are rejected and appear in my “blocks” report as:
" 555 5.5.2 Syntax error. p10-20020a170902bd0a00b0014f8706592csi12525509pls.0 - gsmtp"
With different codes..
the code is pretty much the same as instructed:
var client = new SendGridClient(sendGridApi);
var from = new EmailAddress("[email protected]", "My Name");
var to = new EmailAddress(recipient);
var msg = MailHelper.CreateSingleEmail(from, to, subject, "", htmlContent);
var response = await client.SendEmailAsync(msg);
...
again, the code above DOES send email successfully, but not always.
Please see the following screenshot of blocked emails:
thanx,
ErezM
Categories
- 83 All Categories
- 19 SIGNAL 2021
- 376 Product Discussions
- 7 Community - Announcements
- 2 Changelog
- 4 Forum UI Updates
- 8 Welcome Guide
- 6 Community - Events
- 2 Twilio Relay Developer Conference 2021 Mega Thread
- 1 External Community Events
- 25 Inspiration
- 17 Community - Other Discussions
- 1 Community- Twilio Startups