I am using mandrill API and integrate this with laravel-5 on localhost, m getting status as queued and check this mail is in mandrill dashbopard then It shows Rejected, What am I doing wrong, Please let me know.
$message = array(
'html' => '<p>Example HTML content</p>',
'text' => 'Example text content',
'subject' => 'example subject',
'from_email' => 'rajeevvarshney56@gmail.com',
'from_name' => 'Rajeev Varshney',
'to' => array(
array(
'email' => 'rajeev.web@boltt.net',
'name' => 'Boltt Sports',
'type' => 'to'
)
),
'headers' => array('Reply-To' => 'message.reply@example.com'),
'important' => false,
'track_opens' => null,
'track_clicks' => null,
'auto_text' => null,
'auto_html' => null,
'inline_css' => null,
'url_strip_qs' => null,
'preserve_recipients' => null,
'view_content_link' => null,
'bcc_address' => 'message.bcc_address@example.com',
'tracking_domain' => null,
'signing_domain' => null,
'return_path_domain' => null,
'merge' => true,
'merge_language' => 'mailchimp',
// 'global_merge_vars' => array(
// array(
// 'name' => 'merge1',
// 'content' => 'merge1 content'
// )
// ),
// 'merge_vars' => array(
// array(
// 'rcpt' => 'recipient.email@example.com',
// 'vars' => array(
// array(
// 'name' => 'merge2',
// 'content' => 'merge2 content'
// )
// )
// )
// ),
'tags' => array('password-resets'),
'subaccount' => 'rajeevvarshney',
//'google_analytics_domains' => array('example.com'),
// 'google_analytics_campaign' => 'message.from_email@example.com',
'metadata' => array('website' => 'www.example.com'),
// 'recipient_metadata' => array(
// array(
// 'rcpt' => 'recipient.email@example.com',
// 'values' => array('user_id' => 123456)
// )
// ),
'attachments' => array(
array(
'type' => 'text/plain',
'name' => 'myfile.txt',
'content' => 'ZXhhbXBsZSBmaWxl'
)
),
'images' => array(
array(
'type' => 'image/png',
'name' => 'IMAGECID',
'content' => 'ZXhhbXBsZSBmaWxl'
)
)
);
// $async = false;
//$ip_pool = 'Main Pool';
//$send_at = 'example send_at';
$result = $mandrill->messages->send($message);
Response
----------
Array
(
[0] => Array
(
[email] => rajeev.web@boltt.net
[status] => queued
[_id] => 2f3c2f9ec1034ac9bd66ccd91ad3fbe1
)
)
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire