|
|
|
@ -159,6 +159,34 @@ class Notification extends Model |
|
|
|
|
//Send notification right now! |
|
|
|
|
case self::NOTIFY_MESSAGE_AT_ONCE: |
|
|
|
|
case self::NOTIFY_INVITATION_AT_ONCE: |
|
|
|
|
$name = api_get_person_name($user_info['firstname'], $user_info['lastname']); |
|
|
|
|
$mail= api_get_setting('noreply_email_address'); |
|
|
|
|
if (!empty($mail)) { |
|
|
|
|
$extra_headers = array(); |
|
|
|
|
$extra_headers['reply_to']['mail'] = $mail; |
|
|
|
|
$extra_headers['reply_to']['name'] = $this->admin_name; |
|
|
|
|
api_mail_html( |
|
|
|
|
$name, |
|
|
|
|
$user_info['mail'], |
|
|
|
|
Security::filter_terms($title), |
|
|
|
|
Security::filter_terms($content), |
|
|
|
|
$this->admin_name, |
|
|
|
|
$mail, |
|
|
|
|
$extra_headers |
|
|
|
|
); |
|
|
|
|
} else { |
|
|
|
|
echo "ed2"; |
|
|
|
|
api_mail_html( |
|
|
|
|
$name, |
|
|
|
|
$user_info['mail'], |
|
|
|
|
Security::filter_terms($title), |
|
|
|
|
Security::filter_terms($content), |
|
|
|
|
$this->admin_name, |
|
|
|
|
$this->admin_email |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Saving the notification to be sent some day. |
|
|
|
|
case self::NOTIFY_GROUP_AT_ONCE: |
|
|
|
|
if (!empty($user_info['mail'])) { |
|
|
|
|
$name = api_get_person_name($user_info['firstname'], $user_info['lastname']); |
|
|
|
|