[freeside-commits] branch master updated. a7aed7a065ccf2206da434328123fae48e692229

Mitch Jackson mitch at freeside.biz
Wed Jul 18 15:44:14 PDT 2018


The branch, master has been updated
       via  a7aed7a065ccf2206da434328123fae48e692229 (commit)
      from  b4fb50e7451aec55daff45a131ee0a2bd01a87b4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit a7aed7a065ccf2206da434328123fae48e692229
Author: Mitch Jackson <mitch at freeside.biz>
Date:   Wed Jul 18 22:38:44 2018 +0000

    RT# 79705 fakesmtpserver - saved messages viewable with e-mail client

diff --git a/bin/fakesmtpserver.pl b/bin/fakesmtpserver.pl
index 1f2ca3f31..5da6cb5cb 100755
--- a/bin/fakesmtpserver.pl
+++ b/bin/fakesmtpserver.pl
@@ -10,6 +10,9 @@ it could be updated to fork on client connections.
 When an e-mail is delivered, the TO and FROM are printed to STDOUT.
 The TO, FROM and MSG are saved to a file in $message_save_dir
 
+Open a saved .eml file with Mozilla Thunderbird (or other mail clients)
+to review e-mail with all html/pdf attachments
+
 =cut
 
 use strict;
@@ -33,21 +36,21 @@ while(my $conn = $server->accept()) {
 
   $client->process || next;
 
-  open my $fh, '>', $message_save_dir.'/'.time().'.txt'
+  open my $fh, '>', $message_save_dir.'/'.time().'.eml'
     or die "error: $!";
 
   for my $f (qw/TO FROM/) {
 
       if (ref $client->{$f} eq 'ARRAY') {
         print "$f: $_\n" for @{$client->{$f}};
-        print $fh "$f: $_\n" for @{$client->{$f}};
+        # print $fh "$f: $_\n" for @{$client->{$f}};
       } else {
         print "$f: $client->{$f}\n";
-        print $fh "$f: $client->{$f}\n";
+        # print $fh "$f: $client->{$f}\n";
       }
 
   }
-  print $fh "\n\n$client->{MSG}\n";
+  print $fh "$client->{MSG}\n";
   print "\n";
   close $fh;
 }

-----------------------------------------------------------------------

Summary of changes:
 bin/fakesmtpserver.pl | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)




More information about the freeside-commits mailing list