SMTP not relaying all emails

B

BrassicaNigra

Greetings,

Our production control application sends notices to various recipients when
certain events occur. An example would be an order confirmation email that
is sent to the customer and our inside sales rep when an order is placed.

Most of the time the customer receives this email but the inside sales rep
never gets these (they did up until about six weeks ago). I have a yahoo.com
email account that is setup to receive these notifications and they all
arrive at that inbox so I know they are being sent.

The application that generates the email is an asp.net website and it uses
the SMTP server that is part of Exchange server on our SBS2003 box which also
hosts the production control app.

We do not (yet) host our email internally so none of the inside users have
email accounts in this instance of Exchange. All we use it for at present is
SMTP. Our email is hosted by a third party hosting service. All of the
inside users are using Outlook 2007.

Following is the code that sends the emails

try
{
CDO.Message oMsg = new CDO.Message();
CDO.IConfiguration iConfg;
iConfg = oMsg.Configuration;
ADODB.Fields oFields;
oFields = iConfg.Fields;
ADODB.Field oField =
oFields["http://schemas.microsoft.com/cdo/configuration/sendusing"];
oField.Value = CDO.CdoSendUsing.cdoSendUsingPort;
oField =
oFields["http://schemas.microsoft.com/cdo/configuration/smtpserver"];
oField.Value = "aaserver";
oFields.Update();
oMsg.From = "(e-mail address removed)";
oMsg.To = "(e-mail address removed); (e-mail address removed)";
oMsg.Subject = "Test";
oMsg.TextBody = "Hello, world!";
oMsg.Send();
}
catch (Exception ex)
{
Response.Write(ex.Message);
}

Any light you can shed on this would be greatly appreciated.

Thank you.

Dale Hoffman
 
C

Cowboy \(Gregory A. Beamer\)

There are a couple of things to consider, and none of them are directly
related to ASP.NET.

1. The receiving end, at aapcb.com perhaps, has a spam filter that is
blocking your sent email. If that is the case, the company in question has
to uncblock the emails.

2. The emails are flagged due to having the SMTP Server in another domain,
different from the domain the sending email is stated to be from. For
example, you say the email is from (e-mail address removed) and the server is
located at GoDaddy. In this case, tyhe SMTP Server has to be configured so
your domain is added. There are limited rule sets in the IIS SMTP Server,
and I am not sure exactly what you do here to fix it.

Two things about #2:

A) If the sender and receiver are in different domains, there are cases it
will not send. But, if other receivers are in the same domain, it will.

B) If it is spam blocked, the receiver can set it so it allows the GoDaddy
server to send an email from (e-mail address removed) or (e-mail address removed), etc.

3. the open email accounts, like Yahoo, GMail, Hotmail, Live, etc. will
generally let pretty much everything through, although they do SPAM box
emails with certain rules. This means Yahoo is not a good account provider
to see if you are getting SPAM checked.

In short:

1. Check relaying rules for messages on the SMTP server
2. Ensure your sender email domain is valid for the SMTP server
3. Check SPAM rules at your clients place

I am sure someone else can shed even more light on this.


BrassicaNigra said:
Greetings,

Our production control application sends notices to various recipients
when
certain events occur. An example would be an order confirmation email
that
is sent to the customer and our inside sales rep when an order is placed.

Most of the time the customer receives this email but the inside sales rep
never gets these (they did up until about six weeks ago). I have a
yahoo.com
email account that is setup to receive these notifications and they all
arrive at that inbox so I know they are being sent.

The application that generates the email is an asp.net website and it uses
the SMTP server that is part of Exchange server on our SBS2003 box which
also
hosts the production control app.

We do not (yet) host our email internally so none of the inside users have
email accounts in this instance of Exchange. All we use it for at present
is
SMTP. Our email is hosted by a third party hosting service. All of the
inside users are using Outlook 2007.

Following is the code that sends the emails

try
{
CDO.Message oMsg = new CDO.Message();
CDO.IConfiguration iConfg;
iConfg = oMsg.Configuration;
ADODB.Fields oFields;
oFields = iConfg.Fields;
ADODB.Field oField =
oFields["http://schemas.microsoft.com/cdo/configuration/sendusing"];
oField.Value = CDO.CdoSendUsing.cdoSendUsingPort;
oField =
oFields["http://schemas.microsoft.com/cdo/configuration/smtpserver"];
oField.Value = "aaserver";
oFields.Update();
oMsg.From = "(e-mail address removed)";
oMsg.To = "(e-mail address removed); (e-mail address removed)";
oMsg.Subject = "Test";
oMsg.TextBody = "Hello, world!";
oMsg.Send();
}
catch (Exception ex)
{
Response.Write(ex.Message);
}

Any light you can shed on this would be greatly appreciated.

Thank you.

Dale Hoffman
 
A

Allen Chen [MSFT]

Hi Dale,

I think what Gregory said is reasonable. From your description, the ASP.NET
part is ok since the email can be received by the outside users. Since this
newsgroup is dedicated for ASP.NET issues I suggest you contact the third
party email hosting provider first. If they are sure there's no problem on
their side it's probably caused by the settings of the Outlook.

If you need further assistance you can contact CSS for incident based
support:

http://support.microsoft.com/select/default.aspx?target=assistance&ln=en-us

Our dedicated support engineer will work with you to investigate this issue.

Regards,
Allen Chen
Microsoft Online Support
 
A

Allen Chen [MSFT]

Hi Dale,

I think what Gregory said is reasonable. From your description, the ASP.NET
part is ok since the email can be received by the outside users. Since this
newsgroup is dedicated for ASP.NET issues I suggest you contact the third
party email hosting provider first. If they are sure there's no problem on
their side it's probably caused by the settings of the Outlook.

If you need further assistance you can contact CSS for incident based
support:

http://support.microsoft.com/select/default.aspx?target=assistance&ln=en-us

Our dedicated support engineer will work with you to investigate this issue.

Regards,
Allen Chen
Microsoft Online Support
 
S

sloan

Yeah, I did.

My point is that he is using the CDO.Message COM library instead of the
DotNet classes.

Instead, my samples use the:

1.1 : System.Web.Mail.MailMessage
2.0 : System.Net.Mail.MailMessage



My recommendation is to swap out the old for the new.


If he were using an ADODB Com library for database access, ... which will
work of course in DotNet (but is probably not the best way), I would
recommend updating his db access technology.




My code sample is downloadable, look for the link.

Did you really read his post? He is able to send an email but not to
all email addresses.
 
G

Guest

Yeah, I did.

My point is that he is using the CDO.Message COM library instead of the
DotNet classes.

Instead, my samples use the:

1.1 :  System.Web.Mail.MailMessage
2.0 :  System.Net.Mail.MailMessage

I agree, Dale needs to use System.Net.Mail, but this seems not help to
solve the original problem. He receives his notifications using
yahoo.com
email account, so I guess CDO is working right.
 
B

BrassicaNigra

Thank you all for your help. I have achieved a work around for this problem,
but have never figured out why it suddenly stopped working for some
recipients. I suspect this has to do with our third party email host, but
they do not seem to be able to understand what their role (if any) might be
in this.

I am now using full authentication of the sender's address and am no longer
using the SMTP server in our SBS2003 Exchange server engine. This has
resolved the problem and I guess why it suddenly stopped working will remain
a mystery.

Again, thank you all for your help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top