Search code examples
jsonrestemailsparkpost

SparkPost email not sending


I"m trying to get SparkPost setup for my website but keep encountering problems. I'm sending the proper headers so I know that's the issue and am pretty sure it's something with my json body.

This is the endpoint I'm posting to: https://api.sparkpost.com/api/v1/transmissions?num_rcpt_errors=3

{
    "content": {
      "from":{  
         "name":"Testing Email",
         "email":"testing@hidden.com"
      },
      "subject": "Thundercats are GO!!!",
      "text": "Sword of Omens, give me sight BEYOND sight"
    },
    "recipients": [
        { 
            "address": {
                "email": "jscotto@hidden.com" 

            }
        }
    ]
}

The response from the above is this:

{
  "results": {
    "total_rejected_recipients": 0,
    "total_accepted_recipients": 1,
    "id": "hidden"
  }
}

I don't know what could be causing it to not send because from my knowledge, I've followed every guideline on the documentation.


Solution

  • Turns out the emails were sending, they're just hitting my spam box. I ended up setting up an ip_pool of sa_shared and that solved my issue.