Raise an exception when attachments are added after `mail` was called.

Closes #16163

Adding attachments after a call to `mail` will result in invalid emails.
This is related to the fact, that `mail` is making the required preparations
before the email is ready to be sent. These change depending on your
added attachments.