Contents
How to send multiple attachments using Uuencode?
From http://linux.die.net/man/1/mailx: Attach the given file to the message. Then you don’t have to worry about the uuencode stuff. I believe you can add multiple -a options to send multiple attachments as well. Not sure which version this option appeared though (the servers at my new job don’t have it).
Can You Send attachments in / usr / sbin / Sendmail?
If you’re stuck with /usr/sbin/sendmail then you have a lot more to do. sendmail has no concept of attachments and treats email content as a flat US-ASCII text (see this answer for details). To send attachents with sendmail you’ll need to format your mail content as a MIME message.
How to send a MIME message with Sendmail?
To send attachents with sendmail you’ll need to format your mail content as a MIME message. For some examples, see this forum thread on unix.com. To get you on your way, here’s a quick untested example using bash.
Is there a standard for Uuencode in Bash?
Also, uuencode is not standard — there are several variants floating around, encoding and decoding things in different and incompatible ways, with no “standard” on which to base an implementation. Finally, uuencode does not generally work well in a pipe, although some variants have been modified to do so.
Do you need to use uuencode to use mailx?
No need to use uuencode The only trick is that for some reason mailx does not work if you put -a actual_file after the recipient email address. Note that using echo command makes sure that mailx will not ask you to enter subject and message body manually.
How to send mails with attachments using mailx?
Use the new attachment switch (-a) in mailx to send attachments with the mail. The -a options is easier to use that the uuencode command. The above command will print a new blank line.
How to send email attachment with different attachment name?
– Unix & Linux Stack Exchange How to send email attachment using mailx -a with a different attachment name? Could you please advice how this can be done using mailx -a? The only option seems to be to copy file with a different name, and then try.