How is the mRNA transported out of the endoplasmic reticulum?
The proteins mediating the transport of mRNA out of the nucleus (nucleoplasm/karyoplasm) are called "karyopherins" and belong to the nuclear pore complex family.

Prior the creation of the final form of mRNA, various proteins are attached to the so called pre-mRNA and a mRNA-protein-complex is built (co-transcriptional). Some of these proteins carry factors for splicing and processing, later RNA-binding proteins are added. (RNA binding proteins such as $Npl3p$, $Gbp2p$ and $Hrb1p$ (serine/arginine-rich proteins) accompany mRNA out of the nucleus. )

After mRNA processing mRNA export is initiated by dephosphorylation of $Npl3p$, leading to binding of $Mex67$ (Saccharomyces c.), forming a complex that interacts with the nuclear pore complex.

That is the way mRNA is able to leave the nucleus.