enhanced the code for implementing email functionality in meta_email