Need to send attachment in Mail without using uuencode via script in AIX6.1 | Unix Linux Forums | AIX

  Go Back    


AIX AIX is IBM's industry-leading UNIX operating system that meets the demands of applications that businesses rely upon in today's marketplace.

Need to send attachment in Mail without using uuencode via script in AIX6.1

AIX


Tags
attachment, mail, mailx, uuencode

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 06-18-2012
msmadhan11 msmadhan11 is offline
Registered User
 
Join Date: Jun 2012
Last Activity: 19 June 2012, 12:05 PM EDT
Location: Bangalore
Posts: 5
Thanks: 5
Thanked 0 Times in 0 Posts
Java Need to send attachment in Mail without using uuencode via script in AIX6.1

Dear All,

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...
Sponsored Links
    #2  
Old 06-18-2012
itkamaraj's Avatar
itkamaraj itkamaraj is offline Forum Advisor  
^Kamaraj^
 
Join Date: Apr 2010
Last Activity: 14 November 2014, 7:56 AM EST
Posts: 3,059
Thanks: 33
Thanked 659 Times in 638 Posts
How to send attachment using "sendmail" command or without uuencode command

http://www.unix.com/unix-advanced-ex...-uuencode.html

http://www.shelldorado.com/scripts/cmds/sendfile.txt
The Following User Says Thank You to itkamaraj For This Useful Post:
msmadhan11 (06-18-2012)
Sponsored Links
    #3  
Old 06-18-2012
msmadhan11 msmadhan11 is offline
Registered User
 
Join Date: Jun 2012
Last Activity: 19 June 2012, 12:05 PM EDT
Location: Bangalore
Posts: 5
Thanks: 5
Thanked 0 Times in 0 Posts
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
#

( echo "to: receiver_email"
echo "from: sender_email"
echo "subject: sending file.txt"
echo "mime-version: 1.0"
echo "content-type: multipart/related; boundary=xxxRANDOMSTRINGxxx"
echo
echo "--xxxRANDOMSTRINGxxx"
echo "content-type: text/plain"
echo
echo "Body of the message goes here"
echo "Here is filer.txt for your viewing pleasure"
echo
echo "--xxxRANDOMSTRINGxxx"
echo "content-type: text/plain; name=file.txt"
echo "content-transfer-encoding: base64"
echo
openssl base64 < FILENAME ) | sendmail -t -i
*******************************************************************

Last edited by msmadhan11; 06-18-2012 at 04:03 AM.. Reason: Additional info..
    #4  
Old 06-18-2012
itkamaraj's Avatar
itkamaraj itkamaraj is offline Forum Advisor  
^Kamaraj^
 
Join Date: Apr 2010
Last Activity: 14 November 2014, 7:56 AM EST
Posts: 3,059
Thanks: 33
Thanked 659 Times in 638 Posts
do you have mutt ?
Sponsored Links
    #5  
Old 06-18-2012
msmadhan11 msmadhan11 is offline
Registered User
 
Join Date: Jun 2012
Last Activity: 19 June 2012, 12:05 PM EDT
Location: Bangalore
Posts: 5
Thanks: 5
Thanked 0 Times in 0 Posts
No mutt too isnt available...
Sponsored Links
    #6  
Old 06-18-2012
funksen funksen is offline Forum Advisor  
Registered User
 
Join Date: Nov 2006
Last Activity: 30 April 2014, 10:11 AM EDT
Location: Austria/Vienna
Posts: 675
Thanks: 21
Thanked 31 Times in 30 Posts
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
The Following User Says Thank You to funksen For This Useful Post:
msmadhan11 (06-18-2012)
Sponsored Links
    #7  
Old 06-18-2012
jyoung jyoung is offline
Registered User
 
Join Date: Nov 2001
Last Activity: 12 May 2014, 12:49 PM EDT
Location: Flint, MI
Posts: 262
Thanks: 0
Thanked 4 Times in 4 Posts
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.
The Following User Says Thank You to jyoung For This Useful Post:
msmadhan11 (06-18-2012)
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to send attachment without using uuencode ns64110 Shell Programming and Scripting 2 02-16-2012 12:27 AM
Send files as an attachment without uuencode HemaV Shell Programming and Scripting 18 06-28-2011 03:54 AM
send attachment without uuencode panchpan UNIX for Advanced & Expert Users 3 03-14-2008 10:08 AM
Script needed which will send a mail with attachment files Mar1006 Shell Programming and Scripting 4 11-24-2007 08:59 AM
Uuencode problem in mail attachment mvalonso UNIX for Dummies Questions & Answers 8 03-16-2006 01:38 PM



All times are GMT -4. The time now is 05:20 AM.