Advertisement
Guest User

Untitled

a guest
Jul 2nd, 2017
509
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.65 KB | None | 0 0
  1. <?php
  2.  
  3. $mail = new PHPMailer();
  4. $mail->IsHTML(true);
  5. $mail->Priority     = 3;
  6. $mail->CharSet      = 'utf-8';
  7. $mail->Mailer       = "smtp";
  8.  
  9. $mail->SMTPAuth     = true;
  10. $mail->Host         = 'mail.hostname.com';
  11. $mail->Port         = 26;
  12. $mail->Username     = 'username';
  13. $mail->Password     = 'password';
  14.  
  15. $mail->From         = 'test@email.com';
  16. $mail->FromName     = 'test@email.com';
  17.  
  18. $mail->Subject      = 'subject';
  19. $mail->MsgHTML('test message<br>test 1,2,3,4...');
  20.  
  21. $mail->AddAddress('to@email.com', 'to@email.com'); // email -> name
  22. $mail->WordWrap     = 80;
  23.  
  24. if($mail->Send(){
  25.     echo 'mail sent';
  26. }else{
  27.     echo 'mail not sent';
  28. }
  29.  
  30. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement