473,387 Members | 1,542 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 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 1451

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: fo | last post by:
Hi I want to add one other emailrecepient to my mail code and can't seem to get it wright. Could you please help. Here is the code is this lien correct <emerge@goldcoastrentals.com.au>\nX-Mailer:...
2
by: Albert | last post by:
I am trying to send a group mail to several recipients based on the selection from a query, I would prefer if the user was able to choose whom to include in the mail by e.g. checking a box next to...
13
by: stam | last post by:
hello guys, i have met a problem that i can send the html e-mail by using MIME via php to yahoo mail and hotmail, but when i was try to send to gmail, it show all the html coding. can someone help...
3
by: Andrew Aronoff | last post by:
I'm using the mail() function on a Linux server. Under PHP 4.4.3, the followng code worked as expected: $dest="webmaster@mydomain.com"; $subject="something here"; $body="contents here";...
3
by: Nick Gilbert | last post by:
Hi, If I e-mail a message with certain text to my Hotmail account, it goes into the Inbox. If I send an almost identical message from ASP.NET, it ends up in the Junk folder. How can I stop this...
0
by: Nithi Gurusamy | last post by:
I have generated a Web-Service-Proxy (Add Web Reference) within VS. This proxy class is based on WebServicesClientProtocol of WSE 3.0. I want to add some custom HTTP Headers to the envelop before...
15
by: Craig Hurley | last post by:
Hello, user@x.com receives an email from user@a.com. I want to forward that email to user@y.com. I want the contents/header to remain intact, with the exception of adding "X-Forwarded-For". ...
15
by: HyBry | last post by:
I have send mail button assigned to datasheet in subform. Works fine if I want to send mail to one person, but I want it to work if I have multiple selection as well. code I have now is ...
2
by: npbaker1 | last post by:
I am not able to get an e-mail sent to multiple recipients. I am using C# in VS 2003. Here is the code: MailMessage mail = new MailMessage(); mail.To =...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.