Grabbing email address as the 'mail from' address

Ask your feature Requests about CKforms component

Grabbing email address as the 'mail from' address

Postby rgreencaye » Mon Jun 14, 2010 10:16 pm

I'd like to vote for making CKForms capable of grabbing the person's email addres who is filling out the form and putting it into the Mail From field. That way the person receiving the form can simply hit 'reply' to answer the sender's questions. As it stands now, you have to create a new message for the replay and fill in the person's email address manually.

I've seen a work around on this by editing the PHP code, but that means each time an update is installed, the editing has to be done all over again.

BTW, thanks for a great from component!

Randy
rgreencaye
 
Posts: 1
Joined: Mon Jun 14, 2010 7:14 pm
Top

Re: Grabbing email address as the 'mail from' address

Postby stephanb » Fri Aug 13, 2010 8:11 am

Hope my english is good enough - and my answer matches with you question.. :oops:

:idea:
components\com_ckforms\models\ckforms.php

two new lines bevor "$mail->setSender( array(.." :
$ck_user =& JFactory::getUser();
$ck_mail = $ck_user->email;


change line "$mail->setSender( array(.." :
$mail->setSender( array( $ck_mail /*$ckform->emailfrom*/, "" ) );


I have used it in a form for registered Users.
So the Recepient gets the E-Mail-Adress of the Sender in the E-Mail-Line "From:"


Off topic:
I have no idea, how to hack - that just the filled fields will be showed in the E-Mail.
e.g. there are 50 items to order -> in the submitt-e-mail are just the items listed, where I made the cross/text/..
stephanb
 
Posts: 3
Joined: Fri Aug 13, 2010 7:44 am
Top

Re: Grabbing email address as the 'mail from' address

Postby justix » Fri Nov 05, 2010 12:19 pm

stephanb wrote:Hope my english is good enough - and my answer matches with you question.. :oops:

:idea:
components\com_ckforms\models\ckforms.php

two new lines bevor "$mail->setSender( array(.." :
$ck_user =& JFactory::getUser();
$ck_mail = $ck_user->email;


change line "$mail->setSender( array(.." :
$mail->setSender( array( $ck_mail /*$ckform->emailfrom*/, "" ) );


I have used it in a form for registered Users.
So the Recepient gets the E-Mail-Adress of the Sender in the E-Mail-Line "From:"


Off topic:
I have no idea, how to hack - that just the filled fields will be showed in the E-Mail.
e.g. there are 50 items to order -> in the submitt-e-mail are just the items listed, where I made the cross/text/..


Hi stephan, Glad to have found your little hack, but in ckforms.php there are 2 $mail->setSender( array strings and I don't think I actually got your Tip:

DO I need to add these 2 lines Under the first String from you mentioned so that

$mail->setSender( array( $ckform->emailfrom, "" ) );
$mail->setSubject( $ckform->subject );
$mail->setBody( $mailBody );

BECOME

$mail->setSender( array( $ckform->emailfrom, "" ) );
$mail->setSubject( $ckform->subject );
$mail->setBody( $mailBody );
$ck_user =& JFactory::getUser();
$ck_mail = $ck_user->email;

AND

$mail->setSender( array( $ckform->emailfrom, "" ) );
$mail->setSubject( $ckform->emailreceiptsubject );
$mail->setBody( $mailBody );
BECOME

$mail->setSender( array( $ck_mail /*$ckform->emailfrom*/, "" ) );

:?::?:Relly need this change badly ; ) Thanks
justix
 
Posts: 2
Joined: Fri Nov 05, 2010 12:14 pm
Top

Re: Grabbing email address as the 'mail from' address

Postby jadelicosner89 » Fri Nov 12, 2010 9:20 am

hmm had a really nice time here.. reading your posts is just so productive to me.. :mrgreen:
web directory | mobile | tech |
jadelicosner89
 
Posts: 1
Joined: Fri Nov 12, 2010 6:52 am
Top


Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 1 guest