Contact Form - Change "From" E-Mail

Permalink
Hey guys,
I integrated a contact form in my C5 site - nothing special, just the basic C5 contact form and told C5 to send me an E-Mail whenever the form get's submitted. This works fine, but the E-Mail Adress sending me these mails looks like this "no-reply@domain.com" and I would love to be able to answer directly to the E-Mail of whom dropped me a line.

Is there a chance to make the "From"-Adress of those E-Mails the Adress of the "E-Mail Adress"-Input-Field?

 
madeforspace replied on at Permalink Reply
madeforspace
mlmedia replied on at Permalink Reply
Thanks for the link! I found it by myself but can't figure out what to change - pretty sure this solution is based on a older version of C5, my code in this area looks like:

$mh = Loader::helper('mail');
            $mh->to( $this->recipientEmail ); 
            $mh->from( $formFormEmailAddress ); 
            $mh->replyto( $replyToEmailAddress ); 
            $mh->addParameter('formName', $this->surveyName);
            $mh->addParameter('questionSetId', $this->questionSetId);
            $mh->addParameter('questionAnswerPairs', $questionAnswerPairs); 
            $mh->load('block_form_submission');
            $mh->setSubject(t('%s Anfrage des Kontaktformulars ', $this->surveyName));
            //echo $mh->body.'<br>';
            @$mh->sendMail();
mlmedia replied on at Permalink Best Answer Reply
Related to this post:http://www.concrete5.org/community/forums/usage/change-concrete5-no...

Just go to your /config/site.php and add a line like this:

define('EMAIL_DEFAULT_FROM_ADDRESS', 'nameit@domain.tld');
mlmedia replied on at Permalink Reply
yet it would be interesting how you could manage to make the "From"-line equal the address entered in the form...

This website stores cookies on your computer. These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media. To find out more about the cookies we use, see our Privacy Policy.