| Current Path : /home2/wtmwscom/public_html/ |
| Current File : /home2/wtmwscom/public_html/email_verify_send_modal.php |
<?php
session_start();
include('connection.php');
include 'function_lib.php';
require "./lib/PHPMailer-master/PHPMailerAutoload.php";
if(isset($_GET['id'])){
$uid=$_GET['id'];
$token= uniqid();
mysqli_query($connection, "UPDATE user SET token='$token' WHERE uid = '$uid'");
$row= mysqli_fetch_object(mysqli_query($connection, "SELECT login_id, name, email FROM `user` WHERE uid='$uid' "));
$to = $row->email;
$name = $row->name;
$subject = " Wtm WebShop - Verify your email account";
$txt = '
<html>
<head>
<style type="text/css">
table{width:600px; border-collapse:collapse; table-layout:auto; vertical-align:top; margin-bottom:15px; border:1px solid #CCCCCC;}
table thead th{color:#FFFFFF; background-color:#666666; border:1px solid #CCCCCC; border-collapse:collapse; text-align:center; table-layout:auto; vertical-align:middle;}
table tbody td{vertical-align:top; border-collapse:collapse; border-left:1px solid #CCCCCC; border-right:1px solid #CCCCCC;}
table thead th, table tbody td{padding:5px; border-collapse:collapse;}
table tbody tr.light{color:#666666; background-color:#F7F7F7;}
table tbody tr.dark{color:#666666; background-color:#E8E8E8;}
p{color: #000000; font-size: 14px;}
p a{ color: orangered; text-decoration: none;}
p a:hover{text-decoration: underline;}
</style>
</head>
<body>
<p>Dear '.$name.'</p>
<p>Verify your email Id. Delete this letter and do not answer it if this request came to you mistakenly</p>
<p>Click on the following link : <a href="http://mindspace/email_verify_update.php?id='.$uid.'&token='.$token.'">Click on this link to verify your account</a></p>
<p>
Please keep your account details confidential. Please login <a href="http://mindspace/">www.mindspace</a>
</p>
</body>
</html>';
if(!send_phpmailer_mail($to, $subject, $txt)) {
//if(!mail($to, $subject, $txt)) {
//echo 'Message could not be sent.';
setMessage('Email could not be sent. Try again!', 'alert-msg success');
} else {
//echo 'Message has been sent';
setMessage('Email verify link has been sent. Check your email and click on link given in email. Check email spam folder too. Wait for 5 mins, if you do not receive email immediately.', 'alert-msg error');
redirect("http://".$_SERVER['HTTP_HOST']."/email_verify_send.php?id=$uid&token=$token&sent=1");
die();
}
}
redirect("http://".$_SERVER['HTTP_HOST']."/email_verify_send.php?id=$uid&token=");
?>