Fix inline attachments being broken when only sending an HTML text body.

The rel boundary was closed too early causing inline images to be
incorrectly included in the email message.

Refs #3474