Advertisement
Guest User

Untitled

a guest
Mar 3rd, 2018
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. if($sql){
  2. include('phpmailer/class.phpmailer.php');
  3. include('phpmailer/class.smtp.php');
  4. $mail = new PHPMailer();
  5.  
  6. $mail->Username = "husnulhada@gmail.com";
  7. $mail->Password = "1234567l";
  8. $webmaster_email = "husnulhada@gmail.com";
  9. $email = $_POST['email'];
  10. $name = "Judul Message Service";
  11. $mail->From = $webmaster_email;
  12. $mail->FromName = "Email ini dari siapa";
  13. $mail->AddAddress($email,$name);
  14. $mail->AddReplyTo($webmaster_email,"Email ini dari siapa");
  15. $mail->WordWrap = 50;
  16. //$mail->AddAttachment("module.txt"); // attachment
  17. //$mail->AddAttachment("new.jpg"); // attachment
  18. $mail->IsHTML(true);
  19. $mail->Subject = "Pemberitahuan Calon Nasabah Baru";
  20. $mail->Body = "isi email dalam bentuk html tanpa adaenter";
  21. $mail->AltBody = "This is the body when user views in plain text format";
  22. if (!$mail->send()) {
  23. echo "Mailer Error: " . $mail->ErrorInfo;
  24. } else {
  25. echo "";
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement