A better handling of attachments

The prior method did not function very well with HTML emails which also have attachments in them. The Mailgun API allows for these, so I've adjusted to include them.
Why not to move this import to the top of the module?