Guest User

Untitled

a guest
Feb 2nd, 2018
307
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. $address = '*****@gmail.com';
  2. $message = 'Hello ,<br> This is test email.';
  3. $subject = 'Test Email';
  4. $mail = new PHPMailer();
  5. if(0) {
  6. $mail->IsSendmail(true);
  7. } else {
  8. $mail->Mailer = "smtp";
  9. $mail->SMTPAuth = true;
  10. $mail->Host = ****;
  11. $mail->Username = ****;
  12. $mail->Password = ****;
  13.  
  14. }
  15. $mail->IsHTML(true);
  16. $mail->From = ****;
  17. $mail->FromName = 'Test';
  18. $mail->Subject = $subject;
  19. $mail->Body = str_replace('n','<br>',$message);
  20. $mail->AddAddress($address);
  21. $mail>AddAttachment(DIR_FS_DOCUMENT_ROOT."images/".SITE_LOGO,SITE_LOGO);
  22. $mail_status=$mail->Send();
  23. if (1){
  24. echo "<pre>";
  25. print_r($mail);
  26. echo "</pre>";
  27. }
  28. return $mail_status;
Add Comment
Please, Sign In to add comment