Hi,
I’m trying to switch from SendGrid to Brevo, using the same C# code, just changing my SMTP configuration. I have successfully changed my DNS configuration on CloudFlare and verified it in Brevo. Using the following code with the SMTP settings provided by Brevo, I get the server error « 5.7.0 Please authenticate first »:
public Task SendEmailAsync(MailMessage mailMessage)
{
var client = new SmtpClient(config.Host, config.Port)
{
UseDefaultCredentials = false,
Credentials = new NetworkCredential(config.Username, config.Password, config.Domain)
};
return client.SendMailAsync(mailMessage);
}
Any idea why I’d be getting this error?
Thanks!