Skip to content
Browse files

MDL-13572 do not send messages to invalid addresses

  • Loading branch information...
1 parent ea5534f commit f88a9ef3fb3fdd2a796a8ff4471fc8c6e9093b78 @skodak skodak committed Jan 2, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 message/lib.php
View
2 message/lib.php
@@ -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
}

0 comments on commit f88a9ef

Please sign in to comment.
Something went wrong with that request. Please try again.