It is generally safe to open a spam email on your computer. Spam emails are generally filled with trackers, so your activity can be tracked when you open the email. To ensure your device is not harmed during this, don’t download any files attached to the email, and refrain from clicking on any links. Most email services also prevent images from being downloaded in such emails.