-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmails.php
More file actions
executable file
·63 lines (56 loc) · 2.31 KB
/
mails.php
File metadata and controls
executable file
·63 lines (56 loc) · 2.31 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php
$email = trim($_POST['email']);
$email = str_replace(' ', '', $email);
$exist = 0;
$file1 = "mailContainer.csv";
$lines = file($file1);
foreach($lines as $line_num => $line)
{
if(trim($line) === $email) $exist = 1;
}
if($exist == 1){
echo '1';
}else{
$file = 'mailContainer.csv';
$current = file_get_contents($file);
$current .= $email."\n";
file_put_contents($file, $current);
echo '0';
$to = $email;
$subject = 'Company Name';
$from = 'info@companyname.com';
$message ='<!DOCTYPE html">';
$message.='<html>';
$message.='<head>';
$message.='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';
$message.='<title>TheFutureTransport</title>';
$message.='<meta name="viewport" content="width=device-width, initial-scale=1.0"/>';
$message.='</head>';
$message.='<body style="background-color: #eee;" >';
$message.='<table border="0" cellpadding="0" cellspacing="0" style="width: 50%; margin: 0 auto;" >';
$message.='<tr>';
$message.='<td style="text-align: center; padding: 30px 0;">';
$message.= '<img src="http://thefuturetransport.com/img/thefuturetransport.png" width=448 height=24 style="display: inline;" />';
$message.='</td>';
$message.='</tr>';
$message.='<tr>';
$message.='<td style="width: 50%;text-align: justify;overflow: hidden;">';
$message.= "<h1>CONGRATULATIONS!</h1>";
$message.= "<p>You’ve just got one step closer to the future. The wheel you saw today is a breakthrough in electrical transportation. Very soon it would be a hallmark of London!</p>";
$message.= "<p>We put final draws and soon will be launching finalised website.</p>";
$message.= "<p>Be the first to benefit from the wheel, by using our special <b>10% discount</b> for adventurers just like you. Simply mention XXXX code when you order it.</p>";
$message.= "<p>Stay tuned and we will provide more information soon.</p>";
$message.= "<p><i>Company team.</i></p>";
$message.='</td>';
$message.='</tr>';
$message.='</table>';
$message.='</body>';
$message.='</html>';
$headers .= 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
$headers .= 'From: '.$from.'' . "\r\n" .
'Reply-To: From: '.$from.'' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
//mail($to, $subject, $message, $headers) OR die();
}
?>