Advertisement
Guest User

Untitled

a guest
May 31st, 2018
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. include('PHPMailer-master/src/PHPMailer.php');
  2. $mail = new PHPMailer;
  3. // $mail->IsSMTP(); // telling the class to use SMTP
  4. $mail->Host = "mail.lyflinx.com"; // SMTP server
  5. $mail->SMTPDebug = 0;
  6. $mail->SMTPAuth = true;
  7. $mail->SMTPSecure = "tls";
  8. $mail->Host = "no-reply@lyflinx.com";
  9. $mail->Port = 465;
  10. $mail->IsHTML(true);
  11. $mail->Username = "no-reply@lyflinx.com"; // GMAIL username
  12. $mail->Password = "ZAINhandsom123"; // GMAIL passwordMAIL password
  13.  
  14. $mail->SetFrom('no-reply@lyflinx.com', 'Attached Files');
  15. $mail->Subject = "PHP Sample Send Email";
  16.  
  17. // $mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test
  18.  
  19. $mail->MsgHTML($email_message);
  20.  
  21. $address = "danish.172@gmail.com";
  22. $mail->AddAddress($address, $fname." ".$lname);
  23.  
  24.  
  25. // $mail->AddAttachment($_FILES['file']['tmp_name'], $_FILES['file']['name']); // attachment
  26.  
  27. if (!$mail->Send()) {
  28. /* Error */
  29. echo 'Message not Sent! Email at '.$address;
  30. } else {
  31. /* Success */
  32. echo 'Sent Successfully! Check your Mail';
  33. }
  34. Response
  35. Message not Sent! Email at danish.172@gmail.co
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement