{if $user_id neq false} {if $template_event eq 'filter_by'}{if $post_vars.mail_text neq ''}{get_mail listing_amount=100 offset=$offset search_type=$post_vars.search_type search=$post_vars.mail_text}{else}{get_mail listing_amount=100 offset=$offset search_type=$post_vars.search_type search=$post_vars.mail_to}{/if}{else}{get_mail listing_amount=$listing_amount offset=$offset}{/if}MSG-ID;FROM;FROM-ID;TO;TO-ID;TIME;NEW;TEXT
{section name=message loop=$get_mail}
{$get_mail[message].mail_id};{$get_mail[message].mail_from_name};{$get_mail[message].mail_from};{$get_mail[message].mail_to_name};{$get_mail[message].mail_to};{$get_mail[message].mail_timestamp|date_format:"%H:%M:%S - %d.%m.%Y"};{if $get_mail[message].mail_to==$user_id AND $get_mail[message].mail_timestamp > $node.last_visit}1{elseif $get_mail[message].mail_read eq 'no' and $get_mail[message].mail_to neq $get_mail[message].mail_user}1{else}0{/if};{$get_mail[message].mail_text|stripslashes|imagestrip|regex_replace:"/[\\r\\t\\n]/":"\\n"}
{/section}
{/if}