The typical problem. You have to do a repetitive task and you bless UNIX and its shells. But sometimes you wonder how to do it. This time, I had to write a bunch of emails to a set of email addresses. So far, so good. Solaris and many other UNIX flavors have utilities such as mail and mailx which Full Article…
Korn Shell code to send attachments with mailx and uuencode?
I need to attach a file with mailx but at the moment I’m not having a lot of success. Here’s my code: subject=”Something happened” to=”somebody@somewhere.com” body=”Attachment Test” attachment=/path/to/somefile.csv uuencode $attachment | mailx -s “$subject” “$to” << EOF The message is ready to be sent with the following file or link attachments: somefile.csv Note: To protect Full Article…
Attach a File to Message via Command Line
Here’s an example of an email attachment. # uuencode my_binaryfile1 | mailx -s “Email binary as attachment” esofthub@esofthub.com For multiple attachments, I use a mail client such as dtmail, Netscape or FireFox. But I’ve seen this done too. # uuencode my_binaryfile1 my_binaryfile2 | mailx -s “Email binary as attachment” esofthub@esofthub.com For NON-binary type files Please note the ~r (tilde command Full Article…