Solved

problem with mime email messages

Posted on 2004-03-22
3
309 Views
Last Modified: 2008-02-01
Hi!
My problem is with converting mime encoded email messages to plain text, well anyways this is how
the case goes.

have following option in procmail which pipes the email to my script which then parses it and stores the data in database

.procmailrc

:0
            *
            |/path/to/script/myscript.pl

---------------------------------------------
part of myscript.pl where i need the mime conversion
read the STDIN and store it to @message
while (<STDIN>) {
        push @message, $_;
}
after this i would need to parse the @message and convert annoying =20=E4 and etc. to letters which can read(=20 is linefeed,= E4 is ä)
As in finland we use the scandic letters which aint shown right when i store the result to database.

Muchos gracias in advance

- - Masa
0
Comment
Question by:masa77
3 Comments
 
LVL 48

Accepted Solution

by:
Tintin earned 500 total points
ID: 10653522
Perhaps http://search.cpan.org/~eryq/MIME-tools-5.411a/lib/MIME/WordDecoder.pm would be helpful, or at least one of the other related MIME modules.
0
 
LVL 6

Author Comment

by:masa77
ID: 10684973
Thanks for the comment, did try it already before...
after some studying found that the problem i have had all the time is when i do the exampl. $dbh->quote($subject), that screws up the data.
as when i remove the quote for sending an reply email. in the email the data is as should be.
and if i dont do the quote, dont get the data stored to the database..
have to just study more...

-- Masa
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This video discusses moving either the default database or any database to a new volume.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now