Emails queued but not sending

This post has 10 Replies | 6 Followers

Not Ranked
Posts 9
Points 135
kirsty_c_2007 Posted: Wed, Aug 15 2007 5:33 AM
 
Hi
 
I am using CommunityServer 2007 SP2 (Build: 20611.960), running on a windows 2003 server
 
I'm having problems with emails being stuck in the emailQueue table.  This happens with all emails : new user, forgotten password, PM, etc
 
I have done the following so far :
 
IIS
 
SMTP/Properties/Relay Restrictions/Add/127.0.0.1
 
Community Server Control Panel :
 
Email Settings:
Email is enabled
SMTP Server - Tried localhost and 127.0.0.1
Tried with Windows Authentication on and off
SMTP Port Number 26 - same as SMTP server
 
Contact info:
Entered a valid email address
 
The Exceptions Report provides the following info: (email address changed)
 
EmailUnableToSend    08-15-2007, 10:27 AM  86 
User Agent:
Path: as HTTP
Referrer:
Message: SendMessage Failed To: kirstytest@testing.com
System.IO.IOException: Unable to read data from the transport connection: net_io_connectionclosed.
at System.Net.Mail.SmtpReplyReaderFactory.ProcessRead(Byte[] buffer, Int32 offset, Int32 read, Boolean readLine)
at System.Net.Mail.SmtpReplyReaderFactory.ReadLines(SmtpReplyReader caller, Boolean oneLine)
at System.Net.Mail.SmtpReplyReaderFactory.ReadLine(SmtpReplyReader caller)
at System.Net.Mail.SmtpReplyReader.ReadLine()
at System.Net.Mail.SmtpConnection.GetConnection(String host, Int32 port)
at System.Net.Mail.SmtpTransport.GetConnection(String host, Int32 port)
at System.Net.Mail.SmtpClient.GetConnection()
at System.Net.Mail.SmtpClient.Send(MailMessage message)
 

I have applied these same settings to a windows xp machine as a test and emails send fine from there.
 
I'd be grateful for any further suggestions on how to solve this problem.
 
Thanks
 
Kirsty
Top 10 Contributor
Posts 5,285
Points 49,055
CS Developers
Are you running an SMTP server on the same server as the website?  That error means it is unable to connect to it, meaning it is possible there is no SMTP server running on the server.  The settings that belong here tend to vary depending on your network configuration.  If it is on a hosted server, you should ask your web host what SMTP server settings you can use to send email.  If it is a company environment, you could ask your network admin which settings to use.
  • | Post Points: 20
Not Ranked
Posts 9
Points 135
Hi I should have said, there are other websites published on the same server.  These other websites have auto-emailing , and emails for other websites are going out fine.  SMTP is definately installed, running, and has definately been started.  This is what I'm finding most confusing, I would have thought if it was an issue solely with SMTP the other website's emails would not have been going out.  I'm not sure what I else I can do , other than what I have outlined previously, to configure it to work with community server?
  • | Post Points: 20
Top 10 Contributor
Posts 5,285
Points 49,055
CS Developers
Is the SMTP port actually set to 26 or was that a typo?  The default port for SMTP is 25, so if it is set to 26, that would likely be the issue.
  • | Post Points: 20
Not Ranked
Posts 9
Points 135

 

Yes it is 26, its not a typo. 

We are using managed servers and this is the way it was set up prior to starting to use the server.  It hasn't affected any of the other apps. I know the default port is 25, but I've specified it as 26 in the Email Settings within the Control Panel. 

Why would this be the issue - does community server require the SMTP port to be 25?  What is the purpose of the field SMTP Port Number in the Email Settings form?

  • | Post Points: 20
Top 10 Contributor
Posts 5,285
Points 49,055
CS Developers

It would only be an issue if you had 26 entered but the SMTP server was on 25.  Since SMTP is normally on 25, I figured it was worth mentioning in the event it was accidentally set that way.

We can't really tell you what you need in those fields, since it fully depends on your network configuration.  If something is set wrong, we have no way of knowing.  CS supports all the standard email settings, so if other applications are able to send emails but CS isn't, you should compare your current settings within CS to those other applications to see if there is some discrepancy, such as maybe you need to specify a username/password and use SMTP Authentication.

  • | Post Points: 35
Not Ranked
Posts 9
Points 135

The other applications use this syntax to send mail and required no configuration so I have nothing to compare to.   There is no specific port number/settings of any kind required for the other apps, so the only configuration of SMTP has been for CS i.e. the steps I outlined in my first post.

System.Web.Mail.SmtpMail.Send(mailMessage);  

Is there any other guidance you can provide, there does not seem to be any way to resolve this by comparing CS and its settings to other applications. 

  • | Post Points: 5
Not Ranked
Posts 1
Points 20

Strange problem - stranger still that other ASP.NET applications can send emails with no problems (without having to tell the application to use any particular port number).

 

What does Community Server actually do when it's sending emails?  Can you give any advice on how a customer would determine exactly what the problem is so that it can be resolved?

 

Are you sure this isn't a bug? - there seems to be a lot of people with email problems (many of which seem to be unresolved). 

Not Ranked
Posts 18
Points 285

I ran into this today and the solution is tied somehow to the IP addresses you are using to secure the SMTP virtual server.  My server has multiple IP addresses bound to the same adapter and the VS was configured to use one of them.  However, I had all of the access restrictions to allow connections only from 127.0.0.1 which is the source of the error (I believe). 

So, whatever the IP address your VS is listening on OR the IP your application is configured to use, configure the following areas:

  • Access/Connection control/Only the list below/[add your server ip]
  • Access/Relay restrictions/Only the list below/[add your server ip]
  • Configure your application to utilized the server ip, not localhost or 127.0.0.1

Brad Turner
ILM MVP

-Brad Turner http://www.identitychaos.com

  • | Post Points: 20
Not Ranked
Posts 22
Points 330
kintax replied on Thu, Feb 28 2008 10:18 AM

Brad,

I had been having the identical problem.  However, I had all 4 of my server's IP addresses granted access to connect and relay, and did not have 127.0.0.1 in there.  It worked for other applications that are running on the same same server, including DotNetNuke and test emails placed directly into SMTPROOT/PICKUP.

Now I added 127.0.0.1 to the connection/relay access lists, and everything works. 

Man, how frustrating.



  • | Post Points: 20
Top 10 Contributor
Posts 5,285
Points 49,055
CS Developers

DNN would have worked because it was putting the emails in the pickup directory, which doesn't enforce any sort of relay restrictions, and doesn't even use SMTP at all.  CS actually sends the emails over SMTP, so therefore the relay settings will be enforced by the SMTP server.

The correct IP to use depends on your server configuration.  IE, you enter 127.0.0.1 as the SMTP server, it will connect over the local interface and 127.0.0.1 will need to be allowed.

If you enter in the IP of the virtual SMTP server, then the system will use that ethernet interface to connect.  Even if the IP is a local one, it will utilize the network card and so it will use the primary IP for that card to connect.  In that case, the network card's primary IP needs to be allowed.  I believe you can override what IP is used to send emails from with the <system.net> section of the web.config.

  • | Post Points: 5
Page 1 of 1 (11 items) | RSS
Powered by Community Server (Commercial Edition), by Telligent Systems

Copyright© 2008 Telligent Systems Inc. All rights reserved
CommunityServer.com  •  Telligent.com