Functions as an mRNA export adapter; component of the transcription/export (TREX) complex which is thought to couple mRNA transcription, processing and nuclear export, and specifically associates with spliced mRNA and not with unspliced pre-mRNA (PubMed:15833825, PubMed:15998806, PubMed:17190602). TREX is recruited to spliced mRNAs by a transcription-independent mechanism, binds to mRNA upstream of the exon-junction complex (EJC) and is recruited in a splicing- and cap-dependent manner to a region near the 5' end of the mRNA where it functions in mRNA export to the cytoplasm via the TAP/NXF1 pathway (PubMed:15833825, PubMed:15998806, PubMed:17190602). Involved in the nuclear export of intronless mRNA; proposed to be recruited to intronless mRNA by ATP-bound DDX39B (PubMed:17984224). Plays a key role in mRNP recognition and mRNA packaging by bridging the mRNP-bound EJC and the TREX core complex (PubMed:37020021). TREX recruitment occurs via an interaction between ALYREF/THOC4 and the cap- binding protein NCBP1 (PubMed:15833825, PubMed:15998806, PubMed:17190602, PubMed:37020021). Required for TREX complex assembly and for linking DDX39B to the cap-binding complex (CBC) (PubMed:15998806, PubMed:17984224, PubMed:37020021). Binds mRNA which is thought to be transferred to the NXF1-NXT1 heterodimer for export (TAP/NXF1 pathway) (PubMed:11675789, PubMed:11707413, PubMed:11979277, PubMed:15833825, PubMed:15998806, PubMed:17190602, PubMed:18364396, PubMed:22144908, PubMed:22893130, PubMed:23222130, PubMed:25662211). In conjunction with THOC5 functions in NXF1-NXT1 mediated nuclear export of HSP70 mRNA; both proteins enhance the RNA binding activity of NXF1 and are required for NXF1 localization to the nuclear rim (PubMed:19165146). Involved in mRNA export of C5-methylcytosine (m5C)- containing mRNAs: specifically recognizes and binds m5C mRNAs and mediates their nucleo-cytoplasmic shuttling (PubMed:28418038). Acts as a chaperone and promotes the dimerization of transcription factors containing basic leucine zipper (bZIP) domains and thereby promotes transcriptional activation (PubMed:10488337). Involved in transcription elongation and genome stability (PubMed:12438613). {ECO:0000269|PubMed:10488337, ECO:0000269|PubMed:11675789, ECO:0000269|PubMed:11707413, ECO:0000269|PubMed:11979277, ECO:0000269|PubMed:12438613, ECO:0000269|PubMed:15833825, ECO:0000269|PubMed:15998806, ECO:0000269|PubMed:17190602, ECO:0000269|PubMed:17984224, ECO:0000269|PubMed:18364396, ECO:0000269|PubMed:19165146, ECO:0000269|PubMed:22144908, ECO:0000269|PubMed:22893130, ECO:0000269|PubMed:23222130, ECO:0000269|PubMed:25662211, ECO:0000269|PubMed:28418038, ECO:0000269|PubMed:37020021}. (Microbial infection) The TREX complex is essential for the export of Kaposi's sarcoma-associated herpesvirus (KSHV) intronless mRNAs and infectious virus production; ALYREF/THOC4 mediates the recruitment of the TREX complex to the intronless viral mRNA. . This is the function of ENSG00000183684 (ALYREF, Aly/REF export factor).