Made the EmailComposerWithAttachment plugman compatible

- 2 first patches make the EmailComposerWithAttachment plugman compatible
- 3rd patch fixes a bug when the plugin method is called without a callback.