Re: how to use bcc with mail_mime
| From: | Stefan Neufeind | Date: | Fri, 05 Mar 2004 23:40:31 +0000 |
| Subject: | Re: how to use bcc with mail_mime | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-11122@lists.php.net to get a copy of this message | ||
Hi Florian,
I've just tried it. When you intend to send the mail via smtp that's
a special case: The addresses you supply in the "send" call are the
SMTP-envelope. If you read a bit more technical docs on the standard
you will find that the recipient-adresses (where the mail is actually
delivered) doesn't need to have *anything* to do with the address
that's shown in the header of the mail. This can e.g. be seen at
mailinglists. Okay, there is the mailinglist still shown in the To-
field ... but actually the mail was delivered to your inbox ... the
same magic.
And as you wrote: You can place an adress in the 'To' field but it
doesn't receive the mail unless you specify that address again in the
call to 'send'. That's normal! And if you're adding Bcc-field, that
works for me fine as well ... they are shown here in Pegasus Mail
also as part of the header.
Usually when you write an email to somebody and put somebody else in
BCC the person who (mainly) receives the mail will not see that it
was sent via Bcc also. But the person in Bcc will see the original
recipient and also his own adress. Works exactly the same way:
Add any To or Bcc-fields to the header ... but the message is
actually delivered to the adresses you specify in your call to
"send".
If you take a look at the sourcecode of driver "smtp" or "sendmail"
from PEAR::Mail you will also read in the parameter-list of send:
"This may contain recipients not specified in the headers, for Bcc:,
resending messages, etc.".
E.g. for resending the "feature" you just experienced is used :-))
Hope to have cleared this subject a bit. If there are additional
questions, feel free to ask.
Stefan
On 5 Mar 2004 at 23:03, f.bruch@postboot.de wrote:
> 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....
>
[...]
>
> 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 ...