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