Guest User

https://core.trac.wordpress.org/ticket/21659

a guest
Mar 11th, 2014
962
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.69 KB | None | 0 0
  1. <?php
  2. require 'PHPMailer/PHPMailerAutoload.php';
  3.  
  4. $mail = new PHPMailer;
  5.  
  6. $mail->From = 'from@example.com';
  7. $mail->FromName = 'Mailer';
  8. $mail->addAddress('ian.dunn@example.com', 'Josh Adams');  // Add a recipient
  9. $mail->addReplyTo('info@example.com', 'Lukáš');
  10.  
  11. $mail->Subject = '[test] #21659-core';
  12. $mail->Body    = 'hello from phpmailer directly';
  13.  
  14. $mail->CharSet = 'UTF-8';
  15. $mail->addCustomHeader( 'Content-Type: text/plain; charset=UTF-8' );
  16. $mail->addCustomHeader( 'Content-Transfer-Encoding: 8bit' );
  17.  
  18. //var_dump($mail);die('');
  19.  
  20. if(!$mail->send()) {
  21.     echo 'Message could not be sent.';
  22.     echo 'Mailer Error: ' . $mail->ErrorInfo;
  23.     exit;
  24. }
  25.  
  26. echo 'Message has been sent';
Add Comment
Please, Sign In to add comment