added logging for bulk emails and handling for text data type in ticket functions