Attached is the patch, although the change is one line:

Line 1387 (changed):

    return mimemail($from, $mail->to, $mail->subject, $mail->body, $plain_text_only, $headers, $plain_text_body, array(), 'simplenews-send-mail');
CommentFileSizeAuthor
#3 simplenews.324815_01.patch732 bytessgabe
simplenews.module.patch801 byteshanoii

Comments

sutharsan’s picture

Status: Needs review » Fixed

Thanks for the code.
Now committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

sgabe’s picture

Title: $mailkey is not passed to the mimemail function thus avoiding mimemail to call hook_mail_alter properly » Pass $mailkey to Mime Mail
Version: 5.x-1.5 » 6.x-1.x-dev
Status: Closed (fixed) » Needs review
StatusFileSize
new732 bytes

The mailkey is empty in the 6.x versions. The $message['id'] should be passed to the mimemail() call.

      $message['result'] = mimemail(
        $message['from'],
        $to,
        $message['subject'],
        $message['body'],
        $plain,
        $message['headers'],
        $plain ? $message['body'] : simplenews_html_to_text($message['body'], TRUE),
        isset($message['params']['context']['node']->files) ? $message['params']['context']['node']->files : array(),
        $message['id']
      );
miro_dietiker’s picture

Fixed this on 6--2 and 6--1 CVS. Thank you!

sgabe’s picture

Status: Needs review » Fixed

I think this is fixed then.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

alexkb’s picture

Thanks for the re-patch, sgabe! Had to apply it to the latest 1.x release, 6.x-1.3, which fixed the problem!