}
function mail_subscribe_notify($listenee, $listener) {
+ $other = $listener->getProfile();
+ mail_subscribe_notify_profile($listenee, $other);
+}
+
+function mail_subscribe_notify_profile($listenee, $other) {
if ($listenee->email && $listenee->emailnotifysub) {
$profile = $listenee->getProfile();
- $other = $listener->getProfile();
$name = $profile->getBestName();
$long_name = ($other->fullname) ? ($other->fullname . ' (' . $other->nickname . ')') : $other->nickname;
$recipients = $listenee->email;
}
}
}
+
+ return true;
}
function mail_send_sms_notice($notice, $user) {
common_log(LOG_INFO, "Sending notice " . $notice->id . " to " . $user->smsemail, __FILE__);
$headers = array();
- $headers['From'] = $user->incomingemail;
+ $headers['From'] = (isset($user->incomingemail)) ? $user->incomingemail : mail_notify_from();
$headers['To'] = $to;
$headers['Subject'] = sprintf(_('%s status'),
$other->getBestName());