Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to send e-mails via SMTP within the IIS pickup directory. Unfortunately the e-mails are just going into the mailroot/queue folder and stay there. They never actually get sent.

Does anyone know why this would happen and a potential fix for the problem?

share|improve this question

7 Answers 7

Had a similar problem with Files stuck in the queue. In IIS manager, SMTP Virtual Server > Properties > Delievery > Outbound Connections. The option for Limit number of connections to was checked and the value was 0. So it was configured to never make any outbound connections, causing the emails to never leave the server. I unchecked the option and restarted the SMTP server and all was well.

share|improve this answer

Just for the record: we had a case where the server could not resolve names anymore due to an erraneous DNS settings. The resulting behaviour was exactly the one that you described.

share|improve this answer

In my experience, this is usually due to IIS SMTP trying to send and encountering a temporary (4xx response code) error. Have you turned on logging for the IIS SMTP service and reviewed the log? Sorry if that's all obvious, but it's hard to know the cause or the fix without knowing what the log shows.

share|improve this answer
    
Not obvious at all. I don't know much about IIS etc.. [i should] but i mainly focus on code, not system admin stuff. Not even sure how to setup the log. –  Jack Marchetti Jan 15 '10 at 16:42
    
The only thing I've seen is this: Action: failed Status: 5.3.5 –  Jack Marchetti Jan 15 '10 at 16:45
    
To enable the log, open the IIS 6 Administrator (even if you're using IIS 7, the SMTP service is still part of IIS 6), right-click on the SMTP service's properties, and go to the logging tab. You should be able to enable the log and/or find the location of the log there. –  jlupolt Jan 15 '10 at 17:10

I think the issue might be that there is a confusion between IPv4 and IPv6 on the system, so when you specify localhost, the default IPv6 protocol is chosen. I had the same issue today and it was fixed after localhost reference to IPv6 address in hosts was hashed out, although that might have been a coincidence (I am also setting up SVN). So here is my setup just in case:

  1. In IIS7 I have "Deliver to SMTP server" option enabled with localhost as my chosen server.
  2. In IIS6 I have access set to only 127.0.0.1, no authentication for incoming or outgoing.

I fiddled with the settings all day, so, to be honest, not sure what else could have influenced the fact that it's working now. Hope this helps at least a little bit though.

share|improve this answer

The first place to look is the server log files. This will tell you if your server is having problems sending to specific hosts. The majority of the time this happens (in my experiences) it's usually DNS (either on your end or remotely) that is the culprit.

share|improve this answer

I had this problem today.

After restarting the 'Simple Mail Transfer Protocol (SMTP)' service, it started to work again.

share|improve this answer

The SMTP server is looking for a SMTP host/gateway to send the mail to.

If you are trying to send to localhost, then the localhost IP would be the gateway. If you are trying to send to an external email address like gmail or hotmail, you will need to add your ISP's mail gateway as the smart host.

To set up a smart host:

  1. In IIS Manager, right-click the SMTP virtual server, and then click Properties.
  2. Click the Delivery tab, and click Advanced.
  3. In the Smart host box, type the name of the smart host server. You can type a string to represent a name or enter an IP address.
  4. If you want the SMTP service to attempt to deliver remote messages directly before forwarding them to the smart host server, select the Attempt direct delivery before sending to smart host check box. The default is to send all remote messages to the smart host, not to attempt direct delivery.
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.