Commit 23e9f13d authored by floh1111's avatar floh1111

Improvemed the appearance of the Email

parent 115fef0c
......@@ -12,6 +12,8 @@ class reportsLib extends TikiLib{
$mail = new TikiMail();
$smarty->assign('report_preferences', $report_preferences);
$smarty->assign('report_user', ucfirst($user_data['login']));
$smarty->assign('report_interval', ucfirst($report_preferences['interval']));
$smarty->assign('report_date', date("l d.m.Y"));
......@@ -51,7 +53,12 @@ class reportsLib extends TikiLib{
$email_test_headers .= 'From:' . "\n"; // needs a valid sender
$email_test_headers .= 'Reply-to: '. $email_test_to . "\n";
$email_test_headers .= "Content-type: text/html; charset=utf-8\n";
$email_test_headers .= "Content-type: text/plain; charset=utf-8\n";
$email_test_headers .= "Content-type: text/html; charset=utf-8\n";
$email_test_headers .= 'X-Mailer: Tiki/'.$TWV->version.' - PHP/' . phpversion() . "\n";
$sentmail = mail($user_data['email'], $subject, $mail_data, $email_test_headers);
{tr}Report for{/tr} {$report_user}.<br>
{tr}Last Report sent on{/tr} {$report_last_report_date}.<br><br>
<u>{tr}Changes in detail:{/tr}</u><br>
{tr}Report for{/tr} {$report_user}.{if $report_preferences.type eq 'plain'}
{tr}Last Report sent on{/tr} {$report_last_report_date}.{if $report_preferences.type eq 'plain'}
{if $report_preferences.type eq 'html'}<u>{/if}{tr}Changes in detail:{/tr}{if $report_preferences.type eq 'html'}<u><br>{else}
{if $mail_contributions}{tr}Contribution{/tr}: {$mail_contributions}{/if}
\ No newline at end of file
......@@ -2,16 +2,11 @@
include_once ('tiki-setup.php');
if ($_SERVER['REMOTE_ADDR'] != "") {
$smarty->assign('msg', tra("This script can only be called by the server!"));
if ($_SERVER['REMOTE_ADDR'] != "" AND !empty($_SERVER['REMOTE_ADDR']))
die("This script can only be called by the server!");
if ($prefs['feature_daily_report_watches'] != 'y') {
$smarty->assign('msg', tra("This feature is disabled").": feature_daily_report_watches");
die("This feature is disabled");
include_once ('lib/tikilib.php');
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment