<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
On Windows installations, you need to setup PHP to connect to a SMTP
server in php.ini. Here's what PHP says about it:<br>
<br>
<b class="note">Note</b>: The Windows implementation of <span
 class="function"><b>mail()</b></span> differs in many ways from the
Unix implementation. First, it doesn't use a local binary for composing
messages but only operates on direct sockets which means a <i>MTA</i>
is needed listening on a network socket (which can either on the
localhost or a remote machine). <br>
Second, the custom headers like <i>From:</i>, <i>Cc:</i>, <i>Bcc:</i>
and <i>Date:</i> are <em class="emphasis">not</em> interpreted by the
<i>MTA</i> in the first place, but are parsed by PHP. <br>
As such, the <i><tt class="parameter">to</tt></i> parameter should not
be an address in the form of "Something <a class="moz-txt-link-rfc2396E" href="mailto:someone@example.com">&lt;someone@example.com&gt;</a>".
The mail command may not parse this properly while talking with the
MTA. <br>
<br>
<a class="moz-txt-link-freetext" href="http://php.net/manual/en/function.mail.php">http://php.net/manual/en/function.mail.php</a><br>
<br>
Alternatively you could also use a module like SMTP, which bypasses
PHP's mail function:<br>
<br>
<a class="moz-txt-link-freetext" href="http://drupal.org/project/smtp">http://drupal.org/project/smtp</a><br>
<br>
<pre class="moz-signature" cols="72">Jamie Holly
<a class="moz-txt-link-freetext" href="http://www.intoxination.net">http://www.intoxination.net</a> 
<a class="moz-txt-link-freetext" href="http://www.hollyit.net">http://www.hollyit.net</a></pre>
<br>
On 4/7/2010 6:26 AM, John Mitchell wrote:
<blockquote
 cite="mid:r2qfa2ac0581004070326r21833b65nc723f011e1883192@mail.gmail.com"
 type="cite">
  <pre wrap="">I get the below error when I initially set up drupal and whenever it
tries to send an email:

    * warning: mail(): Failed to connect to mailserver at "localhost"
port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use
ini_set() in C:\Program Files\Apache Software Foundation\Tomcat
6.0\webapps\drupal\includes\mail.inc on line 193.
    * Unable to send e-mail. Please contact the site administrator if
the problem persists.
    * warning: mail(): Failed to connect to mailserver at "localhost"
port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use
ini_set() in C:\Program Files\Apache Software Foundation\Tomcat
6.0\webapps\drupal\includes\mail.inc on line 193.
    * Unable to send e-mail. Please contact the site administrator if
the problem persists.

How do I fix this?

Thanks,

John

  </pre>
</blockquote>
</body>
</html>