{foreach from = $item.mail.fields item = 'field' name = 'field'} {$field.label}:{if 'file' == $field.type } Attached:{/if}{foreach from = $field.value item = 'value' name = 'value'}{"/\r\n/"|preg_replace:"\n":$value|indent:1}{if !$smarty.foreach.value.last},{/if}{/foreach} {/foreach}