-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnewsProcess.php
44 lines (32 loc) · 1.14 KB
/
newsProcess.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
<?php
require "SMTP.php";
require "PHPMailer.php";
require "Exception.php";
use PHPMailer\PHPMailer\PHPMailer;
if(isset($_GET["e"])){
$email = $_GET["e"];
$mail = new PHPMailer;
$mail->IsSMTP();
$mail->Host = 'smtp.gmail.com';
$mail->SMTPAuth = true;
$mail->Username = '[email protected]';
$mail->Password = 'dvsvrddcnyrxoaiv';
$mail->SMTPSecure = 'ssl';
$mail->Port = 465;
$mail->setFrom('[email protected]', 'Global AI Ethics Conference');
$mail->addReplyTo('[email protected]', 'Global AI Ethics Conference');
$mail->addAddress($email);
$mail->isHTML(true);
$mail->Subject = 'Global AI Ethics Conference Newsletter';
$bodyContent = file_get_contents('newsletter/newsletter.html');
//$images = glob('images');
$mail->Body = $bodyContent ;
if (!$mail->send()) {
echo 'Enter your email address';
} else {
echo 'Success';
}
}else{
echo ("Invalid Email address");
}
?>