/// attachname - the name of the file (extension indicates MIME)
/// usetrueaddress - determines whether $from email address should be sent out.
/// Will be overruled by user profile setting for maildisplay
+///
+/// Returns "true" if mail was sent OK, "emailstop" if email was blocked by user
+/// and "false" if there was another sort of error.
global $CFG, $_SERVER;
}
if (!empty($user->emailstop)) {
- return false;
+ return 'emailstop';
}
$mail = new phpmailer;