Every person who is of sound mind and who has attained the age of 18 years can make a will. Persons who are deaf or blind can make a will provided they are able to know what they do by it. A person who is ordinarily mentally ill may make a will during an interval in which he is of sound mind. No person can make a will while he is in such a state of mind, whether arising from intoxication or from illness or from any other cause, that he does not know what he is doing.