.NET System.Net.Mail messages are always being flagged junk, on internal server.

Posted by jamone on Stack Overflow See other posts from Stack Overflow or by jamone
Published on 2010-05-25T19:01:21Z Indexed on 2010/05/25 19:11 UTC
Read the original article Hit count: 182

Filed under:
|
|
|

I'm using System.Net.Mail to send out a few emails. The emails are being sent by our internal mail server to local addresses. However all of the messages are going straight to junk in Outlook. The messages are being sent from valid email addresses. What would be causing our our servers to label it as junk?

MailMessage msg = new MailMessage();
msg.IsBodyHtml = true;
msg.Subject = subject;
msg.Body = body;
msg.From = new MailAddress(from);
msg.To.Add(to);
SmtpClient client = new SmtpClient(server, 25);
client.Send(msg);

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET