HomeUnityBlogs
 
 
noman

how to change sender in contact.php

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' );
}
}

bad
0
good
 
 

Comments

No comments so far.


Post a Comment

Please login to post a comment.

This Post
 
 
noman Blog
All Blogs
Found a bug? Have a suggestion? We really value your feedback!
 
© 2008 BoonEx Ltd
ABN 27 127 966 581
 
PET:0.353724002838