index of
/
home1
/
trainin6
/
public_html
/
anauthenticvillagefarm.in
/
File: /home1/trainin6/public_html/anauthenticvillagefarm.in/php_helper.php
<?php use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\Exception; require 'PHPMailer/src/Exception.php'; require 'PHPMailer/src/PHPMailer.php'; require 'PHPMailer/src/SMTP.php'; // function send_mail($receiver, $body, $sub) // { // $mail = new PHPMailer(); // // $mail->SMTPDebug=3; // $mail->IsSMTP(); // $mail->SMTPAuth = true; // $mail->Host = "smtp.gmail.com"; // $mail->Port = "465"; // $mail->IsHTML(true); // $mail->CharSet = 'UTF-8'; // $mail->Username = "infoxjob24x7@gmail.com"; // $mail->Password = "vvqiegxnlcjobpfw"; // $mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS; // $mail->SetFrom("infoxjob24x7@gmail.com", "Lifeinfotechwebit"); // $mail->Subject = $sub; // $mail->Body = $body; // $mail->AddAddress($receiver); // $mail->SMTPOptions = array('ssl' => array( // 'verify_peer' => false, // 'verify_peer_name' => false, // 'allow_self_signed' => false // )); // if (!$mail->Send()) { // return false; // } else { // return true; // } // } function send_mail($receiver, $body, $sub) { $mail = new PHPMailer(); // $mail->SMTPDebug=3; $mail->IsSMTP(); $mail->SMTPAuth = true; $mail->Host = "smtp.gmail.com"; $mail->Port = "465"; $mail->IsHTML(true); $mail->CharSet = 'UTF-8'; $mail->Username = "testinglifeinfotech@gmail.com"; $mail->Password = "nfxwqtzqkjtgooqx"; $mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS; $mail->SetFrom("testinglifeinfotech@gmail.com", "An Authentic Village Farm"); $mail->Subject = $sub; $mail->Body = $body; $mail->AddAddress($receiver); $mail->SMTPOptions = array('ssl' => array( 'verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => false )); if (!$mail->Send()) { return false; } else { return true; } } function SuccessFun($Message) { echo " <div class='alert alert-success alert-dismissible fade show' role='alert'> <strong>$Message</strong> <button type='button' class='close' data-dismiss='alert' aria-label='Close'> <span aria-hidden='true'>×</span> </button> </div> "; echo "<script> if (window.history.replaceState) { window.history.replaceState(null, null, window.location.href) } </script>"; } function DangerFun($Message) { echo " <div class='alert alert-danger alert-dismissible fade show' role='alert'> <strong>$Message</strong> <button type='button' class='close' data-dismiss='alert' aria-label='Close'> <span aria-hidden='true'>×</span> </button> </div> "; echo "<script> if (window.history.replaceState) { window.history.replaceState(null, null, window.location.href) } </script>"; }