Hi,
I'm using Rules to Send Message Notify, however, missing
1.) Attachment
2.) CC
3.) BCC

It's so troublesome that we have to write code for Sending attachments with Mime Mail . In Rules, we can send HTML email easily with attachments.

The Message Stack modules are still very primitive in user-interface as well as integration with Rules.

I spent nearly a week to understand the working concept of Message Stack modules with lots of trial and errors as well as studying though the coding.

Thanks.

Comments

philsward’s picture

This is "mostly" a Duplicate of #1961366: Add support for CC and BCC. BCC work is already being done there and I'm sure the CC could be added. The only thing that naturally wouldn't be covered on that issue, is the attachments request.

I propose this request is moved to only deal with attachments if it's still necessary.

frederickjh’s picture

frederickjh’s picture

ron_s’s picture

Title: Add Attachment, CC, BCC in Rules » Add Attachment support with Rules action
Version: 7.x-2.5 » 7.x-2.x-dev
Priority: Critical » Normal
Related issues: +#856358: Add cc/bcc support for Send mail

I've added CC functionality to the patch in #1961366. I agree attachments can be handled directly as part of this task, since it is different from what is needed for cc/bcc.

Also if you need a patch for the basic "Send mail" included with Rules to use cc/bcc, there is one available: https://www.drupal.org/project/rules/issues/856358

frederickjh’s picture

Project Page now says:

Note: Development and issues are handled on GitHub, and code is synced back to Drupal.org

May be a good idea to move this to Github.

lubwn’s picture

If you need attachment, this one works for me:

function HOOK_message_attachment_mail_alter(&$message) {
  if ($message['key'] == 'variable_email_commerce_email_order' || $message['key'] == 'commerce_order_order_confirmation' || $message['key'] == 'commerce_order_admin_order_confirmation') {
    if (!empty($message['params']['message_entity'])) {
      $message['params']['attachments'][] = array(
        'filepath' => 'sites/default/files/subory/YOUR_FILE.pdf',
      );
      $message['params']['attachments'][] = array(
        'filepath' => 'sites/default/files/subory/YOUR_SECOND_FILE.pdf',
      );
    }
  }
}

But you need to have mime mail enabled as well.

bluegeek9’s picture

Status: Active » Closed (outdated)