/lib/email.php patch