Search code examples
bashshellcommand-linegmailubuntu-18.04

Bash Script 'noname' attachments gmail when using uuencode and mailx?


I need to encrypt and send files through scripts. When I use uuencode to send an email, I always get a noname file with myfile?

`\#!/bin/sh 

TEMP_FILE1=my_file.csv 
TEMP_FILE2=my_file.csv.zip 
TEMP_FILE3=text_body.txt 
Command 
cd /part_file 
zip -P passw0rd my_file.csv.zip my_file.csv 
to="[email protected]" 
(uuencode $TEMP_FILE2 $TEMP_FILE2 ; cat "$TEMP_FILE3" ) | mailx -s 'Subject' -r "[email protected]" "$to"`

Please review my script and help find a solution.

Thank.


Solution

  • i fixed it.

    i stop using uuencode and fixed mailx -mime