You are here: PEAR Mail - $recipients vs. $headers['to'] « PHP Programming Language « IT news, forums, messages
PEAR Mail - $recipients vs. $headers['to']

Posted by juglesh on 05/30/06 00:03

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.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('joe@adsfadsfads.com','larry@asdfasdfasd.com');

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

$body = $message;

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

--
thanks for your time,
juglesh

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация