MIMEDocument and MailMessage

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

MIMEDocument and MailMessage

Alistair Grant
Hi Everyone,

I'm playing with parsing and searching mail messages at the moment and
am wondering about the interaction of MailMessage and MIMEDocument.

A MailMessage contains a body which is a MIMEDocument, but if I request
the parts of the body I get back multiple MailMessages, i.e. the parts
of a MIMEDocument are a collection of MailMesssages.

MIME documents are used outside of mail messages, e.g. HTTP, so the
parts of a MIMEDocument should also be MIMEDocument's and not
MailMessage's.  This is also implied by the MIME description at
wikipedia: https://en.wikipedia.org/wiki/MIME

Some of the method comments seem to suggest that this was put together
quickly, so it is possible that the intention was to do it properly at a
later date (which never happened :-)).

Am I missing something, or is it OK for me to modify MIMEDocument to
return MIMEDocuments as the parts?


Thanks,
Alistair

Reply | Threaded
Open this post in threaded view
|

Re: MIMEDocument and MailMessage

Marcus Denker-4
Hi,

The code is barely usable, I am sure it is not complete and wrong in many places.

> On 13 Mar 2019, at 11:09, Alistair Grant <[hidden email]> wrote:
>
> Hi Everyone,
>
> I'm playing with parsing and searching mail messages at the moment and
> am wondering about the interaction of MailMessage and MIMEDocument.
>
> A MailMessage contains a body which is a MIMEDocument, but if I request
> the parts of the body I get back multiple MailMessages, i.e. the parts
> of a MIMEDocument are a collection of MailMesssages.
>
> MIME documents are used outside of mail messages, e.g. HTTP, so the
> parts of a MIMEDocument should also be MIMEDocument's and not
> MailMessage's.  This is also implied by the MIME description at
> wikipedia: https://en.wikipedia.org/wiki/MIME
>
> Some of the method comments seem to suggest that this was put together
> quickly, so it is possible that the intention was to do it properly at a
> later date (which never happened :-)).
>
> Am I missing something, or is it OK for me to modify MIMEDocument to
> return MIMEDocuments as the parts?
>
>
> Thanks,
> Alistair
>


Reply | Threaded
Open this post in threaded view
|

Re: MIMEDocument and MailMessage

Alistair Grant
Hi Marcus,

On Wed, 13 Mar 2019 at 11:21, Marcus Denker <[hidden email]> wrote:
>
> Hi,
>
> The code is barely usable, I am sure it is not complete and wrong in many places.

Hopefully it will be a bit more usable and a little less wrong when
I'm finished :-)

I've been able to use it to parse and load mail headers (about 23,000
messages), so it isn't all bad. :-)

Thanks,
Alistair



> > On 13 Mar 2019, at 11:09, Alistair Grant <[hidden email]> wrote:
> >
> > Hi Everyone,
> >
> > I'm playing with parsing and searching mail messages at the moment and
> > am wondering about the interaction of MailMessage and MIMEDocument.
> >
> > A MailMessage contains a body which is a MIMEDocument, but if I request
> > the parts of the body I get back multiple MailMessages, i.e. the parts
> > of a MIMEDocument are a collection of MailMesssages.
> >
> > MIME documents are used outside of mail messages, e.g. HTTP, so the
> > parts of a MIMEDocument should also be MIMEDocument's and not
> > MailMessage's.  This is also implied by the MIME description at
> > wikipedia: https://en.wikipedia.org/wiki/MIME
> >
> > Some of the method comments seem to suggest that this was put together
> > quickly, so it is possible that the intention was to do it properly at a
> > later date (which never happened :-)).
> >
> > Am I missing something, or is it OK for me to modify MIMEDocument to
> > return MIMEDocuments as the parts?
> >
> >
> > Thanks,
> > Alistair
> >
>
>

Reply | Threaded
Open this post in threaded view
|

Re: MIMEDocument and MailMessage

ducasse
Thanks.
Indeed we should improve one step at a time.
And this is great to see Pharo getting improved so much.

I once discussed with K. Beck and he told me that indeed we often forget how powerful it is
to do one little improvement at a time.

So let us continue and this is cool that you got that Pharo is yours :)
Stef

> On 13 Mar 2019, at 18:28, Alistair Grant <[hidden email]> wrote:
>
> Hi Marcus,
>
> On Wed, 13 Mar 2019 at 11:21, Marcus Denker <[hidden email]> wrote:
>>
>> Hi,
>>
>> The code is barely usable, I am sure it is not complete and wrong in many places.
>
> Hopefully it will be a bit more usable and a little less wrong when
> I'm finished :-)
>
> I've been able to use it to parse and load mail headers (about 23,000
> messages), so it isn't all bad. :-)
>
> Thanks,
> Alistair
>
>
>
>>> On 13 Mar 2019, at 11:09, Alistair Grant <[hidden email]> wrote:
>>>
>>> Hi Everyone,
>>>
>>> I'm playing with parsing and searching mail messages at the moment and
>>> am wondering about the interaction of MailMessage and MIMEDocument.
>>>
>>> A MailMessage contains a body which is a MIMEDocument, but if I request
>>> the parts of the body I get back multiple MailMessages, i.e. the parts
>>> of a MIMEDocument are a collection of MailMesssages.
>>>
>>> MIME documents are used outside of mail messages, e.g. HTTP, so the
>>> parts of a MIMEDocument should also be MIMEDocument's and not
>>> MailMessage's.  This is also implied by the MIME description at
>>> wikipedia: https://en.wikipedia.org/wiki/MIME
>>>
>>> Some of the method comments seem to suggest that this was put together
>>> quickly, so it is possible that the intention was to do it properly at a
>>> later date (which never happened :-)).
>>>
>>> Am I missing something, or is it OK for me to modify MIMEDocument to
>>> return MIMEDocuments as the parts?
>>>
>>>
>>> Thanks,
>>> Alistair
>>>
>>
>>
>