-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontact.php
39 lines (27 loc) · 1.07 KB
/
contact.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
<?php
require_once "_inc/_page.php";
if (isset($_POST['name'])){
include("Mail.php");
$recipients = "c@rpediem.com";
$headers["From"] = "info@aquatron.co.uk";
$headers["To"] = $recipients;
$headers["Subject"] = "New email enquiry from website";
$body = "The following enquiry has come in from the website:\n\n";
$body .= 'Name: ' . $_POST['name'] . "\n";
$body .= 'Email: ' . $_POST['email'] . "\n";
$body .= 'Phone number: ' . $_POST['phone'] . "\n";
$body .= "Query: \n" . $_POST['query'] . "\n";
$params["host"] = "smtp.gmail.com";
$params["port"] = "25";
$params["auth"] = true;
$params["username"] = "c@rpediem.com";
$params["password"] = "LIeow75qt";
// Create the mail object using the Mail::factory method
$mail_object =& Mail::factory("smtp", $params);
$mail_object->send($recipients, $headers, $body);
}
$text = new Text();
$text->loadByType('seo', 'contact');
$page->assign("headline", $text->getHeadline());
$page->assign("text", $text->getContent());
$page->display('contact.tpl');