how to change sender in contact.php

noman posted 20th of June 2008 in Community Voice. 0 comments.

I would like to change contact.php so that the email I receive has the form's sender's email as being sender of the message and not the site's email address. Sometimes email from the form is lost since we think it's email from us that we've Cc'd our site email on. I hope this makes sense; it's late :)


I think this is the area of contact.php that needs tweaking but I can't seem to get it to work properly:

$sSenderName = process_db_input( $_POST['name'] );
$sSenderEmail = process_db_input( $_POST['email'] );
$sLetterSubject = process_db_input( $_POST['subject'] );
$sLetterBody = process_db_input( $_POST['body'] );

$sLetterBody = $sLetterBody . "\r\n" . '============' . "\r\n" . _t('_from') . ' ' . $sSenderName . "\r\n" . 'with email ' . $sSenderEmail;

if( sendMail( $site['email'], $sLetterSubject, $sLetterBody ) )
{
$sActionText = _t_action('_ADM_PROFILE_SEND_MSG');
}
else
{
$sActionText = _t_err( '_Email sent failed' );
}
}

 
Comments
·Oldest
·Top
Please login to post a comment.
No comments so far.
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.
PET:0.046191930770874