-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsendmail.php
More file actions
37 lines (35 loc) · 819 Bytes
/
sendmail.php
File metadata and controls
37 lines (35 loc) · 819 Bytes
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
<?php
# Configurations
##############################################################################
## Script Configuration
$file = basename($_SERVER["SCRIPT_NAME"], ".php"); # Used for navagtion higlights.
include_once ("includes/header.php");
?>
<div class = "container">
<div class = "hero-unit">
<p>
<?php
include_once('contactMailer.php');
$name = $_POST['name'];
$email = $_POST['email'];
$subject = $_POST['subject'];
$content = $_POST['content'];
$mailer = new mailer($name, $email, $subject, $content);
if ($mailer->sendOK())
{
?>
<?=$name?>, your was has been sent without errors.
<?php
}
else
{
?>
<?=$name?>, your was <strong>NOT</strong> sent. Please go back and fill in all fields.
<?php
}
?>
</p>
</div>
</div>
</body>
</html>