It works. The essence of a contract is "the expression of intention of both parties to reach an agreement". The contract can be oral or written, as long as you can prove that you have reached an agreement, but oral contracts are more difficult to prove. In addition, it should be noted that some contracts must be signed in writing according to the law, and even have to be filed by the legal authorities, which is another matter.
In your case, e-mail can prove the agreement between you. This is a written contract. Because written contracts include traditional paper contracts as well as e-mails. And now the civil procedure law stipulates that electronic evidence such as mail is valid.
You should pay attention to keep the mail and notarize it directly if necessary. Sending a lawyer's letter and suing can be used as your means of safeguarding rights.