View Full Version : IIS6 SMTP server not working

04-14-2011, 06:49 AM
Hi. I'm using Microsoft Windows Web Server 2008 R2. I have setup IIS7.5, PHP 5.2 and Mysql Enterprise Edition 5.5 successfuly. The problem I'm having now is getting the SMTP server to work. Using the code:

$message="Nume: $_POST[name]
Email: $_POST[mail]
Mesaj: $_POST[msg]";
if(mail($to, $subject, $message, $from))
{header("Location: site.html");}
{echo ("Mail could not be sent.<br><br>
<a href='site.html'>HOME</a>");}
writes in the log entries that everything is ok

HELO 250
MAIL 250
RCPT 250
DATA 250
QUIT 240
and creates the mail in the queue folder, but doesn't send it (it gets stuck in the queue).
Using the code:

$to = '';
$subject = 'TEST mail';
$message = 'Hello. This is a test email from me.';
$headers = 'MIME-Version: 1.0' . "
$headers .= 'Content-type: text/plain; ' . "
$headers .= 'To: Rudolf <>' . "
$headers .= 'From: Contact <>' . "
mail($to, $subject, $message, $headers);
writes the same log entries (everything ok) but creates the mail in either BadMail or in queue (in which case the mail sits there for a few minutes then disappears, but nothing reaches the recipient) or doesn't create a mail at all (but the log entries are always consistent).

I have granted permisions in Connection to and in Relay to and localhost. I have allowed port forwarding on my router on port 25 and my ISP isn't blocking port 25.

Any idea why this might be happening and how to solve it? Thank you in advance. Bye.

04-25-2011, 08:57 AM
Very glad to see you here the message, let me understand a lot

05-07-2011, 09:16 PM
writes the log entries themselves (all ok), but the mail within two to create BadMail or in a queue (in this case, the mail is sitting there for a few minutes, then disappears, but nothing reached receiver) or not to create an email to all (journal entries, but always consistently).