PEAR Mail - $recipients vs. $headers['to']

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • juglesh

    PEAR Mail - $recipients vs. $headers['to']

    Hi there,

    So, what's the story here? The manual says I can use an array or csv
    in the $recipients, but using the same array in the $headers[to] gives
    me an Array@myhost.co m.

    It works, and both joe and larry get the mail, but I guess I'm using
    the $headers[to] incorrectly...

    <?php
    include('Mail.p hp');
    $mail_object =& Mail::factory(' mail', $params);

    $to = array('joe@adsf adsfads.com','l arry@asdfasdfas d.com');

    $headers['From'] = 'webform@sadfas dfasdfasdf.com' ;
    $headers['To'] = $to;
    $recipients = $to;
    $headers['Subject'] = "website form";

    $body = $message;

    $mail_object->send($recipien ts, $headers, $body);
    ?>

    --
    thanks for your time,
    juglesh

Working...