Support from Acquia helps fund testing for Drupal Acquia logo

Comments

PhilY’s picture

Am I missing something so obvious?

sgabe’s picture

Do you mean to allow to set a Reply-To address for the Rules actions? If you are using Mime Mail within a custom module you can add the Reply-To header manually.

PhilY’s picture

yes, in a Rules "Send HTML e-mail" action I find To, CC and CCI fields but no Reply-To
Thanks

sgabe’s picture

Title: Missing "Reply-To" field? » Add "Reply-To" field to Rules actions
Version: 7.x-1.0-alpha1 » 7.x-1.x-dev
Component: User interface » Code

Changing issue settings.

Wouter Van den Bosch’s picture

Having this feature would be very helpful for us as well.

das-peter’s picture

Status: Active » Needs review
FileSize
3.03 KB

Attached patch adds a reply-to parameter to the mimemail rules action.
Further it generalizes the address header handling.

Use-case for the reply-to for us is that our customer gets notifications about commerce orders.
The notification uses the shop-customers mail address as sender, that way the booking-agents can reply directly to the notification mail.
"Unfortunately" our customer has a restrictive mail-server that checks if a sender mail address is valid.
That means if the shop-customer inadvertently enters an invalid mail-address the booking-agents won't get the notification and thus don't have a chance to act as quick as normal.
Adding the reply-to header could solve this issue by still allowing the agents to reply directly to the notification mail.

sgabe’s picture

@das-peter: Patch looks good, thank you! Would you do the same for the system actions as well and attach a new patch including that too?

das-peter’s picture

@sgabe: Thank you for the feedback. Here's the extended patch.
I did also some cleanup using drupalcs - the second attached patch (mimemail-coding-standards-cleanup.patch) contains these changes and could be applied after the reply-to patch is applied.

sgabe’s picture

FileSize
5.64 KB
+++ b/modules/mimemail_action/mimemail_action.module
@@ -136,6 +144,11 @@ function mimemail_send_email_action_validate($form, $form_state) {
+  $reply_to = trim($form_state['values']['$reply-to']);

This line will throw an error because of the variable prefix in the index.

Otherwise it looks good, but we should also have a back port to D6.

sgabe’s picture

Title: Add "Reply-To" field to Rules actions » Add "Reply-to" field to Rules and system actions
Status: Needs review » Needs work
FileSize
6.71 KB
5.64 KB
+++ b/mimemail.module
@@ -326,22 +332,20 @@ function mimemail_mail($key, &$message, $params) {
+    'bcc' => 'Ccc',

Here the header should be Bcc.

I am attaching new patches for D6 and D7.

sgabe’s picture

Status: Needs work » Needs review
das-peter’s picture

@sgabe: Sorry for the sloppy copy/paste (['$reply-to'] and thank you very much for your effort!

sgabe’s picture

Would be appreciated if you could test it.

sgabe’s picture

Status: Needs review » Needs work

Patches need to be rerolled.

sgabe’s picture

Status: Needs work » Fixed
FileSize
6 KB
5.32 KB

Rerolled and committed to both branches.

Status: Fixed » Closed (fixed)

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