Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'PHPMailer-master/PHPMailerAutoload.php';
- $mail = new PHPMailer;
- $mail->SMTPDebug = 4;
- $mail->Host ="*****";
- $Mail->SMTPAuth = true; // enable SMTP authentication;
- $mail->Username = "*****";
- $mail->Password = "****";
- $mail->Port = 587;
- $mail->SMTPSecure = "tls";
- $mail->From = "******";
- $mail->FromName = "Jurgen Hof";
- $mail->addAddress("testingaccount23@gmail.com", "Tester");
- $mail->isHTML(true);
- $mail->Subject = 'Test Leave Application';
- $mail->Body = 'Test.';
- $mail->AddAttachment("/var/www/html/leaveform/AlpineLeaveApplication.pdf");
- if(!$mail->Send()) {
- echo 'Message could not be sent.';
- echo 'Mailer Error: ' . $mail->ErrorInfo;
- exit;
- }
- echo 'Email Sent Successfully!';
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement