diff --git a/includes/simplenews.mail.inc b/includes/simplenews.mail.inc index a70525a..de19dcf 100644 --- a/includes/simplenews.mail.inc +++ b/includes/simplenews.mail.inc @@ -188,9 +188,10 @@ function simplenews_mail_mail($nid, $vid, $mail, $key = 'node') { if (module_exists('mimemail')) { // If mimemail module is installed ALL emails are send via this module. // drupal_mail() builds the content of the email but does NOT send. - $message = drupal_mail('simplenews', $key, $subscription->mail, $subscription->language, $params, $params['from']['formatted'], FALSE); + $message = drupal_mail('simplenews', $key, $subscription->mail, $subscription->language, $params, $params['from'], FALSE); $to = isset($message['params']['context']['account']) ? $message['params']['context']['account'] : $message['to']; $plain = $message['params']['context']['node']->simplenews['s_format'] == 'plain' ? TRUE : NULL; + $message['headers']['From']=$message['from']; $mimemail_result = mimemail( $message['from'], $to, @@ -695,6 +696,8 @@ function _simplenews_set_from($node = NULL) { return array( 'address' => $address, + 'mail' => $address, + 'name' => $name, 'formatted' => $formatted_address, ); }