Click here to Skip to main content
15,888,113 members
Please Sign up or sign in to vote.
1.00/5 (4 votes)
See more:
I am sending a mail by asp.net but it goes to spam, Can any one tell to me how can i prevent this. I want mail comes directly in inbox rather than spam.
Posted
Updated 20-May-19 3:14am

You cannot control this through your code.

Spam filter settings are setup on the client and you simply have no control over it.
 
Share this answer
 
v2
Comments
Mas11 28-Jun-12 5:27am    
Thanks abhinav!!
Vani Kulkarni 28-Jun-12 5:36am    
True! 5'ed!
Abhinav S 28-Jun-12 5:45am    
Thanks.
Sergey Alexandrovich Kryukov 28-Jun-12 14:20pm    
Perhaps, enough said. My 5.
--SA
Abhinav S 28-Jun-12 22:16pm    
Thank you.
Hi,

Unfortunately I have to disagree in some points with Abhinav :)
It is true that you cannot control the spamfilter itself, but you can control the sent email, that the spam filter does not detect the mail as spam.

There are several points you have to look at (only written a few, there are many checks a spam-filter is executing):

- Emails which are sent from a mail-server domain which is not the same as the sender email domain will mostly treated as spam
- Emails where the sender adress does not exist (worse: the sender domain does not exist) are treated as spam
- Emails with too less text (and worse: with too less text and a hyperlink) will be treated as spam

I always had problems with sending emails on behalf of a user. That's not a good practice, you should better use the reply-to address property.
Also adding some more text to the email helps.

Hope this helps :)

Best regards and happy coding,
Chris
 
Share this answer
 
Comments
Sandeep Mewara 29-Jun-12 7:06am    
Good info. 5!
Bookmarked too!
Christoph Keller 29-Jun-12 7:10am    
Thanks! :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900