471,086 Members | 1,117 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,086 software developers and data experts.

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 Ar***@myhost.com.

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

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

$to = array('j**@adsfadsfads.com','l****@asdfasdfasd.com ');

$headers['From'] = 'w******@sadfasdfasdfasdf.com';
$headers['To'] = $to;
$recipients = $to;
$headers['Subject'] = "website form";

$body = $message;

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

--
thanks for your time,
juglesh

May 29 '06 #1
0 1372

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by fo | last post: by
3 posts views Thread by Andrew Aronoff | last post: by
3 posts views Thread by Nick Gilbert | last post: by
15 posts views Thread by Craig Hurley | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.