Solved

CDO created message goes as Junk mail in Outlook

Posted on 2004-04-22
14
4,021 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
 
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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

705 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now