?
Solved

SMTP email via asp.net

Posted on 2011-04-26
16
Medium Priority
?
657 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.  
0
Comment
Question by:santaspores1
  • 9
  • 5
  • 2
16 Comments
 
LVL 38

Expert Comment

by:Tom Beck
ID: 35467096
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?
0
 

Author Comment

by:santaspores1
ID: 35467126
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.
0
 
LVL 12

Expert Comment

by:FarWest
ID: 35467464
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
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:santaspores1
ID: 35467572
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.
0
 
LVL 12

Expert Comment

by:FarWest
ID: 35467715
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
0
 

Author Comment

by:santaspores1
ID: 35468481
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?
0
 

Author Comment

by:santaspores1
ID: 35468497
nslookup [my web server's IP] does NOT get results... I get "Non-existent domain"
0
 
LVL 12

Expert Comment

by:FarWest
ID: 35468589
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
0
 

Author Comment

by:santaspores1
ID: 35469857
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...
0
 

Author Comment

by:santaspores1
ID: 35470195
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...
0
 

Author Comment

by:santaspores1
ID: 35470531
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"
0
 

Author Comment

by:santaspores1
ID: 35474333
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?
0
 
LVL 12

Accepted Solution

by:
FarWest earned 2000 total points
ID: 35474738
I wish you good luck,
I don't think that Simple Network Management Protocol Service has that effect on smtp
I suggest next time when service stops just try to disable-enable the NIC card , and check if it works

wish you good luck,
0
 

Author Closing Comment

by:santaspores1
ID: 35484523
Still no solution for me... but there was no new activity and I certainly appreciate your help!
0
 
LVL 38

Expert Comment

by:Tom Beck
ID: 35484823
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.

0
 
LVL 12

Expert Comment

by:FarWest
ID: 35484904
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
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

The core idea of this article is to make you acquainted with the best way in which you can export Exchange mailbox to PST format.
Want to know how to use Exchange Server Eseutil command? Go through this article as it gives you the know-how.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
The video tutorial explains the basics of the Exchange server Database Availability groups. The components of this video include: 1. Automatic Failover 2. Failover Clustering 3. Active Manager
Suggested Courses
Course of the Month13 days, 23 hours left to enroll

807 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