-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathemail2.php
65 lines (59 loc) · 1.79 KB
/
email2.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
54
55
56
57
58
59
60
61
62
63
64
65
<?php
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
require 'vendor/autoload.php';
function email($rec, $rand)
{
$mail = new PHPMailer(true);
try {
$mail->SMTPDebug = 2;
$mail->isSMTP();
$mail->Host = 'smtp.gmail.com;';
$mail->SMTPAuth = true;
$mail->Username = '[email protected]';
$mail->Password = 'CTISctis256';
$mail->SMTPSecure = 'tls';
$mail->Port = 587;
$mail->setFrom('[email protected]', 'GigaMarkt');
$mail->addAddress($rec);
$mail->addAddress('[email protected]');
$mail->addAddress('[email protected]');
$mail->addAddress('[email protected]', 'TEST');
$mail->isHTML(true);
$mail->Subject = 'Authenticate your account';
$mail->Body = "<div style='width: 65vw;
border-radius: 10vw;
overflow: hidden;
box-shadow: 0px 7px 22px 0px rgba(0, 0, 0, .1);'>
<div style='background-color: #0fd59f;
width: 65vw;
height: 10vw;'>
<h1 style='font-size: 5vw;
height: 25vw;
line-height: 10vw;
margin: 0;
text-align: center;
color: white;'>Your Verification Code</h1>
</div>
<div style='display: block;
width: 50vw;
margin: 0px auto;
background-color: #ddd;
border-radius: 40px;
padding: 20px;
text-align: center;
font-size: 10vw;
letter-spacing: 2vw;
box-shadow: 0px 7px 22px 0px rgba(0, 0, 0, .1);'>
<span style='text-align: center;'>$rand</span>
</div><div style='text-align: center; font-size: 3vw; color: gray;'>
<h3>GigaMarkt™<h3>
</div></div>";
$mail->AltBody = 'Body in plain text for non-HTML mail clients';
header("Location: mail2.php?email=$rec");
$mail->send();
} catch (Exception $e) {
// echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}";
}
}
?>