From f3572aec7f159231ca2b63be1d2c5466a3ff7208 Mon Sep 17 00:00:00 2001 From: csarven Date: Sat, 15 Nov 2008 21:27:35 -0500 Subject: Nudge feature darcs-hash:20081116022735-eefa4-366f6deb85942f859ebd532e477b57737bcafbf8.gz --- lib/mail.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'lib/mail.php') diff --git a/lib/mail.php b/lib/mail.php index b96bc7161..a4764bfb5 100644 --- a/lib/mail.php +++ b/lib/mail.php @@ -232,6 +232,29 @@ function mail_confirm_sms($code, $nickname, $address) { mail_send($recipients, $headers, $body); } + +function mail_notify_nudge($from, $to) { + + $subject = sprintf(_('You\'ve been nudged by %s'), $from->nickname); + + $from_profile = $from->getProfile(); + + $body = sprintf(_("%1\$s (%2\$s) is wondering what you are up to these days and is inviting you to post some news.\n\n". + "You can reply to their message here:\n\n". + "%3\$s\n\n". + "Don't reply to this email; it won't get to them.\n\n". + "With kind regards,\n". + "%4\$s\n"), + $from_profile->getBestName(), + $from->nickname, + common_local_url('newmessage', array('to' => $from->id)), + common_config('site', 'name')); + + return mail_to_user($to, $subject, $body); +} + + + function mail_notify_message($message, $from=NULL, $to=NULL) { if (is_null($from)) { -- cgit v1.2.3-54-g00ecf