Home > Archive > PERL CGI Beginners > April 2005 > Alternative Modules
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Alternative Modules
|
|
| Mike Blezien 2005-04-27, 3:55 am |
| 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
--
Mike(mickalo)Blezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://thunder-rain.com/
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| |
| Wiggins d'Anconia 2005-04-27, 3:55 pm |
| 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/
There is also a mailing list...
http://danconia.org
| |
| Mike Blezien 2005-04-27, 3:55 pm |
| Wiggins d'Anconia wrote:
> Mike Blezien wrote:
>
>
>
> 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/
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
|
|
|
|