uuencode source_file.txt attached_file.txt | mailx -m -r sender@address -s "attachment test" recipient@address
The -m option does not add MIME header lines to the email and so allows the attachment to go through without its guts being ripped out my the SMTP relay agent.