One Hat Cyber Team
Your IP :
3.16.147.165
Server IP :
50.28.103.30
Server :
Linux host.jcukjv-lwsites.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
Server Software :
nginx/1.24.0
PHP Version :
8.3.12
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
www
/
wwwroot
/
ef.electronharmony.com
/
2
/
style
/
inc
/
View File Name :
contact.php
<?php /* * CONFIGURE EVERYTHING HERE */ // an email address that will be in the From field of the email. $from = 'jobi <demo@domain.com>'; // an email address that will receive the email with the output of the form $sendTo = 'jobi contact form <demo@domain.com>'; // Add Your emnail here // subject of the email $subject = 'New message from Jobi'; // form field names and their translations. // array variable name => Text to appear in the email $fields = array('name' => 'Name', 'email' => 'Email', 'subject' => 'Subject', 'message' => 'Message'); // message that will be displayed when everything is OK :) $okMessage = 'Thank you, We will get back to you soon!'; // If something goes wrong, we will display this message. $errorMessage = 'There was an error while submitting the form. Please try again later'; /* * LET'S DO THE SENDING */ // if you are not debugging and don't need error reporting, turn this off by error_reporting(0); error_reporting(E_ALL & ~E_NOTICE); try { if(count($_POST) == 0) throw new \Exception('Form is empty'); $emailText = "You have a new message from Sinco\n=============================\n"; foreach ($_POST as $key => $value) { // If the field exists in the $fields array, include it in the email if (isset($fields[$key])) { $emailText .= "$fields[$key]: $value\n"; } } // All the neccessary headers for the email. $headers = array('Content-Type: text/plain; charset="UTF-8";', 'From: ' . $from, 'Reply-To: ' . $from, 'Return-Path: ' . $from, ); // Send email mail($sendTo, $subject, $emailText, implode("\n", $headers)); $responseArray = array('type' => 'success', 'message' => $okMessage); } catch (\Exception $e) { $responseArray = array('type' => 'danger', 'message' => $errorMessage); } // if requested by AJAX request return JSON response if (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') { $encoded = json_encode($responseArray); header('Content-Type: application/json'); echo $encoded; } // else just display the message else { echo $responseArray['message']; }