Added automatic email detection