Re: StripSlashes From Mail
| From: | Waldo L. Jaquith | Date: | Wed, 28 Jun 2000 18:16:02 +0000 |
| Subject: | Re: StripSlashes From Mail | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-3623@lists.php.net to get a copy of this message | ||
Brett,
On 6/28/00 2:11 PM, Brett M. Delia wrote:
> I guess I am confused as to why the slashes need to be stripped after the
> mail is sent. I do this in several of my emailing scripts I run on our
> site. I compose the string then do something like this:
>
> $msg = "This is a \ test message.";
> $parsedMailBody = stripslashes($msg);
> mail($mailRecipient, $mailSubject, $parsedMailBody, $mailHeaders);
>
> If I am missing something that you are trying to do please let me know.
I see the difference. In my code, I'm actually relying on quotes to contain
the mail body, as it often contains content that doesn't appear in the
variable. (ie: "Feedback from: $user_name\nIP Address: $ip_address\nEtc:
$etc").
Your code puts all of this into a body first, making quote unnecessary. So
perhaps my solution is not to find some way to strip the slashes, but,
instead, to put all of the data into a single variable that doesn't need to
be wrapped in quotes.
Thanks, Brett.
Best,
Waldo
Waldo L. Jaquith
< waldo@munkandphyber.com >
< 804/979.2980 >
// Munk & Phyber
// 110B Second Street NE
// Charlottesville, VA 22902