<% if ( interaction?.media?.type === 'email' && interaction.state === 'done' && interaction?.media?.sent_at !== null && ( interaction.current_service.type === 'MANUALMAILOUT' || interaction.current_service.type === 'MAILVALID' || (interaction.current_service.type === 'MAILIN' && interaction.interaction_ref !== null) ) ) {%> <% }%>