Re: Mail / Mail_mime, Cc, and Exchange
| From: | Justin Patrin | Date: | Thu, 17 Mar 2005 21:00:50 +0000 |
| Subject: | Re: Mail / Mail_mime, Cc, and Exchange | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-18125@lists.php.net to get a copy of this message | ||
On Thu, 17 Mar 2005 15:32:11 -0500, Michael Caplan
<michael.caplan@lechateau.ca> wrote:
> Hi,
>
> I am having some difficulty figuring out why Email with Cc or Bcc headers
> sent with PEAR::Mail and PEAR::Mail_mime are being ignored using a direct
> SMTP connection to an Exchange 5 box (the email is being delivered to the
> proper To recipient). Has anyone else experienced this?
>
> A sample of what my code looks like:
>
> $headers = array();
>
> $headers['From'] = 'Intranet Tracking <' .
> $fw_ini['tracking.from'] . '>';
>
> $headers['Subject'] = 'Nouvel article sur l\'Intranet / New Item on the
> Intranet';
>
> $headers['Cc'] = $fw_ini['tracking.cc'];
>
> $headers['x-tracking-item-id'] = $this->tracking_id;
>
> $headers['x-tracking-item-level'] = $this->level_id;
>
> $mime = new Mail_mime();
>
> $mime->setHTMLBody($body);
>
> $body = $mime->get();
>
> $res = $sendmail->send($email, $mime->headers($headers), $body);
>
> Am I missing something here?
>
Well, send() sends the e-mail to $email, but not to anyone else. You
need to call send() for *all* of the addresses you want to send the
e-mail to.
--
Justin Patrin