Re: how to use bcc with mail_mime

From: Date: Fri, 05 Mar 2004 22:03:40 +0000
Subject: Re: how to use bcc with mail_mime
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-11121@lists.php.net to get a copy of this message
stefan hi, first of all, i use mozilla mail-client just for the fact that outlack doesn't support standards as ever......;-) my code looks like that.... <?php include('Mail.php'); include('Mail/mime.php'); $text['en'] = "Text\n\n"; $crlf = "\r\n"; $hdrs = array(
                'From'    => '"Sendername" <mail@domain.tld>',
                'Subject' => 'some subject in \'ere'
                );
$mime = new Mail_mime($crlf); $mime->setTXTBody($text['en']); $body = $mime->get(); $hdrs = $mime->headers($hdrs); $params['host'] = 'localhost'; $params['auth'] = TRUE; $params['username'] = 'username'; $params['password'] = 'somepw'; $mail =& Mail::factory('smtp', $params); $mail->send('recp@domain1.tld,recp@domain2.tld', $hdrs, $body); ?> the funny thing is that when i put the recipients into the send(...) part, mails are delivered but no address is shown in the header. when i put the addresses in the header like 'To' => '...' they are shown, but not delivered when no addresses where placed into the send(....) part. and $mime->addBcc(...) doesn't work at all, no matter what i place anywhere.... :-(((( best florian Stefan Neufeind wrote:
On 5 Mar 2004 at 19:08, f.bruch@postboot.de wrote:
i tried to send a mail with bcc using $mime->addBcc('mail@address.com') but nothing happend beside a shown BCC with the address in my mail-client. do you have any idea about that?
Try to add at least one recipient via "not bcc". Also make sure that you use a separator of "\n" instead of the standard CRLF ("\r\n") when creating the instance of the class. CRLF is RFC standard afaik but certain clients like Outlook Express unfortunately fail if you do it the RFC-compliant way :-(( Hope this helps. Otherwise, please explain again in more detail ... Good luck, Stefan


« previous php.pear.general (#11121) next »