The following command can be used to attach files in the mail while sending it using 'mailx' command in UNIX OS.
uuencode command will convert the file into ASCII data. The 'sourcefilename' is the name of the file to be attached in th email. If the file name has to be different than the source file name then 'destfilename' can be specified as new file name.
uuencode sourcefilename destfilename | mailx -m -s "My attachment" mailid@server.com
uuencode command will convert the file into ASCII data. The 'sourcefilename' is the name of the file to be attached in th email. If the file name has to be different than the source file name then 'destfilename' can be specified as new file name.
No comments:
Post a Comment