Would some one help me with this to send a file as attachment in a mail using a script without uuencode...
I am working on AIX 6.1, the thing is I dont have uuencode available... Is there any other alternate possible way to send file attachment with the mail without using uuencode or without having to install any tools..
Please suggest and also how to...
I have gone thro' the other posts in the forum, however cudn get one relatively matching this ... Pls advise...
HI Kamaraj...thanks for your response.. however it didn help much.. when i try out based on the second link which u ve provided the content still gets as text in mail not as attachment.. cud u pls let me know on this.. however the other two doesn help on my environment as the requirements to run those are not available... like mutt and metasend, getmimetype arent available.. Is there any other possibility..
This is script i tried now..givin me the content of the file in email rather than attachment***********
#!/bin/ksh
#
if you have absolutely none of the above commands, and you can't install one of them, you could try a different way,
copy your file to a network share within the script (scp/ftp/locally mounted cifs/nfs share), and send a link with your mail
You should consider installing mutt. It is quite easy to do and use. I am far from being an expert, but was able to install it and have incorporated it into my scripts to send attachments. Good luck.
You should be able to write an equivalent to uuencode using "iconv" with a destination character set of "uucode".
Then just add the header and trailer:
begin 644 attachment.txt
encodedtext
encodedtext
encodedtext
`
end
Dear Methyl,
Due to process and time delay constraints, we are looking to solve the issue asap with other alternate way using available commands/scripts...
Meanwhile Methyl would you please explain about the "iconv" usage in getting the file attached the mail using mailx.. and also i checked and uucode is also not available..Would be of a great help..
Methyl I also tried out the below sampling.. I received the email still with the file content in the body of the message rather than attachment...
I ve not used perl before and I donot have any idea about perl scripting.
So for this case would be possible for u to lemme know with a sample perl script.. the links u had posted were helpful really, however i couldn figure how to customize it for my requirement.. would it be possible for u to help..
The requirement is to send a flat file as text file as an attachment in a mail to the recipients...
In this context, uucode is the name of a character set. It is the character set conversion used by uuencode and uudecode .
Coincidentally there is a an AIX unix command called uucode but it has nothing to do with data conversion.
The syntax for iconv is in man iconv . There is extensive background information about the various converters on the IBM website. Help - AIX 6.1 Information Center and search for iconv .