Server IP : 103.6.199.200 / Your IP : 18.220.112.210 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/entellig/entelligent.com.my/wwwroot/ |
Upload File : |
<?php $first_name = $_POST['first_name']; // required $last_name = $_POST['last_name']; // required $email_from = $_POST['email']; // required $telephone = $_POST['telephone']; // not required $comments = $_POST['comments']; // required // Pear Mail Library require_once "Mail.php"; $from = '<sales@entelligent.com.my>'; $to = '<mandy@entelligent.com.my>, <jimmy@entelligent.com.my>'; $subject = 'Entelligent Training Center'; $body = "My name is " . $first_name . " " . $last_name . "\nMy email address: " . $email_from . "\nMy contact number: " . $telephone . "\nComment: " . $comments ; $headers = array( 'From' => $from, 'To' => $to, 'Subject' => $subject ); $smtp = Mail::factory('smtp', array( 'host' => 'ssl://phantom.mschosting.com', 'port' => '465', 'auth' => true, 'username' => 'sales@entelligent.com.my', 'password' => 'Abcd@1234' )); $mail = $smtp->send($to, $headers, $body); if (PEAR::isError($mail)) { echo('<p>' . $mail->getMessage() . '</p>'); } else { echo('<p>Message successfully sent!</p>'); } header('Location: ' . $_SERVER['HTTP_REFERER']); ?>