Spam Mail

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How can I tell the SmtpMail class to send mail that will not end in the spam
folder of the destination mailbox?
Currently, every e-mail message that I send ends up in the span/junk folder
if at all (in most of the times the message is rejected, and I have no idea
why).
Thanks in advance.
 
Amir Shitrit said:
How can I tell the SmtpMail class to send mail that will not end in the spam
folder of the destination mailbox?
Currently, every e-mail message that I send ends up in the span/junk folder
if at all (in most of the times the message is rejected, and I have no idea
why).
Thanks in advance.

Hi,
I don't think this is related to SmtpMail class, rather to junk mail filter
configuration. However, few notes:

Most common reason for SMTP server to reject incoming email is:

a) relaying (mail destination mailbox must be on local server). You cannot
connect to arbitrary smtp server and request delivery. You'll have to
resolve MX (mailer exchange) record and deliver to that SMTP server. For
example, if you wont to deliver to yahoo.com, you have to connect to
mx1.mail.yahoo.com (mx2.mail.yahoo.com or other alternative server). This
will depend on your network setup and server you use. If you use local smtp
server, it has to be configured to allow relaying (then you don't have to
resolve MX records yourself, server will do that for you). If you use your
internet provider smtp server, provider will have it's own rules whether to
enable relaying or not (probalby not).

b) unspecified senders address (from field)

c) unresolvable domain (sent in HELO field as part of SMTP protocol)

For spam, it is local to the recipient configuration what will be reported
as spam. Most common filter is difference between "to" address field and
"rcpt to" sent to the server during mail sending.

I suggest you check smtp error codes sent during sending of email (use
network protocol analyzer if neccessary, ethereal is free) and check RFC's
on the internet with description of SMTP protocol.

HTH,
Goran
 
I had a feeling it wasn't related to the SmtpMail class, but I did managed to
send mail to yahoo and hotmail mailboxes.
However, some other mail service providers rejected my exact mail (walla.com).
I will try to check the error codes as you suggested.
Thank you very much.
 
This issue is related to the destination email address's mail server. If
"walla.com" is a junk filter at the destination server, you don't have any
chance to to.

Good luck ...
 
Amir Shitrit said:
I had a feeling it wasn't related to the SmtpMail class, but I did managed to
send mail to yahoo and hotmail mailboxes.
However, some other mail service providers rejected my exact mail (walla.com).
I will try to check the error codes as you suggested.
Thank you very much.

Mail exchangers for walla.com are: rmail11.walla.com (MX preference 20) and
rmail.walla.com (MX preference 10). Try to connect to one of these servers
to send mail.

Goran
 
1. Are you saying that I must be familiar with all the exchange servers of my
mail recipients?
2. What's MX preference?
 
Amir Shitrit said:
1. Are you saying that I must be familiar with all the exchange servers of my
mail recipients?

Yes, you have to resolve MX record over DNS. This is only if you are not
using your internet provider SMTP server or your organization SMTP server
that allows relaying and handles DNS resulution for you. My instinct would
be to use one with highest MX preference.

MX records tells you where to drop mail for specified domain.

I don't think there is an easy way to do MX record lookup programatically as
it looks to me .NET framework does not support it. You can do it in command
prompt, using nslookup:

D:\Temp>nslookup
Default Server: *.*.*.*
Address: *.*.*.*
set type=mx
walla.com
Server: *.*.*.*
Address: *.*.*.*

Non-authoritative answer:
walla.com MX preference = 20, mail exchanger = rmail11.walla.com
walla.com MX preference = 10, mail exchanger = rmail.walla.com
....


Have you tried to deliver mail to servers I posted?
2. What's MX preference?


http://www.webopedia.com/TERM/M/MX_record.html
http://en.wikipedia.org/wiki/MX_record

Regards,
Goran
 
Goran Sliskovic said:
....
that allows relaying and handles DNS resulution for you. My instinct would
be to use one with highest MX preference.
....

Auch, my instinct is wrong. You should use one with the lowest number...
Never trust your instincts :)...

Regards,
Goran
 
Back
Top