title: unable to send mail via php and ssmtp
body: <p>There are no errors in my code from what I can find and my local ssmpt client is configured and I can send mail via the command line. But no mail and no error come from php at all. It's as though php never hits this local mailer. I 'do' have my sendmail path set in my php.ini and restarted apache. I don't know what else it could be?</p>
  
  <pre><code>&lt;?php
  require_once('config.php');
  $attrs = array(PDO::ATTR_PERSISTENT =&gt; true);
  $pdo = new PDO("mysql:host=localhost;dbname=".$dbname, $db_username, $db_password, $attrs);
  $pdo-&gt;setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
  $custlist = $pdo-&gt;prepare("SELECT customer_list.sms_num, carriers.carrieraddr, customer_list.contact_first,  customer_list.contact_last
      FROM carriers, customer_list
      WHERE send_id=send_code
      ORDER BY customer_list.sms_num");
  #$carrierlist = $pdo-&gt;prepare("SELECT * FROM carriers");
  if (isset($_POST['body'], $custlist)) {
      $custlist-&gt;execute();
      #var_dump($custlist);
      #var_dump($_POST['body']);
      while ($row = $custlist-&gt;fetch(PDO::FETCH_ASSOC)) {
          #$prefix = $row['sms_num'];
          #$suffix = $row['carrieraddr'];
          $to = 'brads@telecomm.com';
          $subject = 'the subject';
          $message = 'hello';
          $headers = 'From: admin@telecomm.com' . "\r\n" .
              'Reply-To: admin@telecomm.com' . "\r\n" .
              'X-Mailer: PHP/' . phpversion();
  
          mail($to, $subject, $message, $headers);
          #$body = $_POST['body'];
  
          #var_dump($prefix);
          #var_dump($suffix);
          #var_dump($_POST['body']);
      }
  }
  
  //$products = array();
  $smscustobject = new ArrayObject($custlist);
  #$smsarrayobject = new ArrayObject($carrierlist);
  
  $pdo = null;
  ?&gt;
  &lt;form action="" method="POST"&gt;
      Your Message Body &lt;input name="body" type="text" /&gt;
      &lt;input type="submit"&gt;
  &lt;/form&gt;
  </code></pre>