I installed the Mandrill API on my Windows Apache server. When I try to send an email using the code below, I get an error:
Mandrill_HttpError - API call / send pattern failed: SSL certificate problem: local issuer certificate could not be obtained
I donβt understand how Mandrill connects to my local issuer certificate. My web server does have a valid certificate and can successfully display HTTPS pages.
Any ideas?
$mandrill = new Mandrill('MyMandrillAPIKey'); $message = array( 'subject' => 'Test message', 'from_email' => 'MyEmailAddress', 'html' => '<p>this is a test message with Mandrill\ PHP wrapper!.</p>', 'to' => array(array('email' => 'MyEmailAddress', 'name' => 'David Splat')), 'merge_vars' => array(array( 'rcpt' => 'MyEmailAddress', 'vars' => array( array( 'name' => 'FIRSTNAME', 'content' => $fName), array( 'name' => 'LASTNAME', 'content' => $lName) )))); $template_name = 'MyTemplateName'; $template_content = array( array( 'name' => 'main', 'content' => 'Hi *|FIRSTNAME|* *|LASTNAME|*, thanks for signing up.'), array( 'name' => 'footer', 'content' => 'Copyright 2014.') ); print_r($mandrill->messages->sendTemplate($template_name, $template_content, $message)); } catch(Mandrill_Error $e) {
source share