NYCPHP Meetup

NYPHP.org

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

David Mintz dmintz at davidmintz.org
Sat Oct 22 16:36:15 EDT 2005


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" ;
?>

When this message reaches my inbox and I read it with the pine email
client, the To field says

To: dmintz at davidmintz.org, David Mintz <dmintz at davidmintz.org>

that is, listing my email address twice. Though I in fact get just one
copy of the message, it's ugly.

But when I send mail to myself through any other means I don't get this
behavior. And when I read this same message via my hosting service's web
interface, the To header displays thus


To:   	"David Mintz" <dmintz at davidmintz.org>

which is what I want/expect.

Comments?

Thanks

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



More information about the talk mailing list