Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Decoding MIME email.

Reply
Thread Tools

Decoding MIME email.

 
 
Thomas Williams
Guest
Posts: n/a
 
      08-25-2003
Hello everyone, my name is Tom W. And, I am new to the
list, and have been using Python for about a year now.


Anyway, I got a question! I am trying to decode MIME
(base64) email from a POP3 server, but all I get is a
corrupt file. I know that it good to begin with
because I check it with another email client.

This is what I am doing!

......

f=open("msg.txt","wb")
f.write(filelne)
f.close()
mimify.unmimify("msg.txt", "msg.jpg",
decode_base64=1)

.........

Is this right?

Tom W

 
Reply With Quote
 
 
 
 
Sybren Stuvel
Guest
Posts: n/a
 
      08-25-2003
Thomas Williams enlightened us with:
> I am trying to decode MIME (base64) email from a POP3 server


You are seriously messing things up. Base64 is something quite
different from MIME. If you want to do Base64 decoding, skip the POP3
and email stuff, and concentrate on the decoding first. It's better to
split your problem into smaller parts.

> all I get is a corrupt file. I know that it good to begin with
> because I check it with another email client.


Again: skip the email stuff. Create a base64 encoded file with
"uuencode -m filename < filename" and try to decode that.

> This is what I am doing!
>
> .....
>
> f=open("msg.txt","wb")
> f.write(filelne)
> f.close()
> mimify.unmimify("msg.txt", "msg.jpg",
> decode_base64=1)
>
> ........
>
> Is this right?


You show us everything except the actual base64 decoding stuff. Oh,
and you can't be doing things right, since you get messed up files.

Sybren
--
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself?
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Decoding MIME and UUencode. Alasdair Baxter Computer Support 4 08-14-2011 01:30 PM
decoding MIME attachments? Mad Scientist Jr ASP .Net 1 11-11-2005 09:15 PM
noob: Trying perl, and decoding MIME attachments..stuck in my code..can someone take a look? cayenne Perl Misc 3 05-26-2004 05:19 PM
Decoding MIME email Thomas Williams Python 1 08-28-2003 03:43 AM
Re: Decoding MIME email. =?ISO-8859-1?Q?Gerhard_H=E4ring?= Python 0 08-25-2003 11:40 PM



Advertisments