From 1eac39f68430d87b3eb1520c559d364f15846fe8 Mon Sep 17 00:00:00 2001 From: David D'ALMEIDA Date: Sat, 4 Nov 2023 00:13:01 +0100 Subject: [PATCH] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'notifymail.sh'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- notifymail.sh | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/notifymail.sh b/notifymail.sh index d08f0964..bda3f1f7 100644 --- a/notifymail.sh +++ b/notifymail.sh @@ -1,8 +1,8 @@ #!/bin/bash -# Mailjet API Credentials +# Resend API Credentials API_KEY='MAILJET_API_KEY' -API_SECRET='MAILJET_API_SECRET' +API_SECRET='re_94F1jqfM_8XvPukHypDnYscZt93FcWPdd' #Mail info @@ -15,14 +15,12 @@ FROM_NAME='Equipe de développement' # This call sends a message to the given recipient with vars and custom vars. curl -s \ -X POST \ - --user "$API_KEY:$API_SECRET" \ - https://api.mailjet.com/v3.1/send \ + https://api.resend.com/emails \ + -H 'Authorization: Bearer re_94F1jqfM_8XvPukHypDnYscZt93FcWPdd' \ -H 'Content-Type: application/json' \ - -d '{ - "Messages":[ - { + -d '{ "From": { "Email": "$FROM_EMAIL", "Name": "$FROM_NAME" }, "To": [ { "Email": "equipedev@waveheart.fr", "Name": "dev" } ], - "TemplateID": 0000, "TemplateLanguage": true, - "Subject": "Nouvelle version démo", "Variables": {}, - "Attachments": [ { "ContentType": "text/plain", "Filename": "changelog.md", "Base64Content": "'"$changelog"'" } ] } ] }' + "Subject": "Nouvelle version démo", + "html": "

Congrats on sending your first email!

" + "Attachments": [ { "ContentType": "text/plain", "Filename": "changelog.md", "Base64Content": "'"$changelog"'" } ] }' \ No newline at end of file