$confirmed: Whether or not the email address is confirmed
'EmailUser': Before sending email from one user to another.
-$to: address of receiving user
-$from: address of sending user
+$to: MailAddress object of receiving user
+$from: MailAddress object of sending user
$subject: subject of the mail
$text: text of the mail
+&$error: Out-param for an error
'EmailUserCC': Before sending the copy of the email to the author.
-$to: address of receiving user
-$from: address of sending user
+$to: MailAddress object of receiving user
+$from: MailAddress object of sending user
$subject: subject of the mail
$text: text of the mail
'EmailUserComplete': After sending email from one user to another.
-$to: address of receiving user
-$from: address of sending user
+$to: MailAddress object of receiving user
+$from: MailAddress object of sending user
$subject: subject of the mail
$text: text of the mail
if ( $data['CCMe'] && $to != $from ) {
$cc_subject = $context->msg( 'emailccsubject' )->rawParams(
$target->getName(), $subject )->text();
+
+ // target and sender are equal, because this is the CC for the sender
Hooks::run( 'EmailUserCC', array( &$from, &$from, &$cc_subject, &$text ) );
+
$ccStatus = UserMailer::send( $from, $from, $cc_subject, $text );
$status->merge( $ccStatus );
}