In My Previous Post, I share the method to send emails via PHP cURL & PHP Guzzle using Pepipost JSON API in this tutorial we are going to see the method to Send Emails from Shell Script using Pepipost API v2.

Here is the Simple Bash Shell Script Which helps us to Send Emails via Pepipost.

  • Create JSON File named as params.json
{"personalizations": [{
    "recipient": "",
    "attributes": {
        "NAME": "Hello User"
"tags": "Post Updates",
"from": {
    "fromEmail": "",
    "fromName": "Santhosh veer"
"subject": "[Blog Post Updates]",
"content": "Hi,[%NAME%] This is My First test Email",
"replyToId": ""

  • Create bash File Named as

curl --request POST \
--url \
    --header "api_key: $PEPIPOST_API_KEY" \
    --header "content-type: application/json" \
    --data @params.json

  • Execute the Script
  • Output Response