RE: [PHP] Sending two attachments
| From: | Sharat Hegde | Date: | Fri, 12 Oct 2001 11:53:59 +0000 |
| Subject: | RE: [PHP] Sending two attachments | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-70920@lists.php.net to get a copy of this message | ||
I solved my own problem with the two attachments.
The mail system ends the message when it finds two hyphens (--) after the
Message Boundary. Changing --Message-Boundary-- in the middle of the message
ensured that the 2nd attachment is also read by Outlook or any other mail
system. --Message-Boundary-- must be present at the very end of the message.
Regards,
Sharat
-----Original Message-----
From: Sharat Hegde [mailto:shah@sonata-software.com]
Sent: Friday, October 12, 2001 2:14 PM
To: php-general@lists.php.net
Subject: [PHP] Sending two attachments
Hello,
I am trying to send multiple attachments by email from my PHP program (two
to be precise).
I have put the relevant codes to send attachments, and separated it with the
Message Boundary. The first attachment comes fine. The second attachment is
also coming to my Inbox, but for some reason, Outlook Express (my mail
client) does not recognize the 2nd attachment. The message header and the
size of the email indicates that the content has two attachments.
Any clues?
The email looks like this after the standard headers for From and To:
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="Message-Boundary"
This is a MIME encoded message.
--Message-Boundary
Content-Type: text/plain; charset="iso-8859-1"
Testing mail component
--Message-Boundary
Content-Type: application/octet-stream; name="ValleyView1.csv"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="ValleyView1.csv"
Um9vbUlkLFNlcmlhbE51bWJlcixEaXNwbGF5T3JkZXIsRGVzY3JpcHRpb24sUmF0ZVR5cGUsQWR1
bHRQcmljZSxDaGlsZFByaWNlLE51bURheXMsTWluUGVyc29ucyxNYXhQZXJzb25zLEFwcGxpY2Fi
bGVEYXlzClIwMDIsMiwxLERvdWJsZSAzIG5pZ2h0cyxWQUwsMjI1LjAwLDAuMDAsMywxLDIsIjAs
MSwyIgpSMDAyLDEsMixEb3VibGUgNCBuaWdodHMsVkFMLDI4MC4wMCwwLjAwLDQsMSwyLCIwLDEi
Cg==
--Message-Boundary--
Content-Type: application/octet-stream; name="junk.txt"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="junk.txt"
SnVuayBUZXh0IEZpbGUKTGluZTIKTGluZTMK
--Message-Boundary--
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net