Microsoft 365 features that help users manage their subscriptions, account settings, and billing information.
Hi Barry,
Thanks for your answer.
Yes, I am using SMTP client submission.
This is the c# code:
var smtpClient = new SmtpClient()
{
Host = "smtp.office365.com",
Port = 587,
UseDefaultCredentials = false,
EnableSsl = true
};
smtpClient.Credentials = new NetworkCredential("******@test.nl", "xxxxx");
var message = new MailMessage
{
From = new MailAddress("******@test.nl"),
Sender = new MailAddress("******@test.nl"),
Subject = "Test mail",
IsBodyHtml = false
};
message.To.Add("******@test.nl");
message.Body = "This is a test mail. ";
smtpClient.Send(message);
The problem is that this code is working fine most of the time; we are sending hundreds of mails every day like this without any problem. But every now and then the SMTP server returns this error and when we try to send the same mail again it sometimes succeeds and sometimes fails again.
I don't think the problem is releated to the settings at out side since it is working most of the times.