LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 08-29-2013, 07:07 AM   #1
sras
Member
 
Registered: Jul 2013
Posts: 31

Rep: Reputation: Disabled
How attach a file using /usr/lib/sendmail


Hello Guys,

I am trying to attach a file while sending an email from the server (Solaris OS).

Getting the error "uuencode: not found"

Could you advise on this?

Using the command below in my script:

{
echo "SUBJECT:File Count"
echo "FROM:server name"
echo "TO:emailadd@test.com"
echo "Find attached file count"
uuencode /home/user/count_file.csv count_file.csv
} | /usr/lib/sendmail -t

thanks.
 
Old 08-29-2013, 07:11 AM   #2
sras
Member
 
Registered: Jul 2013
Posts: 31

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by sras View Post
Hello Guys,

I am trying to attach a file while sending an email from the server (Solaris OS).

Getting the error "uuencode: not found"

Could you advise on this?

Using the command below in my script:

{
echo "SUBJECT:File Count"
echo "FROM:server name"
echo "TO:emailadd@test.com"
echo "Find attached file count"
uuencode /home/user/count_file.csv count_file.csv
} | /usr/lib/sendmail -t

thanks.
Just looking for any other alternative command to attach a file..

thanks.
 
Old 08-29-2013, 10:50 AM   #3
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
Which version of Solaris you're using? You might not using full path of the command (it should be in /usr/bin/uuencode)? Can you check:
Code:
~$ which uuencode
~$ whereis uuencode
You can then try folllowing in your script:
Code:
/path/to/uuencode  /path/to/foo.txt<space>foo.txt | mailx -s "<subject>" abc@xyz.com
OR
/usr/bin/uuencode  /path/to/foo.txt<space>foo.txt | mailx -s "<subject>" abc@xyz.com
 
1 members found this post helpful.
Old 08-30-2013, 03:11 AM   #4
sras
Member
 
Registered: Jul 2013
Posts: 31

Original Poster
Rep: Reputation: Disabled
"uuencode" is not installed in the server.

Tried after installing it..it is working fine now.

thanks.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
OPENNMS INSTALLATION ERROR -install –disU –l /usr/lib/jni:/usr/lib ramecare Linux - Server 4 07-11-2011 12:06 PM
opennms installation error -install –disU –l /usr/lib/jni:/usr/lib ramecare Linux - Server 2 07-08-2011 10:51 AM
how to attach file in sendmail a7mlinux Linux - General 1 05-02-2009 11:31 AM
Nail looking for Sendmail in /usr/lib/sendmail Berhanie Slackware 2 02-22-2005 11:18 AM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 09:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration