Added detection to preview mails with attachments

Hi,

I did this patch to fix some issues that we were having to display emails with attachments. Hope you enjoy.

Thanks,
Augusto