-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtryemail.php
More file actions
32 lines (26 loc) · 871 Bytes
/
tryemail.php
File metadata and controls
32 lines (26 loc) · 871 Bytes
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
<?php
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
require 'phpmailer/src/Exception.php';
require 'phpmailer/src/PHPMailer.php';
require 'phpmailer/src/SMTP.php';
$mail = new PHPMailer(true);
try {
$mail->isSMTP();
$mail->Host = 'smtp.gmail.com';
$mail->SMTPAuth = true;
$mail->Username = 'servicestechflow@gmail.com';
$mail->Password = 'aggpsqzakykmfqxc';
$mail->SMTPSecure = 'ssl';
$mail->Port = 465;
$mail->setFrom('servicestechflow@gmail.com', 'Techflow Guidelines and Services');
$mail->addAddress('kennethcobarubias12@gmail.com');
$mail->isHTML(true);
$mail->Subject = 'Rescheduled Appointment';
$mail->Body = 'Sample Mail';
$mail->send();
echo 'Message has been sent';
} catch (Exception $e) {
echo 'Message could not be sent. Mailer Error: ', $mail->ErrorInfo;
}
?>