Need Help w/mailx - Sun Solaris


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Need Help w/mailx - Sun Solaris
# 1  
Old 10-13-2006
Need Help w/mailx - Sun Solaris

I have this Legato application which generates a file and then it pipes it to mailx.

cat << savelog.txt | mailx -s "Saverpt `date +"%c`" myemail@xxx.com

The "savelog.txt does get created and is owned by root and other group, but yet will not email using mailx to myemail@xxx.com.

Mailx emails me from "root" instead of the application user and only emails the "Subject Line" and not the text file. Can someone assist why this is happening.

When I am logged in as myself (userme) and run the script from the command line I get the email fromt userme@xxx.com and the contents of the file in the email. So what is different.

Last edited by gzs553; 10-13-2006 at 04:49 PM..
# 2  
Old 10-13-2006
I don't know why you're doing a cat << savelog.txt but remove the "<<"'s. Just use

Code:
cat savelog.txt | mailx -s "Saverpt `date +"%c`" myemail@xxx.com

or

Code:
mailx -s "Saverpt `date +"%c`" myemail@xxx.com < savelog.txt


Carl
# 3  
Old 10-13-2006
Th application is running a report and the output of the report is being catted to the savetext.log and then being mailed.

cat << pathname/savtext.log | mailx
# 4  
Old 10-13-2006
The savelog.txt{date} is dated, so It is immediately emailed.

Last edited by gzs553; 10-14-2006 at 11:02 AM.. Reason: Correct syntax
# 5  
Old 10-20-2006
my guess is you have a path problem ... when you run the script manually, you probably cd'd to the directory where the log file exists at ... however, the automated job probably does not know where the log file is and cannot redirect it to cat so it cannot send anything aside from the subject line ... confirm the path requirements and you should be okay ...
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Solaris

Solaris mailx Configuration

Hi, I need to send an output from Solaris to my email address. For example df -h to be sent out from the Solaris. I was wondering how to configure the mailx and smtp configuration to be setup. Has anyone setup before? Thanks. :confused::confused::confused: (0 Replies)
Discussion started by: freshmeat
0 Replies

2. Solaris

Configure mailx in Solaris 10

Hello, We are using exchange server in our environment. I need to configure mailx to send email from Solaris box to one mail I'd which is on exchange server. I know ip of exchange server.. Let me know where should I configure that ip to do the needful? (2 Replies)
Discussion started by: sureshsun
2 Replies

3. Solaris

Mailx help in Solaris

Hi Team, We are with Solaris 10. And presently we are sending mail using the tool mailx -s. Our requirement is we need to send amil with HIGHPRIORITY. SO is there any way to send the mail as HIGHPRIORITY. If not any alternative way instaead of using mailx. Thanks in advance. Regards Bala (7 Replies)
Discussion started by: balagj709
7 Replies

4. Solaris

Sun Solaris not able to ping Sun Solaris

I have a Sun Blade 2500 with SUN 5.9 OS installed. I can ping other machines(windowsXP/2003) from my SUN machines but not able to ping each other SUN machines which i have newly installed. (7 Replies)
Discussion started by: z_haseeb
7 Replies

5. Solaris

useful links and help resources for Sun's products and Sun's Solaris

Hi all, Those links might help anyone Knowledge base Video tutorials (0 Replies)
Discussion started by: h@foorsa.biz
0 Replies

6. Solaris

Sun Fire 280R Sun Solaris CRT/Monitor requirements

I am new to Sun. I brought Sun Fire 280R to practice UNIX. What are the requirements for the monitor/CRT? Will it burn out old non-Sun CRTs? Does it need LCD monitor? Thanks. (3 Replies)
Discussion started by: bramptonmt
3 Replies

7. UNIX for Dummies Questions & Answers

Sun Solaris 10: How do I create a bootup disc? The Sun website confuses me

Hey there, I am starting a Computer Science Foundation year at the end of this month and am trying to get a little bit ahead of the game. I have always wanted to learn Unix and am currently struggling with creating a boot disc to run Solaris (I have chosen to study this) from as opposed to... (0 Replies)
Discussion started by: Jupiter
0 Replies

8. Solaris

Sun Solaris Sun Java Desktop

Ok I a n00b, not gunna hide it so here goes - Sun Solaris, V.10 i386 - during the setup, I can choose a screen resolution that looks great with 65k colors and all. However, when all is said and done 4 disks and a reboot later, I get hanious 640x480 @ 256 only. If I choose the Sun Java Desktop... (20 Replies)
Discussion started by: Spooky
20 Replies

9. Shell Programming and Scripting

mailx command (Sun Solaris 8)

Hi, I would like to use mailx to send multiple files to one recipient whereas each file should be send as a separate email. mailx -s "Subject" email@user.de < file1 file2 file3 file4 If I use this command email@user.de will receive only file4. And: cat file* | mailx -s .... will combine... (2 Replies)
Discussion started by: cczerwin
2 Replies
Login or Register to Ask a Question