I have an issue while sending email to user using PHP. I am binding some value inside the email template but not getting those value inside the template while that sent to user's inbox. I am explaining my code below.
$msgSub="Login credentials and verification link for Spesh";
$u_name='Username-"'.$email.'"';
$u_pass='Password-"'.$password.'"';
$url='http://oditek.in/spesh/mobileapi/categoryproduct.php?item=4&acn=2&email='+$email;
ob_start();
include "verification.php";
$msg_body=ob_get_clean();
$is_send=sendMail($email,'info@thespesh.com',$msgSub,$msg_body);
verification.php:
<br /><br />
<b><?php echo $u_name ?></b><br /><br />
<b><?php echo $u_pass ?></b>
<b><?php echo $url ?></b>
<br /><br />
function sendMail($to,$from,$subject,$msg_body){
$headers = "MIME-Version: 1.0" . "
";
$headers .= "Content-type:text/html;charset=iso-8859-1" . "
";
$headers .= 'From: '.$from . "
";
$id=mail($to,$subject,$msg_body,$headers);
if($id){
return 1;
}else{
return 0;
}
}
Here I am getting value for $u_name and $u_pass
but for $url
the value is coming 0
. In the first file I have already declared the value for url
. The value of url should come.Please help me.