tags:

views:

84

answers:

5

I'm using this code for sending mails. But these mails arrive in spam folder.

MailMessage message = new MailMessage();

message.From = new MailAddress(ConfigurationSettings.AppSettings["From"]);
message.To.Add(new MailAddress(ConfigurationSettings.AppSettings["To"]));
message.Subject = ConfigurationSettings.AppSettings["Title"];
message.Body = ConfigurationSettings.AppSettings["Body"];

SmtpClient client = new SmtpClient();
client.Send(message);

Why? How can i do?

thank

A: 

You may need to set up a Sender Policy to convince the recievers email service that you are who you cailm to be.

runrunraygun
A: 

Looks innocent from the code part. Check the contents of your fields from the configuration. One of them has to contain something which triggers the spam-detection on the receiver-side. You cannot decide from the sender-side in which folder a mail arrives, that's completely receiver-side logic.

Kosi2801
A: 

Try to include aditional header like the "X-Mailer" and authenticate with a SMTP server.. :)

TiuTalk
+2  A: 

Here is some good recommendations to avoid your emails being marked as SPAM http://swiftmailer.org/wikidocs/v3/tips/spam

Kirzilla
A: 

Hi, View the headers of the sent message. Some times spam checking software will provide hints (spam assasin does) of why your message is marked as spam.

If you don't understand them, post those headers here, and we can take a look at them.

Cheers!

Dave

dave wanta