3.0 Fix mail Exception

Fix for #4620 .