From bb119c4cc86e906f698a205437790bd8f96bb3d0 Mon Sep 17 00:00:00 2001 From: mark Date: Fri, 20 May 2011 20:19:44 +0000 Subject: logging of template-generated mail, #12809 --- httemplate/view/cust_msg.html | 55 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100755 httemplate/view/cust_msg.html (limited to 'httemplate/view') diff --git a/httemplate/view/cust_msg.html b/httemplate/view/cust_msg.html new file mode 100755 index 000000000..a5846109a --- /dev/null +++ b/httemplate/view/cust_msg.html @@ -0,0 +1,55 @@ +<& /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 customers of all agents'); + +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', +); + -- cgit v1.2.1