note 72717 added to ref.mail
| From: | pbglez at hotmail dot com | Date: | Tue, 30 Jan 2007 23:59:00 +0000 |
| Subject: | note 72717 added to ref.mail | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-122379@lists.php.net to get a copy of this message | ||
I think the easiest way to make correct attachments is checking The Official MIME Specification: http://www.hunnysoft.com/mime/ (Of course it isnt the
only web page where you can find it ).
I found there an example than truly helped me to make correct attachments:
Appendix A -- A Complex Multipart Example
What follows is the outline of a complex multipart message. This
message contains five parts that are to be displayed serially: two
introductory plain text objects, an embedded multipart message, a
text/enriched object, and a closing encapsulated text message in a
non-ASCII character set. The embedded multipart message itself
contains two objects to be displayed in parallel, a picture and an
audio fragment.
MIME-Version: 1.0
From: Nathaniel Borenstein <nsb@nsb.fv.com>
To: Ned Freed <ned@innosoft.com>
Date: Fri, 07 Oct 1994 16:15:05 -0700 (PDT)
Subject: A multipart example
Content-Type: multipart/mixed;
boundary=unique-boundary-1
This is the preamble area of a multipart message.
Mail readers that understand multipart format
should ignore this preamble.
If you are reading this text, you might want to
consider changing to a mail reader that understands
how to properly display multipart messages.
--unique-boundary-1
... Some text appears here ...
[Note that the blank between the boundary and the start
of the text in this part means no header fields were
given and this is text in the US-ASCII character set.
It could have been done with explicit typing as in the
next part.]
--unique-boundary-1
Content-type: text/plain; charset=US-ASCII
This could have been part of the previous part, but
illustrates explicit versus implicit typing of body
parts.
--unique-boundary-1
Content-Type: multipart/parallel; boundary=unique-boundary-2
--unique-boundary-2
Content-Type: audio/basic
Content-Transfer-Encoding: base64
... base64-encoded 8000 Hz single-channel
mu-law-format audio data goes here ...
--unique-boundary-2
Content-Type: image/jpeg
Content-Transfer-Encoding: base64
... base64-encoded image data goes here ...
--unique-boundary-2--
--unique-boundary-1
Content-type: text/enriched
This is <bold><italic>enriched.</italic></bold>
<smaller>as defined in RFC 1896</smaller>
Isn't it
<bigger><bigger>cool?</bigger></bigger>
--unique-boundary-1
Content-Type: message/rfc822
From: (mailbox in US-ASCII)
To: (address in US-ASCII)
Subject: (subject in US-ASCII)
Content-Type: Text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: Quoted-printable
... Additional text in ISO-8859-1 goes here ...
--unique-boundary-1--
----
Server IP: 69.147.83.197
Probable Submitter: 189.169.8.229
----
Manual Page -- http://www.php.net/manual/en/ref.mail.php
Edit -- https://master.php.net/note/edit/72717
Del: integrated -- https://master.php.net/note/delete/72717/integrated
Del: useless -- https://master.php.net/note/delete/72717/useless
Del: bad code -- https://master.php.net/note/delete/72717/bad+code
Del: spam -- https://master.php.net/note/delete/72717/spam
Del: non-english -- https://master.php.net/note/delete/72717/non-english
Del: in docs -- https://master.php.net/note/delete/72717/in+docs
Del: other reasons-- https://master.php.net/note/delete/72717
Reject -- https://master.php.net/note/reject/72717
Search -- https://master.php.net/manage/user-notes.php