Commit 6680bc96 by Scott

Merge pull request #407 from phy25/patch-4

Change from / reply-to for feedback form
parents 604746da 95185f79
......@@ -130,15 +130,18 @@
$mailer->From=$params['fromemail'];
$mailer->Sender=$params['fromemail'];
$mailer->FromName=$params['fromname'];
$mailer->AddAddress($params['toemail'], $params['toname']);
$mailer->addAddress($params['toemail'], $params['toname']);
if(!empty($params['replytoemail'])){
$mailer->addReplyTo($params['replytoemail'], $params['replytoname']);
}
$mailer->Subject=$params['subject'];
$mailer->Body=$params['body'];
if ($params['html'])
$mailer->IsHTML(true);
$mailer->isHTML(true);
if (qa_opt('smtp_active')) {
$mailer->IsSMTP();
$mailer->isSMTP();
$mailer->Host=qa_opt('smtp_address');
$mailer->Port=qa_opt('smtp_port');
......@@ -162,7 +165,7 @@
}
}
$send_status = $mailer->Send();
$send_status = $mailer->send();
if(!$send_status){
@error_log('PHP Question2Answer email send error: '.$mailer->ErrorInfo);
}
......
......@@ -89,8 +89,10 @@
);
if (qa_send_email(array(
'fromemail' => qa_email_validate(@$inemail) ? $inemail : qa_opt('from_email'),
'fromemail' => qa_opt('from_email'),
'fromname' => $inname,
'replytoemail' => qa_email_validate(@$inemail) ? $inemail : null,
'replytoname' => $inname,
'toemail' => qa_opt('feedback_email'),
'toname' => qa_opt('site_title'),
'subject' => qa_lang_sub('emails/feedback_subject', qa_opt('site_title')),
......@@ -182,4 +184,4 @@
/*
Omit PHP closing tag to help avoid accidental output
*/
\ No newline at end of file
*/
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment