Fixed bug with not displaying some email messages.
authorAndrew DeFaria <Andrew@DeFaria.com>
Mon, 13 May 2019 20:17:06 +0000 (13:17 -0700)
committerAndrew DeFaria <Andrew@DeFaria.com>
Mon, 13 May 2019 20:17:06 +0000 (13:17 -0700)
Some emails use multipart/related in subparts and others in parts. Our
display.cgi doesn't try to do that much of a great job displaying emails
and as such avoids some viruses I suppose. No need to make it fancy - just
good enough to discren if I want to let this email through.

Also changed wording of resume emails

maps/bin/display.cgi
web/Resumes/Andrew/index.php

index 10c706d..76f5ab6 100755 (executable)
@@ -172,6 +172,9 @@ sub Body($) {
             last;
           } # if
         } # for
+      } elsif ($part->mime_type eq 'multipart/related') {
+        # Sometimes parts are 'multipart/relative'...
+       $part->print_body;
       } else {
         if ($part->mime_type =~ /text/) {
           my $encoding = '';
index 92c71c5..3c07b99 100644 (file)
@@ -99,9 +99,10 @@ function stoptimer () {
     $msg     .= '</body></html>';
     $headers  = "MIME-Version: 1.0\r\n";
     $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
-    $headers .= "From: Andrew DeFaria <Andrew@DeFaria.com>";
+    $headers .= "From: Resume Reporter <ResumeReporter@DeFaria.com>";
 
-    mail("andrew@defaria.com", "Somebody visited your resume", $msg, $headers);
+    $subject = "Another resume hit. This makes $count visits to your resume";
+    mail("andrew@defaria.com", $subject, $msg, $headers);
   } // if
 ?>
 </head>