I have this code for send a simple notification email.
function mymodule_commerce_checkout_complete($order){
$buyer = user_load($order->uid);
if(in_array('wholesale', $buyer->roles)){
$params['buyer'] = $buyer;
$params['order'] = $order;
drupal_mail('commerce_mayoreo_workflow', 'new_order_mayoreo', '[email protected]', user_preferred_language($buyer), $params);
}
}
This is the hook_mail()
implementation.
function mymodule_mail($key, &$message, $params){
switch ($key) {
case 'new_order_mayoreo':
$langcode = $message['language']->language;
$message['subject'] = t('New Quote request', array('langcode' => $langcode));
$message['body'][] = t("New Quote request has been created\n\nYou can download the CSV format of the request here:\n\nhttp://bbheperfumes.com/download-order-csv/@order_id",array('@order_id' => $params['order']->order_id), array('langcode' => $langcode));
break;
}
}
It's not sending the email, and Im checking in recent log entries and there is not anything about a failed delivery, anything about system tried to send a mail.
I could not figure out why it's not sending the email, so I want to ask if mimemail has something to do with this issue?
I just have the MimeMailSystem in the 2 first select lists that are displayed in the configs of mail system.
By the way, I am using a fresh install of Commerce Kickstart.