If it needs to be plain text there shar command (shell archieve).
It was used to send text file attachments.
It was used to send text file attachments.
I remember telnet-based installers back in the early 1990s that used the pipe-to-sh truck along with shar archives to install things like IRC clients onto your workstation.