Mailx help in Solaris


 
Thread Tools Search this Thread
Operating Systems Solaris Mailx help in Solaris
# 1  
Old 04-08-2013
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
# 2  
Old 04-08-2013
Use sendmail instead:
Code:
{
        echo "From: from@addr.com"
        echo "To: to@addr.com"
        echo "MIME-Version: 1.0"
        echo "Content-Type: text/plain"
        echo "Subject: Your Subject"
        echo "Importance:High"
        # Email body here
} | /usr/sbin/sendmail -t

This User Gave Thanks to Yoda For This Post:
# 3  
Old 04-08-2013
Hi Yoda,

Thanks for the reply, Is the mailx is not wothfull to send a mail as high priority.
Ok, Actually i am new to UNIX environment. can i run this script directly from the commnaline? Or need to place this code in sh?

Please update me.

Regards
Bala
# 4  
Old 04-08-2013
I would recommend to run it as a script.

Just make sure you run it as a group command { list; } like posted.

By the way I checked the SunOS mailx manual and I do not see any option that support this feature.
This User Gave Thanks to Yoda For This Post:
# 5  
Old 04-08-2013
ok. Thanks Yoda. There is any chance to run this multi lines in a single command line..

If there share me.

Thanks in advance
Bala
# 6  
Old 04-08-2013
Quote:
Originally Posted by balagj709
There is any chance to run this multi lines in a single command line..

If there share me.
Yes, put commands in single line separated by semi-colon ;
Code:
{ echo "To: to@addr.com";echo "MIME-Version: 1.0";echo "Content-Type: text/plain";echo "Subject: Subject";echo "Importance:High";echo "Hello"; } | /usr/sbin/sendmail -t

This User Gave Thanks to Yoda For This Post:
# 7  
Old 04-08-2013
Ok Yoda,

Will check and update the sam.

Thanks,

Regards
Bala
Login or Register to Ask a Question

Previous Thread | Next Thread

10 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. Red Hat

mailx on linux just like on solaris/HP

Hello Unix lovers, I want to know if I can have mailx on linux. I am using redhat 6. My sys admin says that mailx is not availble on linux. I see on my linux system mailx is just a link to /bin/Mail program. I want to install mailx just as it is availble on soaris/HP. When my sys... (4 Replies)
Discussion started by: shriashishpatil
4 Replies

4. Solaris

Solaris Mailx Problem.

I have 4 solaris servers with similar configuration and i configured mailx in all 4 servers. i have made necessery changes in /etc/mail/sendmail.cf. and i added the mail server entry in /etc/hosts file and it is working fine in 3 servers properly. but its not working in 1 server. Everything is fine... (3 Replies)
Discussion started by: sandeep.tk
3 Replies

5. Solaris

mailx on solaris - How to add mail body

hi, Can anyone please tell me how to add some text in the mail body like I can add subject using the following syntax. mailx -s "Hi - This is mail subject" xyz@abc.com Many Thanks. (4 Replies)
Discussion started by: abovais
4 Replies

6. UNIX for Dummies Questions & Answers

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... (4 Replies)
Discussion started by: gzs553
4 Replies

7. Solaris

Solaris 9 mailx problems

how come I cant email myself, here is what im typing mailx saundersc Subject: hi hello world . EOT # su saundersc # mailx No mail for saundersc (5 Replies)
Discussion started by: csaunders
5 Replies

8. UNIX for Dummies Questions & Answers

mailx error message : mailx: NUL changed to @

If I use the "Mail" link instead of the "mail" link to ../mailx I get this error. Mail so-n-so @whatever.com mailx: NUL changed to @ Unknown command: "postmaster" The email still goes through but i get the error. If I use "mail" it goes thru without the error. Any ideas?? (2 Replies)
Discussion started by: BG_JrAdmin
2 Replies

9. Solaris

how to send mails to users on exchange server from sendmail/solaris(mailx)

Hi, Can anyone pls. tell me how to access Active directory from solaris. I am looking at solution by which I can send mail notification from the logs generated by scripts, to the users on Exchange server. I am trying for a Perl-LDAP module , but don't realy know how to go for it (5 Replies)
Discussion started by: ganeshh
5 Replies

10. 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