Updated email-related imports
Cleanup
Fixed outdated function signature
Added option to include images as attachments. This allows compatibility with gmail's web UI and other MUAs that don't support inlined image data.