IMAP PHP
| From: | markus weltin | Date: | Tue, 14 Sep 1999 00:04:29 +0000 |
| Subject: | IMAP PHP | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-10872@lists.php.net to get a copy of this message | ||
If this question is beyond the scope of this mailing list I apologize,
however, please reply with an indication of where this question could be
answered.
In the process of writting a interface for a web based email
system sending attachements appears to be the most difficult aspect.
Using an HTML form with fields for subject, body, to address, and
attachement I attempt to submit all this data to a php script that will
then send the mail. The "file" input type is used for browseing the
local file system to select the file to be attached. All works well if
the file is a text file. The script found at
http://renoir.vill.edu/~ylee/mailfile.txt is
working well for this
application. It fails, however, when the end user tries to send a file
that requires a different mime type. If this script is manually edited
using the correct mime type the mail and resulting attachement will be
viewed by the reciepant without any problem.
This where the delema is exposed. Upon submission of the HTML form,
php creates a tmp file in the tmp directory. The file is always named
with this convention; php[5 number string][3 letter string] (ie.
/tmp/php02307gaa). Once the email is sent this file is destroyed, and a
file nsform[some long string]. The resulting nsform**** file contains
all the correct information nessary to creat the proper mime headers,
hence I assume the original tmp file also contains this informations.
My question is how do I parse out the original temp file inorder to
get the correct information to build the mime headers.
Thank you
Markus