-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathcontact.us.mail.php
More file actions
39 lines (33 loc) · 1.3 KB
/
contact.us.mail.php
File metadata and controls
39 lines (33 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
ob_start();
if(isset($_POST['contact_name']) && isset($_POST['contact_email']) && isset($_POST['contact_sub'])
&& isset($_POST['contact_query']) && isset($_POST['contact_mob']))
{
//Get details by user inputs from contact.us.php
$Name = $_POST['contact_name'];
$Email_From = strtolower($_POST['contact_email']);
$User_Subject = strtoupper($_POST['contact_sub']);
$Query = $_POST['contact_query'];
$Mobile = $_POST['contact_mob'];
if(!empty($Name) && !empty($Email_From) && !empty($User_Subject) && !empty($Query) && !empty($Mobile))
{
$get = $_GET['flag'];
echo $get;
//Designing format for Mail.
$To = 'garg.paras.14@gmail.com';
$Subject = 'Enquiry Mail from CareerJump.com';
$Body = '<h6>Subject : '.$User_Subject.'<br /><br />Query : '.$Query.'<br /><br />Name : '.$Name.
'<br /><br />Email-Id : '.$Email_From.'<br /><br />Contact Number : '.$Mobile.'</h6>';
$Headers = "From: ".$Email_From;
if(mail($To, $Subject, $Body, $Headers))
{
echo '<script> alert("Thankyou for Contacting Us. We\'ll reply you soon."); </script>';
}
else
{
echo '<script> alert("Sorry, Connection problem, mail has been discarded !!."); </script>';
}
header('Location: contact.us.php');
}
}
?>