Yes, using a temporary email address is perfectly legal. It safeguards your inbox from unwanted spam, ads, and phishing emails. Throwaway emails also come in handy when signing up for online services you will probably only use once, or you don’t trust.