-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmail.php
More file actions
36 lines (32 loc) · 1.17 KB
/
mail.php
File metadata and controls
36 lines (32 loc) · 1.17 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
<?php
session_start();
$to = "webquery@agoracode.community";
$name = $_POST["user_name"];
$email = $_POST["email"];
$text = $_POST["message"];
$subject = $_POST["subject"];
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'From: '.$name . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$message = "
<html>
<head>
<title>HTML email</title>
</head>
<body>
<br>
<p><strong>Name</strong></p>
<p>$name</p>
<br>
<p><strong>Email</strong></p>
<p>$email</p>
<br>
<p><strong>Query</strong></p>
<p>$text</p>
</body>
</html>
";
mail($to,$subject,$message, $headers);
//Set the session variable
$_SESSION['success'] = "Message Sent Succesfully";
header("location: http://agoracode.community/#contact");