The contents can be compressed and passed to the FM SO_NEW_DOCUMENT_ATT_SEND_API1 through the CONTENTS_HEX table. But this table accepts only binary values and hence the STRING has to be converted to BINARY. This can be achieved by converting STRING to XSTRING and then converting the XSTRING to BINARY by using the FMs 'SCMS_STRING_TO_XSTRING' and 'SCMS_XSTRING_TO_BINARY'.
See this doc..
To send a mail attachment with more than 255 characters in a line - Code Gallery - SCN Wiki