Needs work
Project:
Mail Editor
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
29 Aug 2013 at 10:47 UTC
Updated:
30 Nov 2013 at 14:08 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
mrded commentedTake a look my patch.
To send plaintext with HTML message together you should enable mimemail module.
Comment #2
mrded commentedSorry, I completely forgot about tokens. This patch is with tokens replacements.
Comment #3
salvisI agree that we should aim to provide a text/plain alternative. However, this is a breaking change for Subscriptions and possibly other client modules that extend Mail Editor, which probably means we have to go to 7.x-2.x and double our maintenance effort.
Is there existing support for sending multipart/alternative emails? Have you actually tried this successfully? In what set-up?
Some comments on the patch:
What is "':input"? I've never seen that before.
This would be 7101, or even 7201, if we go to 7.x-2.x.
Comment #4
mrded commentedWe already use this in both of our projects, it works fine.
It because it's new setting for plaintext.
Comment #5
salvisYeah, but where is the piece of code that interprets that?
Comment #6
mrded commentedComment #7
salvisI'm still not seeing the light...
This creates an array with one element, whose index is
':input[name="rewrite_plaintext"]'and whose value is another array.That's a very odd index value. Index value are typically either numbers or strings of letters. They don't usually contain colons, brackets, and double-quotes. I have to assume that this index value is somehow evaluated somewhere.
Please explain where, how, and what the result is.
Comment #8
mrded commentedWill render as html bellow:
So for plaintext field, I basically check input tag with name="rewrite_plaintext" to the state of being checked.
You can read more about Form API #states here.
Comment #8.0
mrded commentedUpdate
Comment #9
das-peter commentedI just gave this a shot and it works just fine (Also tested with the patches for rules and mimemail rules integration).
The review of the patch also looks good, I've just some more or less cosmetic changes:
mail_edit_template_subform()So I'm bold enough to set this to RTBC since the only concerns that savlis had were related to a states handling of fapi which shouldn't be a problem at all. Details about drupals states feature can be found here too: https://api.drupal.org/api/drupal/includes!common.inc/function/drupal_pr...
Comment #10
mrded commentedPatch is not ready yet, because it doesn't provide plaintext field for comments.
Steps to Reproduce:
You should see plaintext for body and comments. Currently it's just for body.
Comment #11
salvisThat's where I got stuck. It didn't mean that I was through. :)
[Thank you for the explanation in #8, mrded! I hadn't encountered #states before.]
Yes, for Subscriptions we need both fields for both body and comments. The challenge here is that the comment field is supplied by Subscriptions, which means Subscriptions needs to add and manage the plain-text comment field, too. I've created #2147671: Add a plain-text field into Mail Editor for this.
So, here goes the review:
$message['params']['plaintext']Mime Mail-specific, or will it work with HTML Mail / Mail MIME as well? I don't want to leave the latter behind.This will need testing with HTML Mail / Mail MIME as well before it can be RTBC.