Link to home
Start Free TrialLog in
Avatar of baadayakazi
baadayakazi

asked on

Changing FacileForms FROM email header to the email address in the submitted form

I'm using FacileForms (http://www.facileforms.biz) for contact forms on my joomla website. I would liike to configure it so that the 'from' header in the email I receive is the same email address the user inputs in the 'email address' field on the contact form. How would I do this and/or is there a better solution out there for Joomla?
ASKER CERTIFIED SOLUTION
Avatar of moracca
moracca

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of baadayakazi
baadayakazi

ASKER

I actually ran across another solution that works pretty well, but I don't understand enough PHP language to know how to format the "$Message" Part. I want the body of the email to include some text I add, and some text the user submits. For instance, I'd like it to say...

Comments: this is a comment the user submitted
Address: 123 My Lane
City: Raleigh
State: NC
Zip: 12345

How would I get it to include that information if I'm using the following...

// declare globals used in this piece
global $mosConfig_mailfrom, $mosConfig_fromname;

// include facile forms standard library
$this->execPieceByName('ff_InitLib');

$emailFrom = ff_getSubmit('Email'); // Your email address you can change this to
                                    // any email address such as:  
                                    // $emailFrom = 'somone@yahoo.com'

$fromName = ff_getSubmit('Name');     // Your name, used in the email address line

$emailTo = ff_getSubmit('Recipient');   // This line will use the form field textbox
                                    // called 'email' for the emial address.  You
                                    // could change it any email address such as:  
                                    // $emailTo = 'myself@yahoo.com

$subject = ff_getSubmit('subject');   //subject line for the email address

$message = 'Comments', ff_getSubmit('message');

// Sendmail function header
// function sendMail($from, $fromname, $recipient, $subject, $body,
//               $attachment = NULL, $html = NULL, $cc = NULL, $bcc = NULL)

$this->sendMail(
    $emailFrom,          
    $fromName,
    $emailTo,                          
    $subject,  
    $message
);