How to send a file in text mode with mail as an attachment 2004-04-23 15:18 pm Author: The author is from: Linux knowledge base http://www.douzhe.com/docs/linux/Contact: unknown Q: linux How to send a message with an attachment? A: If you can use X Window, you can use the Netscape's Mail, you can also use Kmail, if any. If these two cannot be used, you can use the mail command. If you can confirm that your mail server supports 8-bit's bytes, you can use the CAT | Mail , but many mail servers do not support 8-bit bytes, so it is best to use the uuencode command. First write mail, such as called Mymail, then uuencode >> mymail or cat | UUENCODE >> mymail then edit your Mymail file, in front Write the text of the letter. Then send it. After receiving the letter, copy the part of Mymail in the letter to the THEMAIL.UUE. If the other party is under Windows, you can use WinZip 7.0 to decompress an attachment. If the other party is under Linux, you can restore: uudecode -o Themail.uue Cat | mail If there are multiple files to process, then repeat the above steps, but This will be processed separately after receiving the message. Of course, the compression will get a better effect, so that the message length will be greatly reduced. The attachment file name is the name of the compressed file. Boss, this is not very troublesome, there is no such mail -s hello -xx /tmp/ss.exe ddd@21.com does not use Pine, very simple. General redhat takes .way1: uuencode file1 file1 | mail - S "title" mail @ addressway2: mutt -s "title" -A / div / file1 mail @ address's method 2 will start the editor to write the text, you can also edit the message content, mailcontent.txt # cat mailcontent. TXT | MUTT -S "Title" -a attachfile1 mail @ address will not start the editor. Way1: uuencode file1 file1 | mail -s "title" mail @ address doesn't have a react after performing this command, Way2: mutt -s "title" -A / DIR / FILE1 mail @ Address system does not have Mutt this stuff, My is BSD4.7uuencode file1 file1 | mail -s "asdf" ma@ASDF.COM did not respond? Is your file1 too big? How long is the code? I also learned there from people, and successfully sent a letter. The second need to install MUTT, there is a very good software in Ports, I have been using.