Email::MIME

Email::MIME

am 24.10.2008 09:36:27 von fzarabozo

Hello All,

I'm using Email::MIME to interprete *.eml files (regular email messages) in
order to display them correctly in a web page (a web mail application). I'm
having some problems with it as it doesn't recognize certain content-type's
in multipart messages.

I want to be able to do this with Perl and display all kind of multipart
messages and its contents as well as Outlook Express or Windows Live Mail do
it. I've seen Java and PHP web applications that accomplish this perfectly,
but I really want to do it in Perl and I wouldn't like the idea of having to
chose another language over Perl to do something Perl is supposed to do
perfectly.

Does any one know if there's a better module to do this than Email::MIME?

Thanks in advance,

Paco Zarabozo

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Re: Email::MIME

am 24.10.2008 10:33:00 von Bill Luebkert

Zarabozo, Francisco (GE, Corporate) wrote:
> Hello All,
>
> I'm using Email::MIME to interprete *.eml files (regular email messages) in
> order to display them correctly in a web page (a web mail application). I'm
> having some problems with it as it doesn't recognize certain content-type's
> in multipart messages.

What do you plan on doing with these various content-types other than to just
display the text as is ?

> I want to be able to do this with Perl and display all kind of multipart
> messages and its contents as well as Outlook Express or Windows Live Mail do
> it. I've seen Java and PHP web applications that accomplish this perfectly,
> but I really want to do it in Perl and I wouldn't like the idea of having to
> chose another language over Perl to do something Perl is supposed to do
> perfectly.
>
> Does any one know if there's a better module to do this than Email::MIME?

Depends on what you want to do with the msgs. They're just simple text
msgs for the most part. MIME::Parser may be closer to what you need though.
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Re: Email::MIME

am 24.10.2008 13:28:57 von fzarabozo

Hello Bill,

Thank you for answering. I'm writing a web mail application. I want to
perfectly separate each part in multipart messages, correctly display the
main message in the right format (e.g. html or text according to whatever
each message would display as main message in screen if it was being viewed
in Outlook), decode any attached file including images that should be
inserted in a html message and display links to any attachment that is
supposed to be separately opened (e.g. images that are supposed to be
inserted in html are not supposed to be opened as attachments and
viceversa).

Basically, I want to be able to do with Perl exactly what an application
like Outlook Express is able to do in order to show an eml message.

