Solved

problem with mime email messages

Posted on 2004-03-22
3
316 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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
cpan issue 1 66
syslog unix file 20 77
Writing a parser for java language 4 91
How to get all the API from website? 11 122
I've just discovered very important differences between Windows an Unix formats in Perl,at least 5.xx.. MOST IMPORTANT: Use Unix file format while saving Your script. otherwise it will have ^M s or smth likely weird in the EOL, Then DO NOT use m…
Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
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…

679 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