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
Solved

problem with mime email messages

Posted on 2004-03-22
3
313 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Syslog text file into database or into .CSV 19 155
Perl, group, sort, count question 6 140
Regular Expression question to filter with negation. 6 100
Perl Versus AWK? 7 48
I have been pestered over the years to produce and distribute regular data extracts, and often the request have explicitly requested the data be emailed as an Excel attachement; specifically Excel, as it appears: CSV files confuse (no Red or Green h…
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 …
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…

839 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