PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > comp.info.servers.unix > mime to http
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.info.servers.unix Web servers for UNIX platforms.

mime to http

Réponse
 
LinkBack Outils de la discussion
Vieux 05/05/2006, 14h17   #1
Oliver Block
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut mime to http

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

  Réponse avec citation
Vieux 08/05/2006, 09h03   #2
Francis Galiegue
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: mime to http

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!

  Réponse avec citation
Vieux 08/05/2006, 09h03   #3
Francis Galiegue
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: mime to http

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!

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 22h41.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,07946 seconds with 11 queries