spf-dkim-dmarc-demo/sender/scripts/send_confirmation_email.sh

60 lines
1.3 KiB
Bash
Raw Normal View History

#!/bin/sh
2023-10-25 15:50:33 +02:00
#
# SPDX-FileCopyrightText: 2023 Afnic
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
sendmail -f support@expediteur.example -F "Service client" \
destinataire@destinataire.example <<EOF
Subject: Confirmation de commande 21903482
Content-Type: text/html; charset=utf-8
<html>
<head>
<style>
table, th, td {
border: 1px solid;
border-collapse: collapse;
padding: 0.5ex 1ex;
}
table { margin-bottom: 1em; }
.r { text-align: right; }
</style>
</head>
<body>
<p>Bonjour,</p>
<p>La commande suivante a bien été confirmée:</p>
<table>
<tr>
<th>Qté</th>
<th>Désignation</th>
<th>PU HT</th>
<th>PU TTC</th>
<th>Sous-total</th>
</tr>
<tr>
<td class="r">1</td>
<td>Savonnette</td>
<td class="r">1,66 €</td>
<td class="r">2,00 €</td>
<td class="r">2,00 €</td>
</tr>
<tr>
<td colspan="2"><strong>Total</strong></td>
<td class="r">1,66 €</td>
<td class="r">2,00 €</td>
<td class="r">2,00 €</td>
</tr>
</table>
<p>
Pour suivre votre commande, connectez-vous à votre
<a href="https://expediteur.example/suivi/21903482">espace client</a>.
</p>
<p>Cordialement,</p>
<p>Le service client.</p>
</body>
</html>
EOF