Very excited to be asking my first question on StackOverflow. I\'ve been relying on it to teach myself quite a lot over the years!
My question is this. I am getting the
I don't know about mandrill, but your $content string has double quotes" in it and your delimiter in the $postString is also double quotes. This is going to break in any language. You need to escape the double quotes in the $content as required by mandril.
"html": "' . $content . '", will translate to
"html": "this is the emails html content
",
^ ^
Try
"html": "' . str_replace('"','\\"',$content) . '",
"text": "' . str_replace('"','\\"',$content_text) . '",
Instead of
"html": "' . $content . '",
"text": "' . $content_text . '",