Note that there are some explanatory texts on larger screens.

plurals
  1. POCorrect email format for Email with Plain, HTML and an Attachment in SMTP?
    primarykey
    data
    text
    <p><strong>The Problem:</strong></p> <p>I tried to copy the SMTP based headers/emails used by yahoo and hotmail and send them over Telnet, but the email I get does not display the included attachment, but it does display the message correctly.</p> <p><strong>What I suspect is causing it:</strong></p> <p>I believe I have the incorrect format for the email, and despite searching numerous articles online (as well as trying to grasp complicated and difficult to read RFCs), I have not found any helpful or concise articles that explain how to use all three (Plain, HTML and an attachment) in SMTP correctly. I've spent several days trying to alter the code, but I either get <em>just</em> the message (no attachment) or the entire SMTP Data body displaying (including boundaries, html code etc).</p> <p><strong>What I hoping to achieve via this question:</strong></p> <p>I'm hoping someone can look over the information I've gathered below, and be able to tell me what I am missing (or how exactly the formatting of the email is incorrect).</p> <p><strong>Debugging information:</strong></p> <p>I fed a duplicate of the information I sent to the SMTP server to file, and I've pasted the information to pastebin (with any personal information removed/edited out - the Base64 encoded attachment is just a text file of another email gotten from IMAP):</p> <p><strong>Information sent verbatim (minus control characters) to SMTP server:</strong></p> <p><a href="http://pastebin.com/QYwzWT0S" rel="nofollow">http://pastebin.com/QYwzWT0S</a></p> <p><strong>What I see in the email client (note no attachment):</strong></p> <p><a href="http://i45.tinypic.com/29b1zci.jpg" rel="nofollow">http://i45.tinypic.com/29b1zci.jpg</a></p> <p><strong>What IMAP sees when I download the email (note incorrect format):</strong></p> <p><a href="http://pastebin.com/zv3PBr8N" rel="nofollow">http://pastebin.com/zv3PBr8N</a></p> <p><strong>What a correctly formatted email should look like to IMAP:</strong></p> <p><a href="http://pastebin.com/3yBySbxU" rel="nofollow">http://pastebin.com/3yBySbxU</a></p> <p>I suspect SMTP is misinterpreting what I am sending, which is why the multipart/alternative is missing when IMAP tries to retrive the email. What exactly am I doing wrong? What does the server expect?</p> <p>[Thank you for the upvotes - I can re-enable the links!]</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload