Fixing email sending problem

Fixing minor glitches and email sending problem. Plugin received wrong
context and couldn’t get data from database so there were no email
addresses added to email.