+/**
+ * Send an email to confirm a user's control of an email address
+ *
+ * @param User $user User claiming the email address
+ * @param string $code Confirmation code
+ * @param string $nickname Nickname of user
+ * @param string $address email address to confirm
+ *
+ * @see common_confirmation_code()
+ *
+ * @return success flag
+ */
+
+function mail_confirm_address($user, $code, $nickname, $address)
+{
+ $subject = _('Email address confirmation');
+
+ $body = sprintf(_("Hey, %s.\n\n".
+ "Someone just entered this email address on %s.\n\n" .
+ "If it was you, and you want to confirm your entry, ".
+ "use the URL below:\n\n\t%s\n\n" .
+ "If not, just ignore this message.\n\n".
+ "Thanks for your time, \n%s\n"),
+ $nickname, common_config('site', 'name'),
+ common_local_url('confirmaddress', array('code' => $code)),
+ common_config('site', 'name'));
+ return mail_to_user($user, $subject, $body, $address);
+}
+
+/**
+ * notify a user of subscription by another user
+ *
+ * This is just a wrapper around the profile-based version.
+ *
+ * @param User $listenee user who is being subscribed to
+ * @param User $listener user who is subscribing
+ *
+ * @see mail_subscribe_notify_profile()
+ *
+ * @return void
+ */
+
+function mail_subscribe_notify($listenee, $listener)
+{
+ $other = $listener->getProfile();
+ mail_subscribe_notify_profile($listenee, $other);