added mail events before/after send
added test
doc fix
reverted $isValid for events.
end of line fix
line fix
Merge pull request #1683 from Ragazzo/mail_event

Mail events before/after