Create New Item
×
Item Type
File
Folder
Item Name
×
Search file in folder and subfolders...
File Manager
/
fsib
/
accountOpening-v2
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\SMTP; use PHPMailer\PHPMailer\Exception; //Load Composer's autoloader require 'vendor/autoload.php'; if(isset($_POST['informed_update'])){ $customer_informed = trim($_POST['informed']); // echo $fullName; // die(); //Create an instance; passing `true` enables exceptions $mail = new PHPMailer(true); try { //Server settings //$mail->SMTPDebug = SMTP::DEBUG_SERVER; //Enable verbose debug output // $mail->SMTPDebug = 2; $mail->isSMTP(); //Send using SMTP $mail->Host = 'cpanel.hrctech.net'; //Set the SMTP server to send through // $mail->Host = 'https://mail.fsiblbd.com'; //Set the SMTP server to send through $mail->SMTPAuth = true; //Enable SMTP authentication $mail->Username = 'website@fsiblbd.com'; //SMTP username $mail->Password = 'xZ(Ns{km0Aar'; //SMTP password $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; //Enable implicit TLS encryption $mail->Port = 587; //TCP port to connect to; use 587 if you have set `SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS` // $mail->Port = 465; //TCP port to connect to; use 587 if you have set `SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS` //Recipients $mail->setFrom('website@fsiblbd.com', 'Website'); // $mail->addAddress('joe@example.net', 'Joe User'); //Add a recipient //$mail->addAddress('website@fsiblbd.com'); //Changed from cscmc.fsibl@gmail.com $mail->addAddress('ryhankazi@gmail.com'); //Content $mail->isHTML(true); //Set email format to HTML $mail->Subject = 'FSIB Complaint Submission Form'; $mail->Body = 'Muhtaram/Muhtarama,<br>Assalamu-alaikum,<br><br> Informed : <b>'.$customer_informed; // $mail->AltBody = 'This is the body in plain text for non-HTML mail clients'; // $mail->Body = 'Muhtaram/Muhtarama,<br>Assalamu-alaikum,<br><br> Full name'; //$mail->send(); //Sending too many emails //echo 'Message has been sent'; echo '<script type="text/javascript"> var show_text = confirm("SUCCESSFULLY MAIL SENT") window.location.href = "https://fsibplc.com/complaint.php"; </script>'; } catch (Exception $e) { echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}"; } } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Object</title> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"> </head> <body> <div class="card"> <form action="" method="post" id="informed_form" name="informed_form"></form> <input type="checkbox" name="informed" id="informed" value="yes" form="informed_form"> <button type="submit" class="btn btn-primary" name="informed_update" style="width: 100%;" form="informed_form">Submit</button> </div> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script> <script src="script.js"></script> </body> </html>