We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

SMTP email via asp.net

Medium Priority
681 Views
Last Modified: 2012-05-11
Hi,

I have recently been having intermittent problems sending email via asp.net.  The process has worked well for years... but just started acting up.  Most of the time my auto-generated asp.net emails work perfectly... but occasionally I get an error along the lines of "The transport failed to connect to the server".  I can connect to the server just fine using telnet.  

I also noted that backup exec stopped sending backup complete notifications.  Because Backup exec is a far more simple interface I was testing using it.  In backup exec there is a simple email-generation test.  I entered my SMTP mail server, I used 25 as the port, I used whatever as the sender name and used wahtever as the sender address (a non-existent address).  The test emial didn't work.  So I used an IP for the server address to make sure it wasn't a DNS issue... test still failed.  I used a real address on the same smtp email server for the sender address... test still failed.  I rebooted and tried again and it went through.  By the next morning it was no longer working.

All the while, my asp pages are generally working and sending emails... but occasionally they fail and cause the app pool to hang.  

I don't think it is a firewall issue.  And I can connect via telnet.

Windows server 2003.  SMTP is not installed on the server.  
Comment
Watch Question

CERTIFIED EXPERT
Top Expert 2015

Commented:
Do the recipients vary or are the emails always to the same recipient?

Is the email server hosted or is it in-house, under your control?

Did you run your email server through a checker like MXToolbox.com to see if there are any issues with blacklists, reverse lookups, etc?

Author

Commented:
The recipient list is always the same... the people in our office.  There is a drop down of names and you can select who you want to send to...

The smtp is not under my control

email server checker... no, not under my contol.  I though it might be relay problem... but it works a large portion of the time... or at least the asp pages do.  Backup exec has basically stopped sending email.

Commented:
I advise you to enable tracing, and see exactly what are the message,
when you test by telnet did you send complete simple email commands, or just open telnet port
sometimes it can be a workload issue on the smtp server,
good luck

Author

Commented:
The email test from backup exec isn't working... and it is a standardized msg.  
When I tested in telnet I actually sent an email with a subject line and body.

Commented:
maybe  it is a DNS issue, but not in the SMTP server rather than in your IIS,
some advanced smtp server uses reverse dns check to any machine that tries to send emails, what you can do to check is form any other computer run nslookup and look for you iis server by name, and by IP and check if both works fine, if not check reverse lookup zone in DNS

Author

Commented:
fryezz:  From my personal desktop I can:
nslookup [my web server's fqdn]
it returns the fqdn and the ip address.

will that do as a reverse lookup test?

Author

Commented:
nslookup [my web server's IP] does NOT get results... I get "Non-existent domain"

Commented:
ok , that means reverse lookup is not ok, because when you type the IP it should return Web Server FQDDN
try goto the web server and from the cmd window, type ipconfig/registerdns
wait for a while and check

Author

Commented:
wow... went to dns and found no reverse lookup zone entry.  I use to have one.  I have just created one.  When I click "launch NSlookup" from within the DNS management console it works... which should indicate a working reverse lookup zone.  I cleared the cache and updated dns.  I'll give it half and hour and check again...

Author

Commented:
Well reverse lookup is in place and I guess it is working.  nslookup from my personal desktop is still not working but that might be related to the fact that the server is in a demilitarized zone.  Backup exec is still not sending emails.  If it still not working in the morning I will restart the server as well...

Author

Commented:
hmmm... maybe it is still not working.  From my machine I typed:

nslookup [the web server's ip address] [the FQDN of the primary name server used in the demilitarized zone]

That didn't work. It responds with [name of the specified name server] cant find [the ip address specified]

I suspect that it should work unless it is a firewall issue.  If I issue the same command from the web server itself I get "dns request timed out" and "request to unknown timed out"

Author

Commented:
So I came back the next morning and could still not send a test email through backup exec.  I rebooted the server and, as happened the last time I rebooted, things are working fine again.  The backup exec test email went through.

I noticed that all though I don't have SNMP installed on the server, I do have an SNMP service that is configured to start automatically.  I wonder if that service was stopped before?  Anyway I made one change to the service - I set it to restart the service upon first and second failure (but not subsequent failures.  Of course even if I find out the service is stopping and restarting the service fixes everything... I would still need to know what is causing the failure...

I will continue to monitor things.  I am assuming that at some point I will no longer be able to receive the backup exec test emails.  I wonder if that will happen just after the first mail delivery failure from the asp pages?
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
Still no solution for me... but there was no new activity and I certainly appreciate your help!
CERTIFIED EXPERT
Top Expert 2015

Commented:
I'll just through this in the mix for what it's worth.

Something @fryezz said about the NIC in his last post triggered a recall of a problem I had on a Windows 2003 server. The server was an SMTP server (unlike yours) with Exchange and it also ran Backup Exec. Problems with emails sometimes not being sent. After monitoring port 25 with Wireshark, I noticed intermittent connection errors, sometimes fatal for sending emails out, sometimes not. After an exhaustive web search, the solution was to disable all checksum offloading on the NIC (Device Manager-->right-click NIC-->Properties-->Advanced. Turn off all properties beginning with "Offload...").  It would not do any harm to run it like that for a day or two to see if it has any affect on the problem.

Commented:
thank you very much, I wished that I had provided a real help.
just to make sure, is the backup exec and iis on the same server?
is there any proxy like ISA or TMG involved?

I will try to get back to you with any updates related to debugging and fixing this issue

thanks again
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.