Issue with opening the UNIX mailx attachments on iPhone/iOS

I have created a simple log file (abc.log) with Hello World, from my UNIX script. At the end of the script, I have attached the log to my email using uuencode & mailx command.

THe email was send successfully and opening on my desktop without any issues.

I have the email sync with my iPhone too. When I tried to open the same attachment (abc.log), it is opening and showing all junk data.

I made a try with BlackBerry 10 device, it is opening without any issues.

I am using AIX 7.1 and latest iOS.

Please suggest, if I can try any other way ?

Many modern mail clients have abandoned uuencode and only show base64 attachments.

Is there any thing I can do before attaching the file to mailx command, so that it can be readable ? or it is a limitation ?

mailx is not the problem it's uuencode. Check if your uuencode utility supports --base64.

Can you please let me know, how to check it ?

Does it print an error message when you run uuencode --base64 ?

 $ uuencode --base64
begin 622 --base64
 

This is what received, when I type in command line and it is waiting. I gave CTL+C after some time.

You would usually use uuencode in a pipe with other commands or on a file with a redirect. What I think you have done it to execute it by itself on the command line, which will read from STDIN (usually the keyboard) and display on STDOUT (usually the screen)

Something more like this might help:-

(echo Hello ; uuencode --base64 attach_this.csv attached.csv) | mail my_email@my_provider.org

It's not complete and probably doesn't do what you want, but it's an example of what you should be thinking of.

I hope that this helps,
Robin

1 Like