Mike Blezien wrote:
Hello,
we are currently using the Mail::Audit module to resend piped incoming emails to a particular domain then sends it to various aliases emails from a database. I'm trying locate a similar module but doesn't put alot of the header garbage into the body of the email. Then Mail::Audit doesn't really remove certain headers from the actual body of the email.
Is there a module that works similar as the Mail::Audit, but extracts the actual body content of the email without some of the headers included in it??
TIA
This is a rather confusing description of what you are doing, if you can clean it up a bit we might be able to give you a better solution.
Although it has a very steep learning curve, there isn't a lot that the Mail::Box suite can't do. If I wanted to do anything remotely complex with mail (and I have) I would use it hands down. It has incredible documentation, though that too has a little bit of a learning curve :-).
http://perl.overmeer.net/mailbox/
The Mail::Box is bit more then needed for this type of application. The Mail::Audit module works nicely, but when extracting the "body" of the email messages, there's alot of this at the top of messages with HTML formatted messages which we don't want in the email body:
# remove this content from body ------=_Part_51_25736473.1114566301654 Content-Type: text/html Content-Transfer-Encoding: 7bit
..... then the content of the email body. ...... end of email message
snip of our code: ###################### my $mail = Mail::Audit->new(log => "$logfile"); my $fromaddress = $mail->from(); my $fwdto = $mail->to(); my $subject = $mail->subject(); my $body = $mail->body(); my @mailbody = defined($body) ? @{$body} : "No Message Received";
I've tried various regrex to remove unwanted strings in the @mailbody before sending but it doesn't work. So I was wondering if there is a way to remove unwanted headers like this.
The "$fwdto" is an aliases which is checked and extracted from a MySQL database and the "real emailaddress" is located, associated with the aliases in the db, and then sent to the real address.
Hope this explains it better.
TIA, -- Mike(mickalo)Blezien =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Thunder Rain Internet Publishing Providing Internet Solutions that work! http://thunder-rain.com/ =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>