Add job error validation to sendEmail. Remove isNewPlugin param and change the way pluginInfo decides if it is a new plugin.