?
Solved

CDO created message goes as Junk mail in Outlook

Posted on 2004-04-22
14
Medium Priority
?
4,068 Views
Last Modified: 2009-07-29
Hi everybody,
In my web application i have a functunality to send mails to users ( i've done this many times )
The problem that i have right now is that these messages are recognized as Junk Mail from Microsoft Outlook 2003
I've tried to manage the headers but with no luck
are there some rules that can be keep to mails not goin' as a Junk Mail

Thanks
0
Comment
Question by:mmarinov
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 6
14 Comments
 
LVL 5

Expert Comment

by:chaniewskim
ID: 10886436
Could you please post your CDO code?
0
 
LVL 5

Expert Comment

by:chaniewskim
ID: 10886460
It can go to junk folder if you fill only From field of message.
Try to add Reply-To header with the same email.
0
 
LVL 28

Author Comment

by:mmarinov
ID: 10886486

System.Web.Mail.MailMessage mes = new System.Web.Mail.MailMessage();
mes.To = "someemail@some.com";
mes.From = "from@some.com";
mes.Subject = "Subject";
mes.Body = "this is a body of message";
mes.BodyFormat = System.Web.Mail.MailFormat.Html;
mes.Headers.Add("content-type","text/html; charset=windows-1251");

System.Web.Mail.SmtpMail.SmtpServer = ConfigurationSettings.AppSettings["SMTPServer"];//this is localhost
System.Web.Mail.SmtpMail.Send( mes );

b..m

0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
LVL 5

Expert Comment

by:chaniewskim
ID: 10886513
mes.Headers.Add("Return-path","from@some.com");
mes.Headers.Add("Message-ID","123445@some.com");


RFC 822 defines message-ID as a unique identifier for each version of each message, in the form local-part@domain.

Example
123456@microsoft.com
0
 
LVL 5

Expert Comment

by:chaniewskim
ID: 10886535
look for example at headers of emails from expert-exchange
you have return-path and message-id there
and maybe you'll find other hints there if it is not enough
0
 
LVL 5

Expert Comment

by:chaniewskim
ID: 10886542
and of course not 'Reply-To header' but 'Return-path header' , disregard my second answer
0
 
LVL 28

Author Comment

by:mmarinov
ID: 10886566
ok
the wird problem is that:
now when i use the code posted above is not moving my message to the Junk Mail
but if i add

mes.Body = "<img src=\"http:/localhost/vpath/images/ok.gif\"this is a body of message";
the message was moved to the Junk Mail
Is there a format for the images when they are added to the message?

B..M
0
 
LVL 5

Expert Comment

by:chaniewskim
ID: 10886598
Try to set complete HTML page as Body

mes.Body = "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML//EN\"><html><head></head><body><img src=\"http:/localhost/vpath/images/ok.gif\">this is a body of message</body></html>"
0
 
LVL 28

Author Comment

by:mmarinov
ID: 10886632
nope,
it won't work
i've tried it before and right now - and again i have Junk Mail :-(
0
 
LVL 5

Accepted Solution

by:
chaniewskim earned 1500 total points
ID: 10886720
That filter looks for some kind of patterns: a lot of exclamations, ALL-CAPS-TEXT, 'Viagra'-like words etc.
Maybe it doesn't like messages with an image and a little of text. Try to compose your message in other way, add text on beginning or more text after image.

0
 
LVL 28

Author Comment

by:mmarinov
ID: 10886861
no this don't help me :(
i'll compare the EE newsletter message and check where is the problem
i'll post as fast as i get the rezult

i hope that there are other experts that were going through this problem and can share their solutions

THanks for now chaniewskim
B..M
0
 
LVL 5

Expert Comment

by:chaniewskim
ID: 10886966
Try to insert a blank line after headers by using \r\n with last custom header.
0
 
LVL 28

Author Comment

by:mmarinov
ID: 10887042
no, this is not what is the problem
as i search through difference between one message that i received correctly and the other that not
there are too many difference in the Header section
so i'll have to change them and will folow up
B..M
0
 
LVL 28

Author Comment

by:mmarinov
ID: 11058011
hi chaniewskim,

the delay was so big and please excuse me for this
for some reason the problem rize when you send in the header you add
Content-Type: text/html; charset="windows-1251" ( this is for ciryllic )
so when i remove it everything goes correct

actually i think that all the things come from the Outlook because sometime when i receive an notification from Expert-exchange the Outlook move it again in the Junk Mail
So because the problem was solved and you've helped me a lot i think that you derved your point

Thanks

B..M
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question