Server IP : 103.6.199.200 / Your IP : 18.188.107.57 Web Server : Microsoft-IIS/10.0 System : Windows NT EMPUSA 10.0 build 20348 (Windows Server 2016) i586 User : EMPUSA$ ( 0) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Domains/soluti13/solutionprocess.com.my/wwwroot/ |
Upload File : |
<?php use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\Exception; require('PHPMailer/src/Exception.php'); require('PHPMailer/src/PHPMailer.php'); require('PHPMailer/src/SMTP.php'); $sendername=$_POST["template-contactform-name"]; $senderemail=$_POST["template-contactform-email"]; $senderwebsite=$_POST["template-contactform-website"]; $sendermessage=$_POST["template-contactform-message"]; $mail = new PHPMailer(true); // Passing `true` enables exceptions try { //Server settings $mail->SMTPDebug = 0; // Enable verbose debug output $mail->isSMTP(); // Set mailer to use SMTP $mail->Host = 'mail.solution.com.my'; // Specify main and backup SMTP servers $mail->SMTPAuth = true; // Enable SMTP authentication $mail->Username ='register@solution.com.my'; // SMTP username $mail->Password ='web2013$$'; // SMTP password $mail->SMTPSecure = 'TLS'; // Enable TLS encryption, `ssl` also accepted $mail->Port = 587; // TCP port to connect to //Recipients $mail->setFrom('register@solution.com.my'); if (!$mail->AddReplyTo($senderemail, $sendername)) { echo 'Invalid email address'; exit; } //$mail->setFrom($senderemail, $sendername); $mail->addAddress('sales@solution.com.my'); // Add a recipient //Content $mail->isHTML(true); // Set email format to HTML $mail->Subject = "Solution Process System Contact Form"; $mail->Body = <<<EOT Email: {$senderemail}<br> Name: {$sendername}<br> Message: {$sendermessage}<br> EOT; $mail->AltBody = "Email:" + $senderemail + "; Name" + $sendername + "; Message" + $sendermessage + "; Phone" + $senderphone; $mail->send(); } catch (Exception $e) { echo 'Message could not be sent.'; echo 'Mailer Error: ' . $mail->ErrorInfo; }