echo "{$studentID}"; echo "EMP ID :{$row['stu_job_id']} <br> " . "EMP NAME : {$row['interview_date']} <br> " . "EMP SALARY : {$row['employer_id']} <br> " . "--------------------------------<br>"; $studentID = $row['stu_job_id']; } echo "Fetched data successfully\n"; //$mail = new PHPMailer; //$mail = new PHPMailer('passwordReset'); $mail = new YiiMailer('passwordReset', array('tempPassword' => $tempPassword)); //$mail = new YiiMailer('passwordReset'); $mail->isSMTP(); $mail->Host = 'smtp.teksavvy.com'; $mail->Port = 25; //$mail->SMTPAuth = true; //$mail->Username = '******'; //$mail->Password = '******'; //$mail->SMTPSecure = 'tls'; $mail->From = '*****@*****.**'; $mail->FromName = 'Admin'; $mail->addAddress('*****@*****.**', 'Mohammed Akbar'); //$mail->addReplyTo('*****@*****.**', 'Raj Amal W'); $mail->WordWrap = 50; $mail->isHTML(true); $mail->Subject = 'Interview notifier - You have interview tomorrow'; $mail->Body = "Hi student Id: , <br>\nYou have an interview with employee id:<br>.\n\nThis is a system generated interview notifier <br>. \nGood luck <br>\n\nThank you <br>\n\nCollege Corner Stone <br>\nAdmin\n"; if (!$mail->send()) { echo 'Message could not be sent.'; echo 'Mailer Error: ' . $mail->ErrorInfo; exit; } echo 'Message has been sent'; mysql_close($conn);