Solved

problem with mime email messages

Posted on 2004-03-22
3
322 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
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…

738 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