By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,564 Members | 1,081 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,564 IT Pros & Developers. It's quick & easy.

Decoding MIME email.

P: n/a
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

Jul 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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?
Jul 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.