The problem with Email::MIME is that for certain messages created with
Outlook or Windows Live Mail (which are supposed to be 100% correct), there
are some specifications or formats in each MIME part or multipart that are
not being recognized by the module (p.e. "Unkown mime type" or "Ilegal
character in X content type"). It doesn't happen with all messages, just
certain messages. I'm trying the script with about 5,000 messages i have in
my "Sent Items" folder, each one created by Microsoft applications (I've
used Outlook, Outlook Express and Windows Live Mail and I imported my
messages in each change).

I guess there are lots of perfectly compliant formats in a multipart/mixed
message that somehow are not being considered by Email::MIME but are being
correctly interpreted by the Microsoft Mime Parser.

That's why I wanted to know if someone here knows about some module that
works better for a complete parsing of such messages without losing the
original format of the message (e.g. I know I can just parse text or html in
several ways, but it may end up showing something totally different to what
something like Outlook would show).


Cheers,

Paco






From: Bill Luebkert
Sent: Friday, October 24, 2008 3:33 AM
To: Zarabozo, Francisco (GE, Corporate)
Cc: Active State Perl Mailing List
Subject: Re: Email::MIME


Zarabozo, Francisco (GE, Corporate) wrote:
> Hello All,
>
> I'm using Email::MIME to interprete *.eml files (regular email messages)
> in
> order to display them correctly in a web page (a web mail application).
> I'm
> having some problems with it as it doesn't recognize certain
> content-type's
> in multipart messages.

What do you plan on doing with these various content-types other than to
just
display the text as is ?

> I want to be able to do this with Perl and display all kind of multipart
> messages and its contents as well as Outlook Express or Windows Live Mail
> do
> it. I've seen Java and PHP web applications that accomplish this
> perfectly,
> but I really want to do it in Perl and I wouldn't like the idea of having
> to
> chose another language over Perl to do something Perl is supposed to do
> perfectly.
>
> Does any one know if there's a better module to do this than Email::MIME?

Depends on what you want to do with the msgs. They're just simple text
msgs for the most part. MIME::Parser may be closer to what you need though.

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Re: Email::MIME

am 24.10.2008 20:00:24 von Bill Luebkert

Zarabozo, Francisco (GE, Corporate) wrote:
> Hello Bill,
>
> Thank you for answering. I'm writing a web mail application. I want to
> perfectly separate each part in multipart messages, correctly display the
> main message in the right format (e.g. html or text according to whatever
> each message would display as main message in screen if it was being viewed
> in Outlook), decode any attached file including images that should be
> inserted in a html message and display links to any attachment that is
> supposed to be separately opened (e.g. images that are supposed to be
> inserted in html are not supposed to be opened as attachments and
> viceversa).
>
> Basically, I want to be able to do with Perl exactly what an application
> like Outlook Express is able to do in order to show an eml message.
>
> The problem with Email::MIME is that for certain messages created with
> Outlook or Windows Live Mail (which are supposed to be 100% correct), there
> are some specifications or formats in each MIME part or multipart that are
> not being recognized by the module (p.e. "Unkown mime type" or "Ilegal
> character in X content type"). It doesn't happen with all messages, just
> certain messages. I'm trying the script with about 5,000 messages i have in
> my "Sent Items" folder, each one created by Microsoft applications (I've
> used Outlook, Outlook Express and Windows Live Mail and I imported my
> messages in each change).
>
> I guess there are lots of perfectly compliant formats in a multipart/mixed
> message that somehow are not being considered by Email::MIME but are being
> correctly interpreted by the Microsoft Mime Parser.
>
> That's why I wanted to know if someone here knows about some module that
> works better for a complete parsing of such messages without losing the
> original format of the message (e.g. I know I can just parse text or html in
> several ways, but it may end up showing something totally different to what
> something like Outlook would show).

I would try MIME::Parser and if you encounter a non-compliant message, I
would just display it in plain text.

PS: Please don't top-post your replies. Intersperse your responses after
the appropriate part of the text and delete the rest.

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Re: Email::MIME

am 27.10.2008 14:59:14 von geoff

--===============1683990527==
Content-Type: multipart/alternative;
boundary="----=_Part_21505_12174970.1225115954474"

------=_Part_21505_12174970.1225115954474
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On Fri, Oct 24, 2008 at 2:00 PM, Bill Luebkert wrote:

>
> PS: Please don't top-post your replies. Intersperse your responses after
> the appropriate part of the text and delete the rest.
>
>
The *endless* kvetching about posting styles, demands for "proper examples"
and assorted other crabbiness have just pegged my BS-ometer to "full".

I've been programming in perl for the better part of a decade. I just
discovered this listserv a few months ago. If half the people who posted on
here spent their time answering questions instead of complaining, it would
be worth staying. As it is, I'm not going to bother hanging around with
what has to be the unfriendliest bunch of SOBs in the programming world.
I've gotten along fine without y'all for years now, no reason to expect I
won't again.

Color me gone. Reply to me privately if you know of a Perl listserv or NG
that isn't full of jackasses.

--
--Geoff
Cell: (313)506-7295
Sterling Heights CERT
'04 Grand Cherokee | '05 Town & Country
http://www.moparmailinglist.com

------=_Part_21505_12174970.1225115954474
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On Fri, Oct 24, 2008 at 2:00 PM, Bill Luebkert <> wrote:




PS: Please don't top-post your replies.  Intersperse your responses after

the appropriate part of the text and delete the rest.




The *endless* kvetching about posting styles, demands for "proper examples" and assorted other crabbiness have just pegged my BS-ometer to "full".

I've been programming in perl for the better part of a decade.  I just discovered this listserv a few months ago.  If half the people who posted on here spent their time answering questions instead of complaining, it would be worth staying.  As it is, I'm not going to bother hanging around with what has to be the unfriendliest bunch of SOBs in the programming world.  I've gotten along fine without y'all for years now, no reason to expect I won't again.


Color me gone.  Reply to me privately if you know of a Perl listserv or NG that isn't full of jackasses.

--
--Geoff
Cell: (313)506-7295
Sterling Heights CERT
'04 Grand Cherokee | '05 Town & Country




------=_Part_21505_12174970.1225115954474--

--===============1683990527==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============1683990527==--

Re: Email::MIME

am 27.10.2008 16:31:14 von lyle

Geoff wrote:
> On Fri, Oct 24, 2008 at 2:00 PM, Bill Luebkert > > wrote:
>
>
> PS: Please don't top-post your replies. Intersperse your
> responses after
> the appropriate part of the text and delete the rest.
>
>
> The *endless* kvetching about posting styles, demands for "proper
> examples" a... I just discovered this listserv a few months ago. If
> half the people who posted on here spent their time answering
> questions instead of complaining, it would be worth staying. As it
> is, I'm not going to bother hanging around with what has to be the
> unfriendliest bunch of SOBs in the programming world... privately if
> you know of a Perl listserv or NG that isn't full of jackasses.

Hi Geoff,
You'll find most Perl groups are much worse. If you post to LPM for
example, and don't adhere to the exact way they like things, or you
don't do exactly what they say then you'll get a torrent of verbal abuse
thrown at you. Believe me this is one of the nicer lists.

If you are looking for the friendliest Perl mailing list then it's
Bristol and Bath Perl moungers. They aim to be the friendliest and most
welcoming list:-
http://perl.bristolbath.org
You don't need to be local to be on the list, although it's usually only
the locals that turn up to meets :)

You have to remember that the good people at ActiveState have an awful
lot on their plates. They don't really have a lot of time to look
through different peoples problems, so things like example requests and
coming across as being short are probably much more likely due to a lack
or time as opposed to unfriendliness.


Lyle

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Re: Email::MIME

am 27.10.2008 16:57:01 von Christopher Taranto

Hi Geoff,

>> PS: Please don't top-post your replies. Intersperse your responses
>> after the appropriate part of the text and delete the rest.
>>
> The *endless* kvetching about posting styles, demands for "proper
> examples" and assorted other crabbiness have just pegged my BS-ometer to
> "full".

I don't think you should take offense to this.

I initially thought this was overdone but after I stepped back a bit from
it - I appreciate that the people who are answering lots of questions
(Bill is a prime example) have an easier time reading through lots of
emails if they are interspersed.

> would be worth staying. As it is, I'm not going to bother hanging around
> with what has to be the unfriendliest bunch of SOBs in the programming
> world. I've gotten along fine without y'all for years now, no reason to
> expect I won't again.

Well, I've been on this list for several years (as well as *many* others)
and I don't agree. Programmers are a tempermental bunch sometimes. I
find the same kind of issues on *all* lists to some degree. It just takes
a thick skin - especially when dealing with ASCII :-)

