Mail and Mail/Mime, Hidding To field like BCC?
| From: | Louie Miranda | Date: | Thu, 15 Feb 2007 07:05:01 +0000 |
| Subject: | Mail and Mail/Mime, Hidding To field like BCC? | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-26582@lists.php.net to get a copy of this message | ||
How would i hide the "To" field? Like a bcc? This code does not hide it?
Please help!
<?php
include('Mail.php');
include('Mail/mime.php');
$text = 'Text version of email';
$html = '<html><body>HTML version of email</body></html>';
$file = 'test1.php';
$crlf = "\n";
$hdrs = array(
'To' => 'someone@example.com',
'From' => 'you@yourdomain.com',
'Subject' => 'Test mime message'
);
$mime = new Mail_mime($crlf);
$mime->setTXTBody($text);
$mime->setHTMLBody($html);
$mime->addAttachment($file, 'text/plain');
//do not ever try to call these lines in reverse order
$body = $mime->get();
$hdrs = $mime->headers($hdrs);
$mail =& Mail::factory('mail');
$mail->send('lmiranda@example.com', $hdrs, $body);
echo "sent!";
?>
--
Louie Miranda (lmiranda@gmail.com)
http://www.axishift.com
//JSM-W