mirror of
https://github.com/friendica/friendica
synced 2024-12-23 03:20:15 +00:00
use enotify to send CC mails
This commit is contained in:
parent
3d86f47bbd
commit
fca8a23265
1 changed files with 11 additions and 5 deletions
16
mod/item.php
16
mod/item.php
|
@ -872,14 +872,20 @@ function item_post(&$a) {
|
|||
} else {
|
||||
$subject = email_header_encode('[Friendica]' . ' ' . sprintf( t('%s posted an update.'),$a->user['username']),'UTF-8');
|
||||
}
|
||||
$headers = 'From: ' . email_header_encode($a->user['username'],'UTF-8') . ' <' . $a->user['email'] . '>' . "\n";
|
||||
$headers .= 'MIME-Version: 1.0' . "\n";
|
||||
$headers .= 'Content-Type: text/html; charset=UTF-8' . "\n";
|
||||
$headers .= 'Content-Transfer-Encoding: 8bit' . "\n\n";
|
||||
$link = '<a href="' . $a->get_baseurl() . '/profile/' . $a->user['nickname'] . '"><img src="' . $author['thumb'] . '" alt="' . $a->user['username'] . '" /></a><br /><br />';
|
||||
$html = prepare_body($datarray);
|
||||
$message = '<html><body>' . $link . $html . $disclaimer . '</body></html>';
|
||||
@mail($addr, $subject, $message, $headers);
|
||||
include_once('include/html2plain.php');
|
||||
$params = array (
|
||||
'fromName' => $a->user['username'],
|
||||
'fromEmail' => $a->user['email'],
|
||||
'toEmail' => $addr,
|
||||
'replyTo' => $a->user['email'],
|
||||
'messageSubject' => $subject,
|
||||
'htmlVersion' => $message,
|
||||
'textVersion' => html2plain($html.$disclaimer),
|
||||
);
|
||||
enotify::send($params);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue