|
|
|
|
||||||
| comp.info.servers.unix Web servers for UNIX platforms. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hi,
I am handling MIME type mail messages with attachments, i.e. pfd files, images, etc. I use a php script to either embed the attachments in an html file or to create a hyperlink on that attachment, wether the 'Content-disposition' is inline or attachment or not existing at all. Which http headers are needed besides 'Content-type'? tia, Oliver |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
Hello,
I do the same thing but using a shell script, and the file is always inline, anyway in order to obtain the headers I just sent myself a short mail with a small text part and an attached file, and I could gather this, which works: ---- cat <<EOF >$MAILFILE From: root@$MACHINE To: $RECIPIENTS Subject: [$MACHINE] - Fichier CSV monitoring - $TODAY MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="$BOUNDARY" --$BOUNDARY Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline En attachement, le fichier CSV de monitoring, jour $TODAY. --$BOUNDARY Content-Type: text/csv; name="monitoring-$TODAY.csv" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="monitoring-$TODAY.csv" EOF ---- And then append the MIME-encoded file at the end and send it as is. HTH! |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
Hello,
I do the same thing but using a shell script, and the file is always inline, anyway in order to obtain the headers I just sent myself a short mail with a small text part and an attached file, and I could gather this, which works: ---- cat <<EOF >$MAILFILE From: root@$MACHINE To: $RECIPIENTS Subject: [$MACHINE] - Fichier CSV monitoring - $TODAY MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="$BOUNDARY" --$BOUNDARY Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline En attachement, le fichier CSV de monitoring, jour $TODAY. --$BOUNDARY Content-Type: text/csv; name="monitoring-$TODAY.csv" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="monitoring-$TODAY.csv" EOF ---- And then append the MIME-encoded file at the end and send it as is. HTH! |
|
![]() |
| Outils de la discussion | |
|
|