Imagine you want to provide the ability to publish news on your website sending an email to a given address (like for example publish.news@domain.com).
1) The base strategy is: look for something that is text/html and not disposition, and this is the primary body of the email.
2) Then look for any other content that is disposition and is attachment (and you'll get all the attachments).
3) Discard any other content that is disposition and inline because, correct me if i'm wrong, it's kinda stuff like email signature and thus not needed.
So far so good this strategy works good. However i don't know how to:
Any help is much appreciated.
multipart/alternative
just means that each part is an alternative version of the same thing, just with a different content type (say, an HTML version and a plaintext version).
multipart/mixed
is used to put different content types inline. This will allow a client to put (say) an image inline in a message that is otherwise (say) plaintext.
You can read about all the multipart MIME types in the spec at https://www.rfc-editor.org/rfc/rfc2046#section-5.1 or in the Wikipedia article.