Do not serve us any intransparent values only labeled as 'default' but let us configure the default values ourselves in a central place.

For this we need fields in settings to define the default from addres, the displayed name for the from addres and a default subject.

CommentFileSizeAuthor
#1 webform.module_4.patch2.83 KBmiguel

Comments

miguel’s picture

Version: 5.x-1.x-dev » 5.x-1.2
Status: Active » Reviewed & tested by the community
StatusFileSize
new2.83 KB

Ok. I have done this work.

You can now:
- Define a default FROM emailaddress for all forms (site_email is used if no email is defined)
- Define a FROM Name which is displayed together with the Emailaddres: Master Foo
- Define a default Subject for all forms (the form title will be appended to it)

You see now:
- Instead of 'Default' the default From address is shown in in the individual form configuration (appended by [Default])
- Instead of 'Default' the default Subject is shown in the individual from configuration (appended by [Default])

I hope you like these changes.

miguel’s picture

The 'Master Foo' should have been an example with Name and the email in brackets like 'The Boss' in http://cr.yp.to/immhf/sender.html but drupal stripped it ;-(

quicksketch’s picture

Status: Reviewed & tested by the community » Fixed

Committed (with enhancements)!

Why stop at just default custom addresses? I applied the patch then continued to develop to allow separate "From name" and "From address" fields. That way you could have a Name, Email, and Subject fields all map to proper locations in the sent email.

The patch had quite a few problems though (formatting, spelling, even a php error!). It's quite rude to set your own patches RTBC. :D

Thanks again though. When people put forward patches I know they're serious. Thanks!

miguel’s picture

Thanks for your feedback and enhancing. Next time I'll better choose 'code needs review' ;-) I didn't have a php error on my installation. Maybe I did something wrong when creating the diff.

Anonymous’s picture

Status: Fixed » Closed (fixed)