Skip to content

Commit

Permalink
MDL-13572 do not send messages to invalid addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Jan 2, 2012
1 parent ea5534f commit f88a9ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion message/lib.php
Expand Up @@ -996,7 +996,7 @@ function message_post_message($userfrom, $userto, $message, $format, $messagetyp
$messagehtml = NULL;
}

if (!empty($preference->message_emailaddress)) {
if (!empty($preference->message_emailaddress) and validate_email($preference->message_emailaddress)) {
$userto->email = $preference->message_emailaddress; // Use custom messaging address
}

Expand Down

0 comments on commit f88a9ef

Please sign in to comment.