Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news.musoftware.de!wum.musoftware.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: John-Paul Stewart Newsgroups: comp.lang.php Subject: Re: when receiving the mail(php mail function), the variable's last value is getting converted to $ or # replacing the digit Date: Tue, 04 Dec 2012 13:20:41 -0500 Lines: 37 Message-ID: References: <09a40ec1-b0dd-427b-8594-3717f36f3d01@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net u2t9jj3DXrTQjdYhOxns8gkd3DdKsdZ8nL+FS1LA3e8tGwAQYFXhqLwU+lnpNEmMXi X-Orig-Path: mail.binaryfoundry.ca!not-for-mail Cancel-Lock: sha1:ocO2YfhyJP7fxCEaZzrDjcI9ndw= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.10) Gecko/20121027 Icedove/10.0.10 In-Reply-To: <09a40ec1-b0dd-427b-8594-3717f36f3d01@googlegroups.com> Xref: csiph.com comp.lang.php:7715 On 03/12/12 06:38 PM, hara.acharya@gmail.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.