Created
February 4, 2010 01:18
-
-
Save brycemcd/294266 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 protected]"; | |
$report_email->Password = "supersecret"; | |
$report_email->AddAddress('[email protected]'); | |
$report_email->From = "[email protected]"; | |
$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" ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment