I'm creating Mobile App using Ionic. In the App, I have written some logic for lost your password functionality. There is 1 Email field from where the user can add their registered email and get some link to reset their password. please check the code below
http://proittechnology.com/dev/stylr/changePasswordEdit.php?id=
After =(equal to) sign I'm adding $email variable which checks user variable into DB and grabs their data.please check below code
$postdata = file_get_contents("php://input");
if (isset($postdata)) {
$request = json_decode($postdata);
$email = $request->email;
if ($email != "") {
echo "Server returns: " . $email;
}
else {
echo "Empty username parameter!";
}
$headers = "From: resume@harshadpatil.com" . PHP_EOL;
$headers .= "Reply-To: $email" . PHP_EOL;
$headers .= "MIME-Version: 1.0" . PHP_EOL;
$headers .= "Content-type: text/plain; charset=utf-8" . PHP_EOL;
$headers .= "Content-Transfer-Encoding: quoted-printable" . PHP_EOL;
$message = 'http://proittechnology.com/dev/stylr/changePasswordEdit.php?id='.$email;
$send = mail($email, $subject, $message, $headers );
if ($send)
$mailReturns = "Mail sent successfully.";
else
$mailReturns = "Mail sent failed.";
echo $mailReturns;
my concern is whenever I sent the email to OUTLOOK after =(equal to sign) starting 2 letters of variable $email is getting truncated and in Gmail =(equal to sign) is not visible.
If you are passing email in URL then try passing email as urlencode($email)
Hope this will help.