NYCPHP Meetup

NYPHP.org

[nycphp-talk] PEAR Mail and pine "To:" peculiarity

David Mintz dmintz at davidmintz.org
Sat Oct 22 18:03:24 EDT 2005


Bingo.

Of course, the solution you suggest occurred to me as soon as I got into
the shower and adjusted the water temperature to my liking. You know:
step away from the machine, sir.

Thanks.

On Sat, 22 Oct 2005, John Daly wrote:

> David,
>
> It looks like you're already setting the To: header when you set recipients
> and use it as the first argument to 'send'.  Leave out the $headers['To']
> and that should fix it.  I'm not familiar with this class, but there might
> be another association to set Name.
>
> JD
>
> ----- Original Message -----
> From: "David Mintz" <dmintz at davidmintz.org>
> To: <talk at lists.nyphp.org>
> Sent: Saturday, October 22, 2005 4:36 PM
> Subject: [nycphp-talk] PEAR Mail and pine "To:" peculiarity
>
>
>
> Anybody see anything wrong with this?
>
> <?php
> $mailer = Mail::factory('mail');
> $recipients = 'dmintz at davidmintz.org';
> $headers['From']    = 'vernon at vernontbludgeon.com';
> $headers['To']      = '"David Mintz" <dmintz at davidmintz.org>';
> $headers['Subject'] = 'Test message';
> $body = "This test used the 'mail' backend and a To field that says:
> $header[To]";
> true === $result = $mailer->send($recipients, $headers, $body)
> or exit($result->getMessage());
> echo "ok\n" ;
> ?>

---
David Mintz
http://davidmintz.org/



More information about the talk mailing list