Skip to content

Commit 5d177a4

Browse files
authored
Auto set Sender
1 parent 940a292 commit 5d177a4

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

manager/includes/document.parser.class.inc.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3602,8 +3602,10 @@ public function sendmail($params = array(), $msg = '', $files = array())
36023602
if (isset($p['from']) && strpos($p['from'], '<') !== false && substr($p['from'], -1) === '>') {
36033603
list($p['fromname'], $p['from']) = $this->mail->address_split($p['from']);
36043604
}
3605-
$this->mail->From = (!isset($p['from'])) ? $this->config['emailsender'] : $p['from'];
3606-
$this->mail->FromName = (!isset($p['fromname'])) ? $this->config['site_name'] : $p['fromname'];
3605+
$this->mail->setFrom(
3606+
isset($p['from']) ? $p['from'] : $this->config['emailsender'],
3607+
isset($p['fromname']) ? $p['fromname'] : $this->config['site_name']
3608+
);
36073609
$this->mail->Subject = (!isset($p['subject'])) ? $this->config['emailsubject'] : $p['subject'];
36083610
$this->mail->Body = $p['body'];
36093611
if (isset($p['type']) && $p['type'] == 'text') {

0 commit comments

Comments
 (0)