Add getBodyAsText function and use it for Logs

This prevents an empty body in the Logs if developers only use HTML templates in their mails.

If plain text is available, it will be used.
If plain text is not available, the HTML will be stripped and used.