Using uuencode to email a file with a .out extension
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Using uuencode to email a file with a .out extension
Hi,
I am trying to use uuencode to send an email with an attachment that has a .out extension. When I first coded my program I was using a different extension, and it was working; however, when I switched to using a .out file, it stopped working. Can anyone tell me why this may be happening?
Also, I know I could use Email:MIME or MIME:LITE; however, I can't download it(or any type of modules) to the unix server I am using so I have resorted to using uuencode, but if there is another command that I could use to send an email with an attachment, please let me know!!!
Hi,
I am trying to use uuencode to send an email with an attachment that has a .out extension. When I first coded my program I was using a different extension, and it was working; however, when I switched to using a .out file, it stopped working. Can anyone tell me why this may be happening?
Also, I know I could use Email:MIME or MIME:LITE; however, I can't download it(or any type of modules) to the unix server I am using so I have resorted to using uuencode, but if there is another command that I could use to send an email with an attachment, please let me know!!!
No idea, since you don't give us any real details. Things like version/distro of Linux, what program you're using to send the email, what language you coded your program in, what error(s)/message(s) you see, etc.
Judging from the Email::MIME, I'll assume you're using Perl. And you say it was working when you had a different extension....so, why not just change the extension to what WAS working??? Rename the file?
I can't change the extension because I don't have privileges to change the file being emailed. Also, I'm using Solaris 5.10, and because I don't upkeep the server, I can't simply download a newer version. Also, I tried using Perl, but found it easier if I simply ran it by invoking csh.
I'm not getting an error, it acts like it runs, but it never sends anything. When I was using a test file with a different extension (something other than .out) it would send the email so I know the script works. I just think that uuencode doesn't like attaching a .out file so I'm trying to figure out why and if there is anything else that I could use instead of uuencode.
I'm not getting an error, it acts like it runs, but it never sends anything. When I was using a test file with a different extension (something other than .out) it would send the email so I know the script works. I just think that uuencode doesn't like attaching a .out file so I'm trying to figure out why and if there is anything else that I could use instead of uuencode.
It may have nothing to do with uuencode. Chances are, the extension itself may be blocked by a mail server further upstream at your company. Again, test this by just renaming the file to something else. And have you tried to run the command from the command-line, to see what it does? Have you checked with any of the administrators, to see if things are getting logged, that will give you some ideas?
Also, when you script, you really should put full paths in, to make sure things are working correctly. Instead of:
And the way you have this posted, you do realize that you'll probably overwrite the file, right?? Read the man page on uuencode, but normally it's "uuencode file1.out -o newfilename.out". You also say you're using mailx...so why even bother with uuencode? Again, read the man page on the mailx command, and use the -a flag to attach a file.
Most importantly...has that script EVER worked for you?? And do you normally use csh instead of bash?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.