I want to see in the mail overview where mails are forwarded...
This will do it:
in mail_accounts.php, I did it for the normal-mails...:
Code:
function gen_page_dmn_mail_list(&$tpl, &$sql, $dmn_id, $dmn_name) {
# old line after SELECT:
# `mail_id`, `mail_acc`, `mail_type`, `status`, `mail_auto_respond`
# how many chars of the forward-list?
$forwLen = 50;
$dmn_query ="
SELECT
`mail_id`, `mail_acc`, `mail_type`, `status`, `mail_auto_respond`, CONCAT( LEFT(`mail_forward`, $forwLen), IF( LENGTH(`mail_forward`) > $forwLen, '...', '') ) as 'mail_forward'
FROM
`mail_users`
WHERE
`domain_id` = ?
AND
`sub_id` = 0
AND
(`mail_type` LIKE '%normal_mail%' OR `mail_type` LIKE '%normal_forward%')
ORDER BY
`mail_acc` ASC,
`mail_type` DESC
";
$rs = exec_query($sql, $dmn_query, array($dmn_id));
if ($rs->RecordCount() == 0) {
return 0;
} else {
global $counter;
while (!$rs->EOF) {
if ($counter % 2 == 0) {
$tpl->assign('ITEM_CLASS', 'content');
} else {
$tpl->assign('ITEM_CLASS', 'content2');
}
list($mail_action, $mail_action_script, $mail_edit_script) = gen_user_mail_action($rs->fields['mail_id'], $rs->fields['status']);
$mail_acc = decode_idna($rs->fields['mail_acc']);
$show_dmn_name = decode_idna($dmn_name);
$mail_types = explode(',', $rs->fields['mail_type']);
$mail_type = '';
foreach ($mail_types as $type) {
# old line, replaced with 3 lines
# $mail_type .= user_trans_mail_type($type) . "<br />";
$mail_type .= user_trans_mail_type($type);
if (strpos($type, '_forward') !== false) $mail_type .= ': '.$rs->fields['mail_forward'];
$mail_type .= '<br />';
}
if forwLen is not to big then "..." will be added if the list of forwarding addresses is longer...
What do you think?
maybe integrate into the trunk - in all 3 parts (also sub and alias)
/Joximu