Multipart/related content type

Anonymous
Not applicable

Multipart/related content type

Is there any way to force Content-Type: multipart/related; into an email template? It seems to be the most reliable way to get images into an email without making them an attachment or a link to an external website.
Tags (1)
1 REPLY 1
Anonymous
Not applicable

Re: Multipart/related content type

I've not heard of anyone doing this before. Can you maybe explain a bit more about your "Why" .... what is the problem you see with the way everyone else is making emails? ie that they contain links to outside images which have to be downloaded when the email is opened...

I'm not entirely sure that this does what you think it does...

From MicroSuck's website.

multipart/related[RFC2112]

The multipart/related content type is used for compound documents, those messages in which the separate body parts are intended to work together to provide the full meaning of the message. Additionally, multipart/related can be used to provide links to content not contained within the message. Multipart/related can be used for compound documents where the object is built progressively from pieces, starting with the "root" body part as specified in the start parameter. If the start parameter is not specified, then the first body part is considered the starting point or "root" body part. Multipart/related requires a type parameter. The type parameter specifies the content type of the first or "root" part. Multipart/related processing takes precedence over content-disposition. Many MIME user agents do not recognize multipart/related and treat these messages as multipart/mixed. To allow for this, some UAs will include the technically unnecessary Content-Disposition header in multipart/related body parts. Content-Location and Content-Base headers are defined to resolve URL references to other body parts. Both headers are valid in any message or body part. They are valid for the content heading or message heading where they occur and for its content. The Content-Location and Content-Base headers apply to headers and body parts where they occur and do not have meaning in multipart headings. The Content-Base header gives a base for relative URIs occurring in other heading fields and in HTML documents that do not have any BASE element in its HTML code. Its value must be an absolute URI. The Content-Location header contains a URL that specifies the body of that body part. The URL may be relative to a URL specified in a Content-Base header. The following example shows how these headers are used:

 
 
Content-Type: Multipart/related; boundary="boundary-content_example";
type=Text/HTML; start=example@example.com
;Content-Base header not allowed here
;since this is a multipart MIME object
--boundary-content_example
Part 1:
Content-Type: Text/HTML; charset=US-ASCII
Content-ID: <example@example.com>
Content-Location: http://www.example.com/images/the.one
; This Content-Location must contain an absolute URL, since no base ; is valid here.
--boundary-content_example
Part 2:
Content-Type: Text/HTML; charset=US-ASCII
Content-ID: <example2@example.com>
Content-Location: the.one ; The Content-Base below applies to
; this relative URL
Content-Base: http://www.example.com/images/