FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » when receiving the mail(php mail function), the variable's last value is getting converted to $ or # replacing the digit
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: when receiving the mail(php mail function), the variable's last value is getting converted to $ or # replacing the digit [message #179783 is a reply to message #179764] Tue, 04 December 2012 18:20 Go to previous messageGo to previous message
John-Paul Stewart is currently offline  John-Paul Stewart
Messages: 1
Registered: December 2012
Karma:
Junior Member
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.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: must I close mysql_connect?
Next Topic: Simpler way to validate form fields?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 30 06:51:48 GMT 2024

Total time taken to generate the page: 0.05838 seconds