-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwelcome-email.php
57 lines (48 loc) · 2.08 KB
/
welcome-email.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
<?php
use PHPMailer\PHPMailer\PHPMailer;
require_once 'phpmailer/Exception.php';
require_once 'phpmailer/PHPMailer.php';
require_once 'phpmailer/SMTP.php';
$mail = new PHPMailer(true);
$fn = $_GET['fn'];
$ln = $_GET['ln'];
$email = $_GET['email'];
try{
$mail->isSMTP();
$mail->Host = 'smtp.gmail.com';
$mail->SMTPAuth = true;
$mail->Username = '[email protected]'; // Gmail address which you want to use as SMTP server
$mail->Password = 'cookfoodrecipes'; // Gmail address Password
$mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;
$mail->Port = '587';
$mail->setFrom('[email protected]'); // Gmail address which you used as SMTP server
$mail->addAddress(''.$email.''); // Email address where you want to receive emails (you can use any of your gmail address including the gmail address which you used as SMTP server)
$mail->addAddress('[email protected]');
include('head.php');
$mail->isHTML(true);
$mail->Subject = 'Cook Food Recipes';
$mail->Body = '<head>
<style>
.full{width:650px;margin:auto;}
.body{width:500px;margin:auto;}
.part{text-align:center;}
</style>
</head>
<body>
<div class="full">
<div class="body">
<div class="part">
<img src="https://www.helpguide.org/wp-content/uploads/fast-foods-candy-cookies-pastries-768.jpg" alt="logo">
<br><br>
<h2>Dear '.$fn." ".$ln.',</h2>
<h3>Welcome to Cook Food Recipes, a community of makers and friendly folks sharing their recipes with the world.<br/><br/>Come explore your great recipes to the whole world with Cook Food Recipes and learn new recipes from Cook Food Recipes community.</h3><br/><br/>
<a class="btn btn-lg btn-circle btn-outline-new-white" href="www.google.com">Cook Food Recipes</a>
</div>
<h3>Happy Cooking,<br/>'.$fn." ".$ln.', on the behalf of the Cook Food Recipes.</h3>
</div>
</body>';
$mail->send();
header("Location:signin.php");
} catch (Exception $e){
}
?>