Guest User

Untitled

a guest
May 31st, 2016
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. <?php
  2. include "smtpmail/classes/class.phpmailer.php";
  3. error_reporting(0);
  4. class sendmail
  5. {
  6. function mail_send($to,$sub,$body1)
  7. {
  8. $mail = new PHPMailer; // call the class
  9. $mail->IsSMTP(); // enable SMTP
  10. $mail->SMTPDebug = 1; // debugging: 1 = errors and messages, 2 = messages only
  11. $mail->SMTPAuth = true; // authentication enabled
  12. $mail->SMTPSecure = 'ssl'; // secure transfer enabled REQUIRED for GMail
  13. $mail->Host = "smtp.gmail.com";//"mail.ayolabs.com gator3272.hostgator.com, bh-plesk-web1.webhostbox.net";
  14. $mail->Port = 465; //465 or 587
  15. $mail->IsHTML(true);
  16. $mail->Username = "xxxx@gmail.com";
  17. $mail->Password = "xxxx";
  18. $mail->SetFrom("xxx@gmail.com");
  19. //$mail->Subject = APP_TITLE . " - Reset Password";New Saloon Added by {Full Name} :: {FBID}
  20. $mail->Subject =$sub;
  21.  
  22. /*$body ='hidhfjshdfhjshdjf<html><body>';
  23. $body .='<div><table border="1" cellpadding="5px">
  24. <tr>
  25. <td>Saloon Name</td>
  26. <td colspan="3">
  27. </td>
  28. </tr>
  29. </table>';
  30. $body .="<div></body></html>";
  31.  
  32. //print_r($body);*/
  33. $mail->Body=$body1;
  34. $mail->AddAddress($to);
  35. //$mail->AddAddress("connect@ayolabs.com");
  36. //$mail->AddAttachment($attach);
  37. $mail->Send();
  38. echo "<h1>Your Receipt has been successfully sent!!!Thank You for Donate!!</h1>";
  39.  
  40.  
  41. }}
Add Comment
Please, Sign In to add comment