-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtest copy.php
35 lines (28 loc) · 1.07 KB
/
test copy.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
<?php
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
require 'vendor/autoload.php';
$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]', 'PPP');
$mail->addAddress('[email protected]');
$mail->addAddress('[email protected]', 'TEST');
$mail->isHTML(true);
$mail->Subject = 'Authenticate your account';
$mail->Body = 'Dear user,<br>Please <b><a href="nimakamali.com">
click here</a></b> to authenticate your account.<br><br>Best wishes,<br>CTIS256 Project™.';
$mail->AltBody = 'Body in plain text for non-HTML mail clients';
$mail->send();
echo "Mail has been sent successfully!";
} catch (Exception $e) {
echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}";
}
?>