It seems that there are dozens of threads in the forums about email issues, and most of them are pretty simply relaying type issues. However, I have one that doesn't seem to line up with this. I have several DNN installations from 4.94 on up on this same server all identical SMTP settings. All of the other installations but the DNN 5.5. work flawlessly. I can send a SMTP test email in Host > Host Settings. However if I send using Admin > Newsletters or any other module I have a delay of around a minute, I get a message that the email could not be sent, and I see an error in the event logs. I've tested just about every configuration possible and have boiled it down to the following facts:
- This installation was originally DNN 5.4.4 and we had the issue with this DNN version. We upgraded to DNN 5.5 after we saw an excellent blog post from Chad Nash and the issue remains.
- No URL rewriting is being done. We were using the URL Master module, but it is now disabled.
- The admin and host emails are both set to valid email accounts on the server, but in our tests this did not make any difference.
- The exact same SMTP settings are being used on our other DNN installations on this same server without an issue.
- We run our own mail server (MailEnable Enterprise 4.2.4), located on a seperate physical box, and it is configured properly to allow relay from the web server's IP.
- I have also tested using authenticated SMTP and this didn't make a difference.
- If I restart the application in Host > Host Settings I can get email sent by Admin > Newsletters to work for a few times. After a a seemingly random number of tests (I have seen it send 5 -30 without fail) it starts to fail again.
- From what I can tell, I cannot send again until the application pool recycles.
- When I can get some emails to work in Admin > Newsletters after a application restart, it sends out a "SMTP Configuration Test" email each time I send email from Admin > Newsletters.
- When I can get it to work, I am able to send to email addresses local to the mail server and remote addresses.
- I can ALWAYS send a SMTP test email in Host > Host Settings.
- I get one of the two errors in the event log after each failure:
============================================
AssemblyVersion: 5.5.0
PortalID: 6
PortalName: Go Find the Answer
UserID: 3
UserName: shackney
ActiveTabID: 237
ActiveTabName: Newsletters
RawURL: /Admin/Newsletters.aspx
AbsoluteURL: /Default.aspx
AbsoluteURLReferrer: http://www.gofindtheanswer.com/Admin/Newsletters.aspx
UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
ExceptionGUID: 1636c128-7a64-43a3-a110-8f26cdf1a941
InnerException: The operation has timed out.
FileName:
FileLineNumber: 0
FileColumnNumber: 0
Method: System.Net.Mail.SmtpClient.Send
StackTrace:
Message: System.Net.Mail.SmtpException: The operation has timed out. at System.Net.Mail.SmtpClient.Send(MailMessage message) at DotNetNuke.Services.Mail.Mail.SendMail(String MailFrom, String MailTo, String Cc, String Bcc, String ReplyTo, MailPriority Priority, String Subject, MailFormat BodyFormat, Encoding BodyEncoding, String Body, List`1 Attachments, String SMTPServer, String SMTPAuthentication, String SMTPUsername, String SMTPPassword, Boolean SMTPEnableSSL)
Source:
Server Name: NS2
============================================
AssemblyVersion: 5.5.0
PortalID: 6
PortalName: Go Find the Answer
UserID: 3
UserName: shackney
ActiveTabID: 237
ActiveTabName: Newsletters
RawURL: /Admin/Newsletters.aspx
AbsoluteURL: /Default.aspx
AbsoluteURLReferrer: http://www.gofindtheanswer.com/Admin/Newsletters.aspx
UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
ExceptionGUID: 43212b84-2f9c-47c5-b794-c9e136053907
InnerException: Failure sending mail.
FileName:
FileLineNumber: 0
FileColumnNumber: 0
Method: System.Net.Sockets.NetworkStream.Read
StackTrace:
Message: System.Net.Mail.SmtpException: Failure sending mail. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) --- End of inner exception stack trace --- at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) at System.Net.DelegatedStream.Read(Byte[] buffer, Int32 offset, Int32 count) at System.Net.BufferedReadStream.Read(Byte[] buffer, Int32 offset, Int32 count) at System.Net.Mail.SmtpReplyReaderFactory.ReadLines(SmtpReplyReader caller, Boolean oneLine) at System.Net.Mail.SmtpReplyReaderFactory.ReadLine(SmtpReplyReader caller) at System.Net.Mail.CheckCommand.Send(SmtpConnection conn, String& response) at System.Net.Mail.SmtpTransport.SendMail(MailAddress sender, MailAddressCollection recipients, String deliveryNotify, SmtpFailedRecipientException& exception) at System.Net.Mail.SmtpClient.Send(MailMessage message) --- End of inner exception stack trace --- at System.Net.Mail.SmtpClient.Send(MailMessage message) at DotNetNuke.Services.Mail.Mail.SendMail(String MailFrom, String MailTo, String Cc, String Bcc, String ReplyTo, MailPriority Priority, String Subject, MailFormat BodyFormat, Encoding BodyEncoding, String Body, List`1 Attachments, String SMTPServer, String SMTPAuthentication, String SMTPUsername, String SMTPPassword, Boolean SMTPEnableSSL)
Source:
Server Name: NS2
============================================
So, does anyone have any ideas about this? Any direction for troubleshooting? I sure appreciate it!
Spence