Simplified the code.

email module is very good.