I am just trying to integrate mandrill mail with my application below, this is my code in php
$args = array(
'key' => '73357ad2-e59e-4669---------',
'message' => array(
"html" => "<p>\r\n\tHi Adam,</p>\r\n<p>\r\n\tThanks for <a href=\"http://mandrill.com\">registering</a>.</p>\r\n<p>etc etc</p>",
"text" => null,
"from_email" => "xxx@xxx.com",
"from_name" => "SIVOnline",
"subject" => "Your recent registration",
"to" => array(array("email" => "xxx@xxx.com")),
"track_opens" => true,
"track_clicks" => true,
"auto_text" => true
)
);
$curl = curl_init('https://mandrillapp.com/api/1.0/messages/send.json' );
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_HEADER, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($args));
$response = curl_exec($curl);
curl_close( $curl );
and it gives me an invalid api key after key regeneration, but I get the same error.
source
share