[Tutor] rfc822.Message

Kristian Rink afterimage@gmx.net
Sat Mar 15 17:31:02 2003


Hi all,...


...for what I see now, I've ran into some trouble using the rfc822
module while trying to dissect e-mail messages and to store the
attachments they're carrying to be able to import them into a
document management system. Basically, here's what I tried:


>>> import rfc822
>>> mailmessage=3Drfc822.Message("2")
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.2/rfc822.py", line 106, in __init__
    self.readheaders()
  File "/usr/lib/python2.2/rfc822.py", line 153, in readheaders
    line =3D self.fp.readline()
AttributeError: 'str' object has no attribute 'readline'


Btw Message "2" is a mail file inside a MH mail spool directory.
Basically, it's kinda late now around here and perhaps I'm too tired
to see the point, but seems I can't get along with this, here. Can
someone give me a hint what's wrong here?

TIA, have a nice evening wherever you are...
Cheers,
Kris


--=20
F=FCr Freiheit und die Wahrung demokratischer Grundrechte im=20
Informationszeitalter - gegen Zensur, Manipulation und digitale
Entm=FCndigung. Sch=FCtze Deine Rechte - sag _DEINE_ Meinung!=20
---------------	http://www.stop1984.org ----------------------