Use mutt or mail in different contexts - Linux or Unix


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Use mutt or mail in different contexts - Linux or Unix
# 1  
Old 03-27-2012
Use mutt or mail in different contexts - Linux or Unix

Hi All,
I need to write a "portable" shell script that can send mail from Unix or Linux servers.

In my server Linux I find mutt and I need to attach a file

In my server Unix mutt is not present. Only mail/mailx. In this case for attaching a file I need to pipe the uuecode command.

My question.... Is it true this situation?

In this case I need to check with uname command if the script shell is running on Linux or Unix environment.

Any suggestion will be well appreciated.

Thanks in advance for your kind support.

Regards,

Giovanni
# 2  
Old 03-27-2012
It's possible for UNIX and Linux servers to have mutt, mail, both, or neither. Even if present, they may not be operating. Not all servers are mail servers, after all...

Check for the existence of the commands instead of what kind of UNIX/Linux.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

UNIX/Linux - awk - displaying unxpected ! character when viewed in mail; but not in actual file

Greetings Experts, I am on AIX using ksh; I am processing the input files and generating a awk_output.txt file using AWK. By reading that awk_output.txt file, I am building a output.html file which is cat and then fed to /usr/sbin/sendmail .When the shell script is triggered through command... (2 Replies)
Discussion started by: chill3chee
2 Replies

2. Shell Programming and Scripting

How to configure mutt to send emails on Linux.?

Hello, I am trying to use mutt in order to send emails. I have installed mutt using yum and pasted some details about it later in the post. When I try to run: echo test | mutt -s "Test Email" user@id.com It doesn't do anything. I dont receive any emails. I have the SMTP details for... (1 Reply)
Discussion started by: vaibhavraj
1 Replies

3. Shell Programming and Scripting

Match and Append Based on file contexts

Not Sure how to do this. Some combo of awk and sed perhaps. If String in File1 match String in file2 then append file2 File1.txt BullTerrier Boxer Bulldog File2.txt <Defined info="AllAnimals" group="Adoptions" setting="animals"> <SomeID ="NumbersRepresentingDogName"> <for> <add... (2 Replies)
Discussion started by: TY718
2 Replies

4. UNIX for Advanced & Expert Users

How can I send a mail from my outlook or other mail accounts to UNIX server?

Hi all, I want to send a mail for my business needs from outlook account to an unix server (HP-UX) but I don't send any mail. While I can send from the unix server to my outlook account, I can't send from outlook to unix. How can I achieve this ? How can I send a mail from my outlook or other... (2 Replies)
Discussion started by: igelegin
2 Replies

5. Shell Programming and Scripting

How to change the sender's name or E-mail address in mutt command

Can any one help me in this ??? How to change sender's name or email address in Mutt command??? (4 Replies)
Discussion started by: sarathi
4 Replies

6. UNIX for Advanced & Expert Users

Mutt to use external mail server

Hi, Using mutt im triggering a mail with attachment to 2 different recipient. How can i use gmail/official mail server to send mails using mutt service only. kindly shed some idea Script which i use now SUBJECT="Mail from myserver" EMAIL="user1@mail.com,other@mail.com"... (0 Replies)
Discussion started by: Paulwintech
0 Replies

7. Shell Programming and Scripting

Need to get return code from mutt if an address is invalid/undeliverable from Unix shell script

I am using mutt on ksh Unix to send emails to addresses plucked from the database. If the "To:" email address is not longer valid and so the email is not sent to the "To:" recipient, but is sent to the valid cc address, I need to be able to get an error code returned to the shell script so that... (3 Replies)
Discussion started by: jzuber
3 Replies

8. UNIX for Dummies Questions & Answers

Unix and Linux...what to look for in mail.log?

Hi all. I have a couple of scripts looking at my syslog.log, mail.log, and messages logs. My scripts work well with syslog.log and messages logs. I use grep function and then make exceptions to things that I know happen often and that way can investigate better without being buried with... (2 Replies)
Discussion started by: zixzix01
2 Replies

9. UNIX for Dummies Questions & Answers

can not send mail from unix server to company/yahoo mail

hi, Gurus, I need some help with sending mail out from my UNIX server: It is running Solaris 2.6 and the sendmail version is 8.8. Output of :/usr/lib/sendmail -d0.1 -bt < /dev/null Version 8.8.8+Sun Compiled with: LOG MATCHGECOS MIME7TO8 MIME8TO7 NAMED_BIND NDBM NETINET ... (5 Replies)
Discussion started by: b5fnpct
5 Replies
Login or Register to Ask a Question