Hello,
We have checked out your Codes thoroughly and we are not really sure what is causing this error as everything appears to be fine. It is likely that your Server's SPAM Filtering might be deleting any suspected keywords from the Email Body and this is why you might be receiving empty replies. We suggest you to setup Gmail SMTP for a while and see if you are still receiving Blank Emails. This should make things clearer. Please notify us more about what you see. Thanks for your Patience.
Meanwhile, do let us know if we can help you with anything else or if you find any further issues with Canvas.