SMTP email via asp.net
Posted on 2011-04-26
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.