Hi there @jerry, @gsussman, and @sbandyopadhyay,
Recently I've been tackling the same problem you guys have solved with the Webform Reply To module, and I wanted to see if you were interested in helping integrate the functionality of Webform Reply-To directly into the Webform project.
To help prevent overwhelming users, I'd like to make a global setting in admin/settings/webform that looks sort of like this:
From address:
[ ]
From name:
[ ]
[x] Customize Reply-To instead of From address (recommended)
Reply-to address:
[ ]
Reply-to name:
[ ]
Obviously we'd need some description text on that new checkbox, but it's behavior would make it so that the "From address" and "From name" were actually used for the "From" header in in *all* e-mails sent by Webform. The fields for From address and name would not show up on the node form. Instead, users would customize the Reply-to address and name.
This approach has the following advantages:
- We don't need to write an update hook or change the database schema, since we can re-use the existing columns for from_name and from_address.
- Existing users can at any time toggle the option on or off.
- Users don't need to be presented with any new options.
- Most users aren't aware of the difference between Reply-to and From and wouldn't know how to handle new options anyway.
But it has downsides:
- Users who understood the difference between From and Reply-to would not be able to customize the From address when actually appropriate.
- All e-mail sent if this option was enabled would appear to be from the same address in most mail clients, since mail clients always show the "From" address.
What do you guys think?
Comments
Comment #1
jerry commentedSpeaking only for myself: I generally think this would be a good thing. The only aspect that gives me pause is this:
In my own use of Webform, I rarely use anything but the primary site E-mail as the From address, so this presents no difficulty. There may well be other use cases for Webform E-mail in which varying the From address is useful; perhaps you have a better sense of that than I do. If you don't foresee it being problematic, I have no personal objection. I'd like to hear what the other maintainers think about this.
Comment #2
quicksketchYeah, I'm looking deeper into it now and trying to weigh all the sides. The truth is since Webform was originally written, spam has become a much bigger problem; though it's effectively covered up by better filtering. Unfortunately it's really the filtering that's hurting us now. Gmail essentially immediately discards e-mails that don't pass SPF rules, which can happen any time you send an e-mail through Webform from one domain, say example1.com, while claiming the "From" address was at example2.com.
Checking out services that send e-mails, it looks like using Reply-to is pretty common, due to the difficulties with spoofing the From header. In any case, I think Webform needs to address these issues somehow, even if it's not the exact method I proposed above.
Comment #3
sbandyopadhyay commentedNathan, it would be great to integrate this feature into Webform. I know what you mean, the painful Gmail spam filters were the original inspiration for me to write this module.
A few thoughts:
I don't think Reply-to name has any meaning. I suppose it's the difference between
Reply-to: "John Doe" <john.doe@example.com>vs.Reply-to: john.doe@example.com, but does this difference actually ever matter? I imagine that every single Email client treats these two cases identically.I absolutely agree with you Nathan, but just since ignorance is bliss doesn't mean it's preferable. :) Sweeping this feature under the rug for only advanced users to find is, I think, a disservice to the less advanced users. All users should be aware -- or be made aware -- of the difference, since Gmail's spam filters are becoming such a big issue. Using Webform without setting a Reply-to is practically dooming the email to Gmail's spam folder. Except for folks running Drupal on a corporate intranet, this will be a huge issue.
Besides, I would imagine that most folks who are editing webforms are developers, and we can expect developers to know (or learn) the difference between From and Reply-to. And for those who aren't developers, some contextual documentation (see my example below) might help.
Like Jerry, I have always used the site email address (usually "no-reply@example.com") as the From address. But I can conceive of a use-case where this won't hold:
Imagine that you have two webforms: contact-a-sales-person and report-a-bug. You want to set up a rule in Microsoft Outlook that filters the contact requests into different folders. Let's say the Subject is being set dynamically from a form field, so I think that leaves only the From address as being differentiable between the two forms.
I think this is a marginal use-case, but it's what Webform currently lets you do with ease. Nathan, do you want to make this impossible? Like Jerry, I wouldn't mind... so I think it's your decision.
This would be very problematic for me. A lot of the websites I make are for non-techy clients who need to be contacted. I've found that their action in response to a contact request depends on who/what they see the email is from.
In order to minimize our clients' confusion, we would really want to have the From name be dynamically set.
In conclusion:
Can I propose the following?
Feel free to take this apart. :)
Comment #4
sbandyopadhyay commentedMy suggestion has the following downsides:
1) A change to the database schema would be needed, albeit one that adds just a single new field.
2) Users (including existing users) will see a new option, albeit one that will be defaulted to "Default: no Reply-to address".
3) Users who aren't aware of the difference would have to learn it.
The positives:
1) Existing users can toggle the option on/off (by keeping it at "Default" or changing it to something else).
2) Users can customize both the From and the Reply-to addresses.
3) Inexperienced users will be guided to the "right" configurations. Experienced users will continue to customize configurations as they see fit.
4) Nothing is globally set for the whole site, instead the Reply-to is configurable per node.
Comment #5
ifux commentedHi guys,
is there any progress on this attempt!?
Thanks
ifux
Comment #6
rcross commentedany chance this is being incorporated in the 4.x version of webform?
Comment #7
quicksketchThere's a matching issue for this in the Webform queue at #2236237: Use Reply-To instead of From e-mail headers (Google/Yahoo/etc anti-spoofing policy marks e-mails as spam). It's similar to @sbandyopadhyay's proposal, but its an automatic site-wide behavior instead of adding more fields to the node form.
Sorry I didn't answer this question more promptly; since it's not in a module I maintain I didn't see the updates.
Comment #8
jerry commentedComment #9
danchadwick commentedI've proposed a simple one-checkbox solution in #2236237: Use Reply-To instead of From e-mail headers (Google/Yahoo/etc anti-spoofing policy marks e-mails as spam). If @jerry is willing to create a patch for webform, that would be great.
Comment #10
deggertsen commentedThis is fixed due to commit 4e544c7. A new release with this commit as part of it was released today (2015-Feb-16). It appears that this module may no longer be necessary! The patch still needs to be ported to d8, but for d7 it appears this is fixed as soon as you upgrade to webform 7.x-4.3.
Comment #11
deggertsen commentedOh, note that you must go through each of your webforms and set the "E-mail from address" to the reply-to address and you must have the box in the webform settings for reply-to headers checked.
Comment #12
sah62 commentedI've tried this. If I put the email address of the form submitter in the "E-mail from address" the Reply-to: address in the received email is still the sender address for my site. Am I doing something wrong? I want the Reply-To: address to be the address of the form submitter.
Comment #13
danchadwick commented@sah63 - what version of webform are you using? Did you disable webform_reply_to?
Comment #14
sah62 commentedWebform 7.x-4.3. I'm not using webform_reply_to. Would screen shots help explain my settings?