Needs review
Project:
Variable Email
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
4 Feb 2014 at 13:34 UTC
Updated:
11 Jul 2019 at 20:06 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
rowbotony commentedI am using Entity forms, and also have the need to add a "reply-to" header. My clients receive an Entity form notification email from their visitors, and they want to "reply to" from their email software, this patch resolves this issue for me.
I spent a few hours today testing Entity form 2.x with variable_email and I have found that, as of this posting, the variable_email -dev branch does not work, all of my tokens come through in the message as the token (example:
[entityform:field-contact-email-address]), and wouldn't be converted to the variable value.To make a long story short - I have been able to add a reply-to to variable_email-7.x-1.x-alpha1 and I'm using it in production with entity_form-7.x-1.4. It seems drupal_mail is similar to PHP mail(), and drupal_mail gladly accepts
$reply, so that's what this patch adds. It adds a "Reply To" box on the "Send mail with Variable" action UI form.Comment #2
rowbotony commentedforgot to add the patch to the last post :(. I did not test this with variable_email-7.x-1.x-dev as the -dev branch was quite broken for me in my use case. This patch is for variable_email-7.x-1.x-alpha1 only.
Comment #3
giupenni commentedThank you for your post.
This can work with Entity Form 2?
In "Send mail with Variable" in "Select the variable which should be used as a template" box what I should choose?
Thank you in advance.
Comment #4
giupenni commented+1 this works with Entity Form 1
Comment #5
giupenni commentedIs possibile solve this issue with EntityForm 2 ?
Comment #6
ziobudda commentedAny news for EntityForm 2.x and reply-to set to email field ?
Thanks.
M.
Comment #7
giupenni commentedI think there is not chance (last commit is been 2 years ago) and unfortunately Entity Form 1.x is not works always correctly.
I'm thinking to switch to webform with some patch (or module) to implement (with some trick) some kind of reference (note title, nid, ....).
Comment #8
noahzenzen commentedHello, I'm currently using rules to send emails (via Mime Mail module as I want them to be HTML emails) and am using the reply-to feature (Rules version = "7.x-2.9"). For the most part it works great. The one issue I'm having is that it's actually putting in two email address when someone hits the reply button in their email client.
I am using tokens to grab an email from a content type field, that toke goes in the Reply-to field. That works. That being said the other email is my "noreply@" email address that's configured for my site. Is there a way to not have the site email address be included in the reply-to? For the life of me I can't find a setting to either include or exclude it. I'm wondering if it's a bug as the help note says that if the field is left blank it will use the sites default email address.
Has anyone else run into this? Am I posting in the wrong place?
Thanks!
Comment #9
leendertdb commentedI tried to use the patch from #2, however it didn't seem to work for us.
The original patch adds a $reply parameter to the drupal_mail function, as can be seen here (at the end):
However the drupal_mail function (at least in the latest 7.x core branch) does not accept a "$reply" variable in that location as can be seen in the API docs:
7.x mail.inc drupal_mail($module, $key, $to, $language, $params = array(), $from = NULL, $send = TRUE)Attached patch (applies to 7.x-1.x-dev) fixes this by passing in the reply-to variable as a proper header.
Comment #10
leendertdb commentedUpdating status to "Needs review".
Comment #11
leendertdb commentedI noticed the previous patch (#9) was missing a part of the original patch. Updated patch attached.
Comment #12
geek-merlinGood idea. Unfortunately i fear this breaks existing rules?
Comment #13
g33kg1rl commentedThe patch from #11 is not applying cleanly the latest version for 7.x. I really must have this feature. Any updates?
Comment #14
szeidler commented@13g33kg1rl: Use the -dev version of the module. There the patch applies cleanly and works like charm.
As far as I can see, it shouldn't break the existing rules. But it's wise to resave them, of course. When "Reply-To" is empty, it should be simply ignored.
Comment #15
solideogloria commentedI created a patch that allows any header to be added. The field lets you enter a valid JSON array, and it will be decoded and added to the message headers.
As an example, I used this to set the message's importance to "High":
{"X-Priority":"1 (Highest)","X-MSMail-Priority":"High","Importance":"High"}It might be good to add a watchdog message or error of some kind if the entered value isn't valid.