added support for html email
fixed typos
merged changes from other machine