-4

I have a to send an email from a form:

                    System.Net.Mail.MailMessage message = new     System.Net.Mail.MailMessage();
                    message.To.Add(user.adresseEmail);
                    message.Subject = "This is the Subject line";
                    message.From = new System.Net.Mail.MailAddress("ad@live.com");
                    message.Body = "Login"+user.UserID+"\nPassword"+user.pwdUser;
                    //planet,topnet,ttnet
                    System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient("smtp.topnet.tn");
                    smtp.Send(message);

But The email received not in box , but in Junk.Can you help me please?

tereško
  • 58,060
  • 25
  • 98
  • 150
Emna2013
  • 5
  • 6
  • Duplicate of [.NET System.Net.Mail messages are always being flagged junk, on internal server](http://stackoverflow.com/questions/2907644/net-system-net-mail-messages-are-always-being-flagged-junk-on-internal-server). Please search before you ask. – CodeCaster Apr 23 '13 at 09:05

1 Answers1

0

Try to change subject and body to be more user friendly. Probably your mail provider or mail client "thinks" that it is a spam message :)

Piotr Stapp
  • 19,392
  • 11
  • 68
  • 116