Click here to Skip to main content
13,860,894 members
Click here to Skip to main content
Add your own
alternative version

Tagged as


3 bookmarked
Posted 29 Feb 2012
Licenced CPOL

Preventing gmail to mark our mails as spam

Rate this:
Please Sign up or sign in to vote.
Rencently I've discovered the reason why all the mail messages sent by my Web app were putted on spam folder when the "to" header ends with "".

You must include "Message-Id" header or your message will be treated as spam by Google.

This is the easy way to do this with System.Net.Mail.MailMessage Class:
Message.Headers.Add("Message-Id", String.Concat("<", Now.ToString("yyMMdd"), ".", Now.ToString("HHmmss"), ">" ))

And that's all (obviusly you must follow the Google recommendations too).

Wish to save at least the same time that I spent resolving this to many of you.


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


About the Author

Santiago Santos Cortizo
Software Developer (Senior) TokApp OnLine, S.L.
Spain Spain
Software architect expert in #cloudcomputing #server #mobile #web #dotnet #php #sql #HTML5

You may also be interested in...

Comments and Discussions

QuestionReply Pin
Member 306572917-Feb-14 7:07
memberMember 306572917-Feb-14 7:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Cookies | Terms of Use | Mobile
Web05 | 2.8.190214.1 | Last Updated 1 Mar 2012
Article Copyright 2012 by Santiago Santos Cortizo
Everything else Copyright © CodeProject, 1999-2019
Layout: fixed | fluid