altered mail_plugin

- added html + ip option
- updated query's to new query format