HTH,

Christopher Taranto

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Re: Email::MIME

am 27.10.2008 22:56:38 von Bill Luebkert

Christopher Taranto wrote:
> Hi Geoff,
>
>> The *endless* kvetching about posting styles, demands for "proper
>> examples" and assorted other crabbiness have just pegged my BS-ometer to
>> "full".
>
> I don't think you should take offense to this.

He does seem a bit touchy doesn't he. :) It's a shame that etiquette
and common sense are being put down as things that aren't a good thing.

I especially have a problem with the school of thought that a proper
failing example isn't the one best suggestion a replier can make. That
one guideline by itself has fixed more problems than I could begin to
recount and saved endless posts and replies because of a typo or simple
logic error that wasn't obvious until the actual code appeared. Not
to mention that the OP often finds the problem herself in the process
of trying to construct a small failing example.

> I initially thought this was overdone but after I stepped back a bit from
> it - I appreciate that the people who are answering lots of questions
> (Bill is a prime example) have an easier time reading through lots of
> emails if they are interspersed.

It's again - common sense. If you put your response immediately after
what you are replying to it becomes obvious what it is that you're
referring to. By removing things that you aren't replying to, you
give the reader a chance to read more new info instead of having to
pore over things that are not relevant. Top-posting is from the 'me'
generation and we have M$ to blame for most of it. If you must top-post
at least have the decency to delete the rest and then you won't be
top-posting. Hint: Ctrl-A, Del.

