aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/mailreport/mail_reports.inc6
1 files changed, 4 insertions, 2 deletions
diff --git a/config/mailreport/mail_reports.inc b/config/mailreport/mail_reports.inc
index d94631cc..0460bbc6 100644
--- a/config/mailreport/mail_reports.inc
+++ b/config/mailreport/mail_reports.inc
@@ -191,12 +191,14 @@ function mail_report_send($headertext, $attachments) {
$address = $config['notifications']['smtp']['notifyemailaddress'];
$mail->AddAddress($address, "Report Recipient");
$mail->Subject = "{$config['system']['hostname']}.{$config['system']['domain']} Graph Report: {$headertext}";
+ $mail->Body .= "This is a periodic graph report from your firewall, {$config['system']['hostname']}.{$config['system']['domain']}.<br/><br/>Current report: {$headertext}\n";
if(is_array($attachments)) {
foreach($attachments as $filename) {
- $mail->AddAttachment("$filename", basename($filename));
+ $shortname = basename($filename);
+ $mail->AddEmbeddedImage("$filename", $shortname, "$filename");
+ $mail->Body .= "<br/><br/>{$shortname}<br/><img src=\"cid:{$shortname}\" />\n";
}
}
- $mail->Body .= "This is a periodic graph report from your firewall, {$config['system']['hostname']}.{$config['system']['domain']}.<br/><br/>Current report: {$headertext}";
if(!$mail->Send()) {
echo "Mailer Error: " . $mail->ErrorInfo;