Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require_once("/var/www/crond/class-phpmailer.php");
- try{
- $report_email = new PHPMailer();
- //hook into the GMAIL SMTP server
- $report_email->Host = "smtp.gmail.com";
- $report_email->SMTPAuth = true;
- $report_email->SMTPSecure = "tls";
- $report_email->Port = 587;
- $report_email->Username = "email@domain.com";
- $report_email->Password = "supersecret";
- $report_email->AddAddress('bryce@jv2.com');
- $report_email->From = "support@jv2.com";
- $report_email->FromName = "JV2 Support";
- $report_email->Subject = '$39 Bundled Sales Report';
- $report_email->Body = $csv_out;
- $report_email->isHTML(false);
- $report_email->AddAttachment($filename);
- $report_email->Send();
- echo ("Email Sent Successfully: Report Day" . date('m-j-Y') );
- } catch(Exception $e) {
- echo ("Email Failed: Report Day" . date("m-j-Y") ." Error: $e" );
- }
Add Comment
Please, Sign In to add comment