(→Unix generique) |
(→Unix generique) |
||
Ligne 33 : | Ligne 33 : | ||
echo "<br> | echo "<br> | ||
Cordialement<br> | Cordialement<br> | ||
- | <a href="mailto:mail-signature@laposte.fr">intitulé | + | <a href="mailto:mail-signature@laposte.fr">intitulé signature</a><br> |
</BODY> | </BODY> | ||
</HTML>" | </HTML>" |
supprimer la totalité les mails de mailx:
mail d *
envoyer un mail en html avec pièce jointe en passant par sendmail ( en KSH ):
Mail_Dest = destinataires séparé par des virgules
Mail_Sujet = objet du mail
Pièce jointe = Txt
boundary="-q1w2e3r4t5" , la chaîne -q1w2e3r4t5 est arbitraire et pourrais etre remplacé par une autre chaîne singulière. Elle sert a dissocier les parties du mail: message et pièce jointe.
( echo 'To: '$Mail_Dest echo 'Subject: '$Mail_Sujet echo 'MIME-Version: 1.0' echo 'Content-Type: multipart/mixed; boundary="-q1w2e3r4t5"' echo echo '---q1w2e3r4t5' echo 'Content-Type: text/html' echo 'Content-Disposition: inline' echo ' <HTML> <BODY style="font-family:Verdana;font-size:0.8em"> ' echo "Bonjour,<br> <br> ... Corps du messages ... <br> echo "<br> Cordialement<br> <a href="mailto:mail-signature@laposte.fr">intitulé signature</a><br> </BODY> </HTML>" echo '---q1w2e3r4t5' echo 'Content-Type: application/octet-stream"' echo "Content-Transfer-Encoding: quoted-printable" echo 'Content-Disposition: attachment; filename="'$(basename $Txt)'"' echo cat $Txt echo '---q1w2e3r4t5--' ) | /usr/lib/sendmail $Mail_Dest