[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

CDO created message goes as Junk mail in Outlook

Posted on 2004-04-22
14
Medium Priority
?
4,090 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
Fill in the form and get your FREE NFR key NOW!

Veeam® is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

 
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

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

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

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
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…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

650 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