> Well, I've been on this list for several years (as well as *many* others)
> and I don't agree. Programmers are a tempermental bunch sometimes. I
> find the same kind of issues on *all* lists to some degree. It just takes
> a thick skin - especially when dealing with ASCII :-)

I don't think either of the things ascribed by the OP have anything to
do with being temperamental - maybe logical or practical would be a
better choice.

PS: Thanks for your support. :)

PPS: You have a slight posting problem yourself in that you removed
the attribution so it was impossible to tell who said what in your
post without going back to prior posts. This could lead to mistakes
by readers in who to respond to or who said what - unlike Geoff and
Lyle who properly left them in. :( Think of this as a learning tool
and the repliers as teachers. :)



_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Re: Email::MIME

am 29.10.2008 03:46:34 von Foo JH

> I've been programming in perl for the better part of a decade. I just
> discovered this listserv a few months ago. If half the people who posted on
> here spent their time answering questions instead of complaining, it would
> be worth staying.
In the time I was monitoring this mailing list (ie. some years now), I
remember more helpful responses than complains. Hey, even I am guilty of
top posting, but I still get good and fast responses!

> As it is, I'm not going to bother hanging around with
> what has to be the unfriendliest bunch of SOBs in the programming world.
I think...you're just being a sensitive new age man. If you need
something done with people you don't really know, it's usually more
effective to be friendly about it.

Remember this is the Perl mailing list: there's more than 1 way to respond!
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Re: Email::MIME

am 29.10.2008 16:37:52 von fzarabozo

> From: Geoff
> Sent: Monday, October 27, 2008 7:59 AM

> > On Fri, Oct 24, 2008 at 2:00 PM, Bill Luebkert
> > wrote:


> > PS: Please don't top-post your replies. Intersperse your responses
> > after
> > the appropriate part of the text and delete the rest.


Bill, I'm sorry about that, I promise to keep it in mind in the future. I
actually try to follow all requests on how to post messages here. I think
that's the least any person here can do in exchange for the great support
and help people provide in this list. I didn't mean to ignore any of that, i
just didn't think about it and I apologize.


> The *endless* kvetching about posting styles, demands for "proper
> examples" and
> assorted other crabbiness have just pegged my BS-ometer to "full".

> I've been programming in perl for the better part of a decade. I just
> discovered
> this listserv a few months ago. If half the people who posted on here
> spent their
> time answering questions instead of complaining, it would be worth
> staying. As it is,
> I'm not going to bother hanging around with what has to be the
> unfriendliest bunch of
> SOBs in the programming world. I've gotten along fine without y'all for
> years now,
> no reason to expect I won't again.

> Color me gone. Reply to me privately if you know of a Perl listserv or NG
> that isn't full of jackasses.

Geoff, I've been on this list for at least six years, and I've seen a lot
more solutions than complains. Actually, I think I haven't seen a more
agressive message than this of yours. I didn't see any complain in Bill's
answer. He nicely asked me to change the way I used to respond, with a good
basis of common sense implied on such petition. The name you give to the
people in this group is completely unasked-for and absolutely right for your
own attitude.


Paco Zarabozo A.

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs