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.
Have now moved