Added code Email message sending

Also added SQL script file for creating some indexes for better
performance.