In Thailand, there are 120 prisons, approximately. Each prison may have its own rules and regulations which are different from the other prisons.
It is true that some prisons allow inmates to contact other persons outside the prisons via email.
Nevertheless, each inmate is not allowed to use his or her personal email address. The inmate is required to use the central email address of the prison and the correspondence will be censored in order to be in accordance with public order, good morals and not be against the law.