-
Notifications
You must be signed in to change notification settings - Fork 0
/
process.php
executable file
·53 lines (42 loc) · 1.02 KB
/
process.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
43
44
45
46
47
48
49
50
51
52
53
<?php
$process = new process_coming_soon();
//Set the registering email
$process->from_email = $_POST['email'];
$process->from_name = $_POST['name'];
$process->to = "matthew@vdohive.com";
$process->process();
class process_coming_soon {
public $to = false;
public $from_email = false;
public $from_name = false;
/**
* Class Constructor
*/
public function __construct(){
//do nothing.
}
/**
* Decides if we send an email to the user or stores the email in the database
*/
public function process(){
$return = $this->send_email();
if(!$return){
echo 'failed';
}
}
/**
* Sends the email of the signup
*
* @returns
* success or failed
*/
private function send_email(){
$subject = "New User sign-up email";
$body = $this->from_name." has submitted his/her email address on your coming soon web page. The email address is ".$this->from_email.".";
if (mail($this->to, "Signup alert", $body)) {
return true;
} else {
}
}
}
?>