Hi,

checked out the mimemail_action.module

1) I tried to send attachments and first failed because of the helper text. So I changed it and put a patch with this comment.
Need a relative path to the drupal root not to a file directory (could be on in default, all, mysite etc. directory).

2) I noticed that the text that will be put in the mail body comes as a string. In normal mails this is a array. An array is more useful for altering. If the body text is a string you only can alter everything or do someting like $message['body'] .= 'hello';
But in normal mails this can be done with $message['body'][] = 'some text'; and would be possible to change any line of a known mail by use an $message['body'][15] = 'new line 15';

Don't have any idea how to change this right now.

Comments

sgabe’s picture

Makes sense, I will look into it.

ibes’s picture

The same issues exists in the rules.inc

body is string not array
and helpertext might be better a relative url to drupal root

sgabe’s picture

Title: mimemail_action.module typo and body => array » Use array for body in Rules and system actions
Status: Active » Needs review
StatusFileSize
new598 bytes

We will cover issues with attachments in #1066438: Initial support of attachments. Lets deal with your second suggestion here. I think this also applies for the 6.x branch.

I wonder if the attached patch would be enough.

ibes’s picture

I'll check that out.

Looks good - because in this case it is a part of an array.
But I wonder how the drupal_mail function manage that every line is an value of an array.
Because with this function there would be the whole body in one array value.

But let check it out and see what it does.

sgabe’s picture

As far as I know the core does only this. Its purpose is to break the body to different sections, but not line by line, e.g Simplenews uses $message['body']['body'] and $message['body']['footer'].

ibes’s picture

Status: Needs review » Reviewed & tested by the community

works like expected.

Now "body" is an array and I am able to alter and extend that array!

sgabe’s picture

Version: 7.x-1.x-dev » 6.x-1.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

Committed to D7.

sgabe’s picture

Status: Patch (to be ported) » Fixed
StatusFileSize
new736 bytes

Committed to D6.

Status: Fixed » Closed (fixed)

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