-
Notifications
You must be signed in to change notification settings - Fork 0
/
mail.php
42 lines (36 loc) · 1018 Bytes
/
mail.php
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
40
41
42
<?php
if(isset($_POST['subject']) && isset($_POST['message']) && isset($_POST['senderName']))
{
require_once "PHPMailer/PHPMailerAutoload.php";
$mail = new PHPMailer(true);
$subject = $_POST['subject'];
$msg = $_POST['message'];
$to="vdeveloperhelp@gmail.com";
$name = $_POST['senderName'];
$mail->SMTPDebug = 0;
$mail->isSMTP();
$mail->Host = "smtp.gmail.com";
$mail->SMTPAuth = true;
$mail->Username = "vdeveloperhelp@gmail.com";
$mail->Password = "v30041998";
$mail->SMTPSecure = "ssl";
$mail->Port = 465;
$mail->From = $to;
$mail->FromName = $name;
$mail->addAddress($to, $name);
$mail->isHTML(true);
$mail->Subject = $subject;
$mail->Body = $msg;
if (!$mail->send()) {
header('Location: contact_us.php');
die;
}
else
{
header('Location: index.php');
}
}
else{
echo "Value Not Enough !";
}
?>