review mailer plugin

new version with review/change of Bluefox (thanks) and others small
modification.