How to email the heads of a department asking about whether they accept applications from undergraduates from a different discipline?
There is nothing wrong with sending an email, but it should not be sent to the chair or head of the department. Instead, the relevant contact person is either:


the chair of the admissions committee, or
the head of the graduate studies program


Either of these officials in the department should be able to provide you with the requisite information. Sending it to the chair of the department is a waste of everybody's time.