Email "from:" field in contact form

Permalink
The default contact form works great but when the contents are emailed to me, the "from:" field is blank causing all kinds of grief with email filters. Is there a way to change it?

 
stlmz replied on at Permalink Reply
I have the same issue. I can't seem to find where to correct this.
Styves replied on at Permalink Reply
Styves
Is there someone who will help us?
Tony replied on at Permalink Reply
Tony
I don't really know what the best approach is for a permanent solution here, but I agree that it should have something in there. Maybe just to make the "from" address the same as the "to" address? Or maybe it could grab the domain name of the site, and make a fake email address like DoNotReply@YourDomain.com?

Anyway, for the time being here's how you can set it yourself.

Open up /concrete/blocks/form/controller.php, and scroll down to the action_submit_form() method, towards the end of that method you'll see the mail helper sendMail code. After the $mh->to(), insert $mh->from( 'DoNotReply@YourDomain.com' );

Hope that helps.
Remo replied on at Permalink Reply
Remo
wouldn't like to see an "auto-fake" generator. Not everyone (and every language) has a mail address "DoNotReply".

Having a field (on the block or somewhere in the dashboard) would be create though..