function mx_lostpassword($user) { if ($user->email) { $to = $user->fullname . ' <' . $user->email . '>'; $subj = _('Important Message from MusXpand'); $html = mx_showhtmlpagestr('lostpassword'); $html = str_replace('{CONFIRMCODE}', $user->confirmationcode, $html); $confirmurl = mx_actionurl('account', 'signin', 'confirmation') . '&c=' . $user->confirmationcode; $confirmlink = '<a href="' . $confirmurl . '">MusXpand</a>' . sprintf(_(' (link: %s)'), $confirmurl); $html = str_replace('{CONFIRMURL}', $confirmlink, $html); $siteurl = '<a href="' . mx_option('basicsiteurl') . '">MusXpand</a>'; $html = str_replace('{SITEURL}', $siteurl, $html); $html = str_replace('{SUPPORTEMAIL}', MXSUPPORTEMAIL, $html); mx_sendmail($to, $subj, mx_html2text($html), $html); } }
function notify($msg) { $receiver = $this->getuserinfo($msg->to); $to = $receiver->fullname . ' <' . $receiver->email . '>'; $subj = sprintf(_('You just received a new %s from %s'), $msg->flags & MXREQUEST ? _('request') : _('message'), $this->fullname ? $this->fullname : $this->artistname); if ($msg->flags & MXREQUEST) { $msgtype = ''; if ($msg->flags & MXFRIENDREQUEST) { $msgtype = 'friend '; } $msgtype .= 'request'; } else { $msgtype = "message"; } $html = mx_showhtmlpagestr('yougotmail'); $html = str_replace('{RECEIVER}', $receiver->firstname, $html); $html = str_replace('{MESSAGETYPE}', $msgtype, $html); $html = str_replace('{MESSAGE}', ($msg->subject ? '<b>' . $msg->subject . "</b><br/>" : '') . $msg->body, $html); $msgaction = mx_actionurl('account', 'messages', 'rp:' . $msg->msgid, $msg->flags & MXREQUEST ? 'requests' : 'inbox'); $html = str_replace('{MESSAGEACTION}', '<a href="' . $msgaction . '">MusXpand</a>', $html); $notifyurl = mx_actionurl('account', 'profile', '-', 'notifs'); $html = str_replace('{NOTIFYURL}', '<a href="' . $notifyurl . '">' . $notifyurl . '</a>', $html); $headers = 'From: MusXpand Notification <' . MXNOREPLYEMAIL . '>'; mx_sendmail($to, $subj, mx_html2text($html), $html); }