I believe I am reading your OP correctly and your intention, so, here is a mail responder code I wrote (which you might/could use as a template, altering it of course for your specific needs).

To use it, you must control the receiving email server. Invent an aliased user name to which any changes should be emailed, and map the script name in the /etc/mail/aliases file so that mail sent to this new alias goes to the script:
aliasname: "|/path/to/script.pl"

The script will receive the entire mail, then respond to the sender, with the short message of your choosing, bcc'ing you if so desired, but also save the entire email into a disk textfile, using a unique name (in your case you would change that filename to incorporate the sender's name - should be easy using a variable already there from the headers capture).

Now that you've preserved the email on disk (and also in an array in the script) you can do any number of things like separate the body out and send it onward to .txt, .html, or .XLS. IMO that is a separate task and should be treated as such unless you're doing a quick one off.

Sorry I would have altered the script more to your needs but really there are just too many variables not knowing your exact circumstances.

But hopefully this demonstrates that it is easy to capture the email and do what you want with it. The hardest part is going to be to get the users to send the email in the first place. Here's the code:
use strict; ##------------- Global my @email_message; my %headerz; my $new_recip; my $orig_recip; my $linelimit = 234; my $linecount = 0; ##------------- Edit these my $bcc = ''; my $replyto = 'no_replies@yourdomain.com'; my $from_address = 'your AutoResponse <no_replies@yourdomain.com> +'; my $datestring = &datestring; my $saved_file_name = "/path/mailmsg-$datestring.txt"; ##------------- main &save_mail; &header_mgr; #-------------> Edit these too <------------- my $subject = "Your submission to $orig_recip"; my $bodytext = qq|\n your message body to send as autoreply\n + |; #-------------------------------------------- &dispatch or die "email dispatch failed: $!"; ##------------- end ##--------------- SUBS ### mail collector sub save_mail { while ( <STDIN> ) { chomp; push @email_message, $_; $linecount++; } if ( $linecount <= $linelimit) { open SAVEDMAIL, '>', $saved_file_name or warn("could not open +output file $!"); print SAVEDMAIL $_,"\n" for @email_message; close SAVEDMAIL; } return @email_message; } ### Timestamp for disk file sub datestring { my ($sec,$min,$hour,$mday,$mon,$year) = localtime(time); my $timeformat = sprintf( "%02d%02d%04d-%02d_%02d_%02d", $mon+1,$mday,$year+1900,$hour,$min,$sec ); return $timeformat; } ### Collect original headers into a hash sub header_mgr { foreach ( @email_message ) { /(^From: )(.*$)/ ? $headerz{from_address} = "$2" : 1; /(To: )(.*$)/ ? $headerz{orig_recip} = "$2" : 1; /(^Reply-To: )(.*$)/ ? $headerz{replyto} = "$2" : 1; /(^cc: )(.*$)/i ? $headerz{cc} = "$2" : 1; /(^Date: )(.*$)/ ? $headerz{datestamp} = "$2" : 1; /(^Subject: )(.*$)/ ? $headerz{subject} = "$2" : 1; } ( defined $headerz{'reply_to'} ) ? $new_recip = $headerz{'replyto'} : $new_recip = $headerz{'from_addr +ess'}; ( defined $headerz{'orig_recip'} ) ? $orig_recip = $headerz{'orig_r +ecip'} : 1; } ##Mail sending routine sub dispatch { open(MAILPIPE,"|/usr/sbin/sendmail -t"); print MAILPIPE "To: $new_recip\n"; print MAILPIPE "From: $from_address\n"; print MAILPIPE "Bcc: $bcc\n"; print MAILPIPE "Subject: $subject\n"; print MAILPIPE "\n"; print MAILPIPE "$bodytext\n"; print MAILPIPE "\n-----------------------------------\n\n"; print MAILPIPE "Original message of $linecount lines, was sent +to $orig_recip.\n"; print MAILPIPE "\n-----------------------------------\n\n"; close(MAILPIPE); } __END__

Forgetting any Perl code momentarily, I'd like to mention that if you're trying to do any change control or tracking, this sure is a hard way to do it. Even if your team sends the requisite email, they surely won't ever be including the level of detail you're envisioning, or they might not even send the email until significantly later. One thing though, if you send an email, it is nice to get an automated response confirming receipt and processing.

In reply to Re: using Email to Perl to append to a changelog.txt, html, or .xls? by hsinclai
in thread using Email to Perl to append to a changelog.txt, html, or .xls? by Sclous

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.