Re: when receiving the mail(php mail function), the variable's last value is getting converted to $ or # replacing the digit [message #179790 is a reply to message #179783] |
Wed, 05 December 2012 07:39 |
hara.acharya
Messages: 3 Registered: December 2012
Karma:
|
Junior Member |
|
|
Hi John-Paul,
Thanks a lot for this. I broke my head a lot into this.
I tried using quoted_printable_encode but its showing undefined function even though I have php 5.3.8. But I renoved the "quoted-printable encoding" from header and it worked.
Thanks a lot
On Tuesday, December 4, 2012 11:50:41 PM UTC+5:30, John-Paul Stewart wrote:
> On 03/12/12 06:38 PM, hara(dot)acharya(at)gmail(dot)com wrote:
>
>> The message as getting displayed on tha same page after sending the mail is:
>
>> "
>
>> Posted successfully. Check your post HERE
>
>> message:
>
>>
>
>> You got a reply for your post title: Anybody up for a online chess game.
>
>>
>
>> Check your post in:
>
>> www.32minutesforum.com/post_clicked.php?id=25.
>
> [snip]
>
>> But when I receive the mail in the mail box:
>
>> It appears as below:
>
>> "
>
>> You got a reply for your post title: Anybody up for a online chess game.
>
>>
>
>> Check your post in:
>
>> www.32minutesforum.com/post_clicked.php?id%.
>
>
>
> It looks like you are sending the e-mail with the
>
> "Content-Transfer-Encoding: quoted-printable" header set but you haven't
>
> suitably encoded the content. Either drop the quoted printable header
>
> from your e-mail or properly encode the body!
>
>
>
> Quoted printable encoding treats an equal sign as an escape character
>
> followed by two hexadecimal digits for the ASCII code of a character.
>
> So it is the quoted printable encoding (not PHP!) that's changing =25 at
>
> the end of your URL to the % character in the mail.
>
>
>
> At a minimum, you'll need to encode the equals sign as =3D in the e-mail
>
> (i.e., "post_clicked.php?id=3D25") -or- drop the quoted printable header
>
> from the e-mail. Better yet would be to run your entire e-mail message
>
> body through PHP's quoted_printable_encode function.
>
>
>
> Really, though, it's not a PHP problem but a mismatch between your mail
>
> headers specifying the quoted printable encoding and your body not
>
> actually being encoded.
|
|
|