(→Unix generique) |
(→Unix generique) |
||
| Ligne 8 : | Ligne 8 : | ||
envoyer un mail en html avec pièce jointe avec sendmail: | envoyer un mail en html avec pièce jointe avec sendmail: | ||
| - | + | Mail_Dest = destinataires séparé par des virgules | |
| + | Mail_Sujet = objet du mail | ||
| + | Piece jointe = Txt | ||
| + | <pre> | ||
( | ( | ||
echo 'To: '$Mail_Dest | echo 'To: '$Mail_Dest | ||
| Ligne 23 : | Ligne 26 : | ||
echo "Bonjour,<br> | echo "Bonjour,<br> | ||
<br> | <br> | ||
| - | + | ... Corps du messages ... | |
<br> | <br> | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
echo "<br> | echo "<br> | ||
Cordialement<br> | Cordialement<br> | ||
| - | <a href="mailto: | + | <a href="mailto:mail-signature@laposte.fr">Exploitation Orleans DAPO/DSEM</a><br> |
| - | + | ||
</BODY> | </BODY> | ||
</HTML>" | </HTML>" | ||
| Ligne 45 : | Ligne 43 : | ||
echo '---q1w2e3r4t5--' | echo '---q1w2e3r4t5--' | ||
) | /usr/lib/sendmail $Mail_Dest | ) | /usr/lib/sendmail $Mail_Dest | ||
| + | </pre> | ||
supprimer la totalité les mails de mailx:
mail d *
envoyer un mail en html avec pièce jointe avec sendmail: Mail_Dest = destinataires séparé par des virgules Mail_Sujet = objet du mail Piece jointe = Txt
( 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">Exploitation Orleans DAPO/DSEM</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