Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include "smtpmail/classes/class.phpmailer.php";
- error_reporting(0);
- class sendmail
- {
- function mail_send($to,$sub,$body1)
- {
- $mail = new PHPMailer; // call the class
- $mail->IsSMTP(); // enable SMTP
- $mail->SMTPDebug = 1; // debugging: 1 = errors and messages, 2 = messages only
- $mail->SMTPAuth = true; // authentication enabled
- $mail->SMTPSecure = 'ssl'; // secure transfer enabled REQUIRED for GMail
- $mail->Host = "smtp.gmail.com";//"mail.ayolabs.com gator3272.hostgator.com, bh-plesk-web1.webhostbox.net";
- $mail->Port = 465; //465 or 587
- $mail->IsHTML(true);
- $mail->Username = "xxxx@gmail.com";
- $mail->Password = "xxxx";
- $mail->SetFrom("xxx@gmail.com");
- //$mail->Subject = APP_TITLE . " - Reset Password";New Saloon Added by {Full Name} :: {FBID}
- $mail->Subject =$sub;
- /*$body ='hidhfjshdfhjshdjf<html><body>';
- $body .='<div><table border="1" cellpadding="5px">
- <tr>
- <td>Saloon Name</td>
- <td colspan="3">
- </td>
- </tr>
- </table>';
- $body .="<div></body></html>";
- //print_r($body);*/
- $mail->Body=$body1;
- $mail->AddAddress($to);
- //$mail->AddAddress("connect@ayolabs.com");
- //$mail->AddAttachment($attach);
- $mail->Send();
- echo "<h1>Your Receipt has been successfully sent!!!Thank You for Donate!!</h1>";
- }}
Add Comment
Please, Sign In to add comment