MIME Debugging
Author |
Message |
DtY
|
Posted: 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
|
|
|
DemonWasp
|
Posted: Mon Sep 21, 2009 8:37 am Post subject: RE:MIME Debugging |
|
|
You appear to be missing a semicolon after "multipart/mixed". |
|
|
|
|
|
DtY
|
Posted: Mon Sep 21, 2009 4:48 pm Post subject: RE:MIME Debugging |
|
|
That fixed it
Thank you |
|
|
|
|
|
DemonWasp
|
Posted: Mon Sep 21, 2009 6:05 pm Post subject: RE:MIME Debugging |
|
|
No problem. The "another pair of eyes" effect is frequently useful. |
|
|
|
|
|
|
|