Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 MIME Debugging
Index -> General Discussion
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
DtY




PostPosted: Sun Sep 20, 2009 10:22 am   Post subject: MIME Debugging

I'm trying to make an email that contains an attachment, so far the script is generating this:

code:
From: me@localhost

Subject: File!

MIME-Version: 1.0

Content-Type: multipart/mixed boundary="EOFEOFEOF"



You need to use a MIME complient email viewer to see this email.

--EOFEOFEOF

Content-Type: text/plain



Message body.

--EOFEOFEOF

Content-type: image/png

Content-transfer-encoding: base64

Content-Disposition: attachment; filename="1253459800-Icon.png"



iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAAAXNSR0IArs4c
(Snip)
3iLUoen+Iqb6HFq8xU6UP8j0XNx/owDw/wFaYaxyqhx+0AAAAABJRU5ErkJg
gg==


--EOFEOFEOF--

(Line endings are CRLF, so are looking like two line breaks)
I use Net::SMTP (Ruby) to send it to me, and I receive an email with no body, and an attachment called "noname". When I view the attachment, I see:
code:
Message body.
--EOFEOFEOF
Content-type: image/png
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="1253459800-Icon.png"

iVBORw0KGgoAAAANSUhEUgAABQAAAAMgCAIAAADz+lisAAAPVWlDQ1BJQ0Mg
(Snip)


Does anyone know what the problem here is, it looks fine to me (going off wikipedia's MIME article)?
Sponsor
Sponsor
Sponsor
sponsor
DemonWasp




PostPosted: Mon Sep 21, 2009 8:37 am   Post subject: RE:MIME Debugging

You appear to be missing a semicolon after "multipart/mixed".
DtY




PostPosted: Mon Sep 21, 2009 4:48 pm   Post subject: RE:MIME Debugging

That fixed it Very Happy
Thank you
DemonWasp




PostPosted: Mon Sep 21, 2009 6:05 pm   Post subject: RE:MIME Debugging

No problem. The "another pair of eyes" effect is frequently useful.
Display posts from previous:   
   Index -> General Discussion
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: