raise a sensible error when attachments are misconfigured