I am pretty sure that the problem is not when you look at the email - it is if you click on a link within the email.
Two things for avoiding viruses - never click on any link in any email, and never open an attachment unless you are expecting it, and know the person who is sending it.
If you unexpectedly get an email with an attachment which appears to come from someone you know, check back with them before you open it. Because someone might have got hold of their list of contacts, and be sending malware attached to emails that look as if they come from the person you know. It happened to a friend of mine, a few years back.