<& /elements/header-popup.html &> % if ( $date ) { % } % if ( $cust_msg->error ) { % }
From:<% $cust_msg->env_from %>
To:<% $env_to %>
<% $label{$cust_msg->status} %><% $date %>
Error:<% encode_entities($cust_msg->error) %>
Header Body
<& /elements/footer.html &> <%init> my $curuser = $FS::CurrentUser::CurrentUser; die "access denied" if !$curuser->access_right('View email logs')) && !$curuser->access_right('Configuration'); my ($custmsgnum) = $cgi->keywords; $custmsgnum =~ /^(\d+)$/ or die "illegal custmsgnum"; my $cust_msg = qsearchs('cust_msg', { 'custmsgnum' => $custmsgnum }); my $date = ''; $date = time2str('%Y-%m-%d %T', $cust_msg->_date) if ( $cust_msg->_date ); my $env_to = join('', split(',', $cust_msg->env_to)); my %label = ( 'sent' => 'Sent:', 'failed' => 'Attempted: ', 'prepared' => 'Not sent', );