From 3385dfb8fd7a7cd5f9a04b77d90236627cf9d2d6 Mon Sep 17 00:00:00 2001 From: fred Date: Sat, 13 Jan 2024 11:59:37 +0100 Subject: [PATCH] debug ed --- tools/mailjet.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/mailjet.sh b/tools/mailjet.sh index 611e7e5b..90ca8dff 100755 --- a/tools/mailjet.sh +++ b/tools/mailjet.sh @@ -21,12 +21,14 @@ echo ' mail="$1" # EMAIL DESTINATAIRE [[ ! $1 ]] && mail="support@qo-op.com" +#~ echo "DEST=$mail" # mail=geg-la_debrouille@super.chez-moi.com YUSER=$(echo ${mail} | cut -d '@' -f1) # YUSER=geg-la_debrouille LYUSER=($(echo "$YUSER" | sed 's/[^a-zA-Z0-9]/\ /g')) # LYUSER=(geg la debrouille) CLYUSER=$(printf '%s\n' "${LYUSER[@]}" | tac | tr '\n' '.' ) # CLYUSER=debrouille.la.geg. YOMAIN=$(echo ${mail} | cut -d '@' -f 2) # YOMAIN=super.chez-moi.com pseudo="${CLYUSER}_${YOMAIN}" +#~ echo "PSEUDO=$pseudo" messfile="$2" # FICHIER A AJOUTER AU CORPS MESSAGEUP @@ -35,7 +37,7 @@ title="$3" SUBJECT="[UPlanet] ${title} ${pseudo} : $(myHostName)" -MESSAGESIGN="---
this message is sent to you by $(myHostName) your ♥BOX Astroport.ONE Station" +MESSAGESIGN="---
this message is sent to you by $(myHostName) your ♥BOX Astroport.ONE Station" echo " ######################################################################## @@ -96,11 +98,11 @@ json_payload='{ ], "Subject": "'${SUBJECT}'", "TextPart": "'$(myIpfsGw)/ipfs/${EMAILZ}'", - "HTMLPart": "

Bro

You have a
'${title}'!

on UPlanet
May the good vibes be with you!
'${MESSAGESIGN}'" + "HTMLPart": "

Bro

You have a
'${title}'!

on UPlanet
May the good vibes be with you!
'${MESSAGESIGN}'" } ] }' - +echo "$json_payload" # Verify the JSON structure with jq echo "$json_payload" | jq . # Run: