problem in Sending email in c#

D

DAXU

Hi,

I wrote a small function to send email in c#
function detail:
{
MailMessage theMailMessage = new
MailMessage("(e-mail address removed)",
"(e-mail address removed)");
theMailMessage.Body = @"The PNC daily feed for 28 Jan 2008
was not imported.

t: 01732 373122 f: 01732 373121 e: (e-mail address removed)
";
theMailMessage.Subject = "Ford Report";

SmtpClient theClient = new SmtpClient("localhost");
theClient.UseDefaultCredentials =true;

theClient.Send(theMailMessage);
}
The email was sent to me but I received in the junk email folder (we
use exchange server, and I found that email in my junk).
So why exchange server think that it is a junk? Is there some options
I need to add to make the email not junk?

Many Thanks

Jerry
 
P

Peter Ritchie [C# MVP]

Exchange/outlook probably thinks use of "localhost" is something a spammer
would do. You could try using an IP or the real computer name.

Otherwise, this is an Exchange/Outlook issue; I would try asking this
question on an Exchange NG or an Outlook NG.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top