Advertisement
Guest User

Untitled

a guest
Dec 23rd, 2017
358
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. <?php
  2. include "classes/class.phpmailer.php";
  3. $mail = new PHPMailer;
  4. $mail->IsSMTP();
  5. $mail->SMTPSecure = 'ssl';
  6. $mail->Host = "domain.com"; //host masing2 provider email
  7. $mail->SMTPDebug = 2;
  8. $mail->Port = 465;
  9. $mail->SMTPAuth = true;
  10. $mail->Username = "xxxx@domain.com"; //user email
  11. $mail->Password = "knkidqphlkgdgokq"; //password email
  12. $mail->SetFrom("xxxx@domain.com","Nama pengirim"); //set email pengirim
  13. $mail->Subject = "Testing"; //subyek email
  14. $mail->AddAddress("aaaa@domain.net","nama email tujuan"); //tujuan email
  15. $mail->MsgHTML("Testing...");
  16. if($mail->Send()) echo "Message has been sent";
  17. else echo "Failed to sending message";
  18. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement