CMS & WordPress
I'm using the contact form module, but would like to alter the email output it generates by default.
For one, in the 'From' field it shows just the email address. So when I reply it says:
"email@example.com wrote on 08-08-12"
Instead I would like the From field to show the name of the sender (linked to his/her email address off course so I can reply to it). As a result, when I reply it would say for example:
"John Doe wrote on 08-08-12"
Second, the email sent starts with:
"John (firstname.lastname@example.org) sent a message using the contact form
How can I edit that default line? Or perhaps leave it out all together?
I've read you shouldn't edit the core module code. What do I have to do to make these two slight moficiations?
I don't know if it will give you all the flexibility you're looking for but I would use the webform module, disable Drupal's contact form and replace it with your own custom webform. You'll get a lot more flexibility on how you receive the results.
Tried that and although I like it and it is much more flexible there's one thing I don't like: it saves all email submissions in a Results table. For each email sent I really have no need for that, but there isn't an option to turn it off either. That submission results list contains no big files and it isn't a big problem since only I as admin can view it, but with each email sent that list will grow off course. Taking up more site space. So I have to periodically clear that list. There's nothing to do about that?
Well, each submission is in the database and I expect unless you get tens of thousands of them, you won't need to worry about them. One of the chief reasons I use the webform module is so that I have the records.
If it really is a big issue, there's a discussion about it here and at around post #90 there are some good leads: http://drupal.org/node/290448
Here's a temp module to prevent results from being stored based on the discussion: http://drupal.org/sandbox/jrockowitz/1439194
This topic is now archived. It is frozen and cannot be changed in any way.