mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Fix no admin mail if author is anonymous
https://xetown.com/questions/1858634
This commit is contained in:
parent
bcc11f253a
commit
939c5d8160
2 changed files with 4 additions and 9 deletions
|
|
@ -839,7 +839,10 @@ class CommentController extends Comment
|
|||
}
|
||||
}
|
||||
|
||||
$this->sendEmailToAdminAfterInsertComment($obj);
|
||||
if (config('mail.default_from'))
|
||||
{
|
||||
$this->sendEmailToAdminAfterInsertComment($obj);
|
||||
}
|
||||
|
||||
$output->add('comment_srl', $obj->comment_srl);
|
||||
|
||||
|
|
@ -925,17 +928,11 @@ class CommentController extends Comment
|
|||
$oMail = new \Rhymix\Framework\Mail();
|
||||
$oMail->setSubject($mail_title);
|
||||
$oMail->setBody($mail_content);
|
||||
$oMail->setFrom(config('mail.default_from') ?: $member_info->email_address, $member_info->nick_name);
|
||||
if($member_info->email_address)
|
||||
{
|
||||
$oMail->setReplyTo($member_info->email_address);
|
||||
}
|
||||
foreach (array_map('trim', explode(',', $module_info->admin_mail)) as $email_address)
|
||||
{
|
||||
$oMail->addTo($email_address);
|
||||
}
|
||||
$oMail->send();
|
||||
// send email to all admins - STOP
|
||||
}
|
||||
|
||||
$comment_srl_list = array(0 => $obj->comment_srl);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue