Re: Re: Bug #9859 Updated: mail() doesn't send cc or bcc as in the manual instructions
| From: | Daniel Beckham | Date: | Mon, 21 May 2001 17:01:21 +0000 |
| Subject: | Re: Re: Bug #9859 Updated: mail() doesn't send cc or bcc as in the manual instructions | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-56080@lists.php.net to get a copy of this message | ||
Does it even need to force you to use one over the other? Can it not simply
accept both forms?
Daniel
----- Original Message -----
From: <joel@intwebservices.com>
To: "Bug Database" <php-dev@lists.php.net>
Sent: Monday, May 21, 2001 3:28 AM
Subject: [PHP-DEV] Re: Bug #9859 Updated: mail() doesn't send cc or bcc as
in the manual instructions
> Whichever is decided, \r\n or just \n, it should be uniform across
> platforms so you don't have to re-write code when switching from linux to
> windows or vice versa.
> Or even from the cgi version to the isapi version.
>
> joel@intwebservices.com
>
>
> At 03:06 AM 5/21/01 +0000, you wrote:
> >ID: 9859
> >Updated by: danbeck
> >Reported By: joel@intwebservices.com
> >Status: Open
> >Old-Bug Type: Documentation problem
> >Bug Type: Mail related
> >Operating system:
> >PHP Version: 4.0.4pl1
> >Assigned To:
> >Comments:
> >
> >I've corrected the Cc: and Bcc: problems in the mail() example, but I'm
> >reclassifying this as a Mail Function problem. Is it necessary for the
> >win32 version of the mail() function to require that you use \r\n?
> >
> >
> >
> >If it is, I can add this information to the mail function docs.
> >
> >Previous Comments:
>
>---------------------------------------------------------------------------
> >
> >[2001-03-20 02:42:22] joel@intwebservices.com
> >script example:
> >
>
>---------------------------------------------------------------------------
> >----------------------
> >
> ><?php
> >
> >$returnvar="false";
> >
> >
> >
> >$mailto="you@yourdomain.com";
> >
> >$mailsubject="cc test";
> >
> >$mailmessage="message content";
> >
> >$mailHeader="cc:otheraddress@yourdomain.comrn";
> >
> >
> >
> >$returnvar=mail($mailto,$mailsubject,$mailmessage,$mailHeader);
> >
> >
> >
> >?>
> >
> ><html>
> >
> ><body>
> >
> >the mail was sent?
> >
> ><?php
> >
> >echo "<br>returnvar= $returnvar<br>";
> >
> >?>
> >
> ></body>
> >
> ></html>
> >
>
>---------------------------------------------------------------------------
> >------
> >
> >The above does not send the carbon copy.
> >
> >
> >
> >The pdf manual says:
> >
>
>---------------------------------------------------------------------------
> >-------------------------------
> >
> >$headers .= "cc:birthdayarchive@php.netn"; // CC to
> >
> >$headers .= "bcc:birthdaycheck@php.net, birthdaygifts@php.netn"; // BCCs
to
> >
> >/* and now mail it */
> >
> >mail($recipient, $subject, $message, $headers);
> >
>
>---------------------------------------------------------------------------
> >--------------------------------
> >
> >
> >
> >That does not work since Win32 sendmail.c looks for case sensitve "Cc:"
> >
> >sendmail.c also does not look for "bcc:"
> >
> >
> >
> >Also you must have "rn" not just "n".
> >
> >
> >
> >I think the problem is here in win32 sendmail.c :
> >
> >
> >
> > if (headers && (pos1 = strstr(headers, "Cc:"))) {
> >
> > pos2 = strstr(pos1, "rn");
> >
> > tempMailTo = estrndup(pos1, pos2-pos1);
> >
> >
> >
> >
> >
>
>---------------------------------------------------------------------------
> >
> >
> >
> >ATTENTION! Do NOT reply to this email!
> >To reply, use the web interface found at
http://bugs.php.net/?id=9859&edit=2
>
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
> For additional commands, e-mail: php-dev-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>