title: Configure mail server to work with PHP
body: <p>My current project is a form that receives input from a user.
  After I receive that data, I must send a warning/report to a few email addresses, including the user who inserted the data.
  Almost everything is up and running, Apache, MySQL, PHP.</p>
  
  <p>Now I never installed a mail server, to work with PHP so I'm kinda lost.</p>
  
  <p>My employer has MS Exchange 2007 on his server installed. Should I use it, and how would I start to configure php to work with it? What do I need from the Exchange 2007 (parameters)?</p>
  
  <p>If not, would you recommend installing a new mail server for just this purpose on the same machine that has Apache+MySQL+PHP?</p>
  
  <p>I am more inclined to use the already present Exchange server, but I read at some online articles that it's not the easiest thing to configure.</p>
  
  <p>UPDATE: </p>
  
  <pre><code>&lt;?php
  include("Mail/Mail.php");
  /* mail setup recipients, subject etc */
  $recipients = "mail@mail.com";
  $headers["From"] = "mail@mail.com";
  $headers["To"] = "someone@mail.com";
  $headers["Subject"] = "User feedback";
  $mailmsg = "Hello, This is a test.";
  /* SMTP server name, port, user/passwd */
  $smtpinfo["host"] = "mail.name.com";
  $smtpinfo["port"] = "25";
  $smtpinfo["auth"] = true;
  $smtpinfo["username"] = "username";
  $smtpinfo["password"] = "pass";
  /* Create the mail object using the Mail::factory method */
  $mail_object =&amp; Mail::factory("smtp", $smtpinfo);
  /* Ok send mail */
  $mail_object-&gt;send($recipients, $headers, $mailmsg);
  ?&gt;
  </code></pre>
  
  <p>Using this example above I can't send mail through Exchange 2007.</p>
  
  <p>I get no errors output on the page, so I'm kinda lost. Don't know what is wrong.</p>
  
  <p>UPDATE: Can anyone recommend a good mail server?</p>