Sending email with C# sdk gmail block

ErezM
ErezM
edited March 10 in SendGrid

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

If this is an emergency, please contact Twilio Support. This is not an official Support channel. https://support.twilio.com/
Have an urgent question?
Please contact Twilio Support. This is not an official Support channel.
Contact Support