Solved

CDO created message goes as Junk mail in Outlook

Posted on 2004-04-22
14
4,026 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
  • 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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
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 500 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Flash (http://en.wikipedia.org/wiki/Adobe_Flash) has evolved over the years to where it has become a masterful tool for displaying content screen.  It has excellent layout placement, UI precision as well as rendering capabilities. This, along with t…
It seems a simple enough task, yet I see repeated questions asking how to do it: how to pass data between two forms. In this article, I will show you the different mechanisms available for you to do just that. This article is directed towards the .N…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …

776 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