While ‘letter’ is a countable noun (She sent me two letters last week), ‘mail’ is uncountable and therefore we can’t use ‘mails’. But can you write ’emails’?

Yes you can. ‘Emails’ is now standardly used.

The New York Times’ Ben Zimmer gives an excellent comprehensive answer here.