Sendmail Utility


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Sendmail Utility
# 1  
Old 11-18-2010
Sendmail Utility

Hi. Question from a novice. I'd like to have a unix script that sends me an email message, but I have no clue on the syntax. I do know this works from my mailtest.sh script:

Code:
/usr/lib/sendmail steve@me.com < /dev/null

This sends me a blank email. I'm hoping someone can help me to build on this. I want a script that will send me an email, but include a subject and message body. Something like this:

Code:
To: steve@me.com
Subject: Test

Body: This is a test mail message

Any help would be greatly appreciated.

Last edited by Scott; 11-18-2010 at 04:32 PM.. Reason: Code tags, please...
# 2  
Old 11-18-2010
Code:
echo "This is a test mail message" | mailx -s "Test"  steve@me.com

This User Gave Thanks to ctsgnb For This Post:
# 3  
Old 11-18-2010
Quote:
Originally Posted by ctsgnb
Code:
echo "This is a test mail message" | mailx -s "Test"  steve@me.com

You rock! Thanks so much!

---------- Post updated at 04:03 PM ---------- Previous update was at 02:46 PM ----------

Quote:
Originally Posted by ctsgnb
Code:
echo "This is a test mail message" | mailx -s "Test"  steve@me.com

Hi. Can I include more than one email address in this command? If so, how would that look?

Thanks in advance.

Last edited by buechler66; 11-18-2010 at 04:08 PM..
# 4  
Old 11-18-2010
yes separated by coma i think (just give it a test and let me know)
Code:
echo "This is a test mail message" | mailx -s "Test"  steve@me.com,chuck.norris@youregonnadie.com,foo@bar.com,tux@greenland.org

Smilie
This User Gave Thanks to ctsgnb For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Clarifying sendmail configuration - sendmail-client offline

Hi all, I have read about sendmail running as 2 separate process. 1 as a MSP, and the other as the real daemon or MTA. In my current configuration, the sendmail-client is disabled. Both submit.cf and sendmail.cf are left as default untouch I do not specified any mailhost... (3 Replies)
Discussion started by: javanoob
3 Replies

2. UNIX for Dummies Questions & Answers

Mkdir utility

Howdy, Puttering around in unix, and read this in the mkdir man page: "The mkdir utility creates the directories named as operands..." What does this mean, i.e. as operands? Many thanks, DN (2 Replies)
Discussion started by: danuke
2 Replies

3. UNIX for Advanced & Expert Users

Sendmail questions, SCO 5.0.6 sendmail 8.11.0

I am running SCO 5.0.6 and using sendmail 8.11.0 and having issues with smtp authentication. When trying to send mail the following message will kick back. (reason: 530 5.7.1 Authentication required) 530 5.7.1 Authentication required Not sure what needs to be tweeked in sendmail.cf but I... (1 Reply)
Discussion started by: ziggy6
1 Replies

4. Shell Programming and Scripting

Using sendmail utility in K Shell script

Hi, I am new to shell scripting and thus any help will be highly appreciated. I need to write a K shell script where in the email sending feature should be handled by sendmail utility and I have come up with the following : #!/usr/bin/ksh echo "This is a test mailest mail" | /usr/lib/sendmail... (4 Replies)
Discussion started by: sdiptanil
4 Replies

5. Shell Programming and Scripting

How to Unzip a file using unzip utility for files zipped without zip utility ?

Hi, I need to zip/compress a data file and send to a vendor. The vendor does have only unzip utility and can accept only .ZIP files. I do not have zip utility in my server. How do I zip/compress the file so that it can be deflated using unzip command ? I tried gzip & compress commands, but... (1 Reply)
Discussion started by: Sabari Nath S
1 Replies

6. Shell Programming and Scripting

utility

hi experts, Can you please help me out in removing delimiters with in double quotes from a CSV file. input: ===== a,"bnn,",dgd, "sagfh,dj",ad output ===== a,"bnn",dgd, "sagfhdj",ad there are so mnay fileds in a row and there are millions of rows. Thanks in an advance.... (6 Replies)
Discussion started by: subhendu81
6 Replies

7. UNIX for Dummies Questions & Answers

unknown utility

Hi everyone, I am a beginner in Linux and Shell scripting.I am migrating a couple of shell scripts from Solaris platform to Linux platform.In one script i saw a usage as : /base/article/ocilib/lobfile $username/$password $filename $filepath I didn't understand what this represents.The... (2 Replies)
Discussion started by: DILEEP410
2 Replies

8. UNIX for Dummies Questions & Answers

Talk utility

Are "talk" sessions logged or can they be logged? (1 Reply)
Discussion started by: pbonilla
1 Replies

9. UNIX Desktop Questions & Answers

BRU utility

I'm having trouble trying to extract files from a bru tape. The man pages on the bru command have confused me. The following are commands that I've tried and the respective outputs. will.rlee 224> bru -vgf /dev/nrtape label: created: Mon Nov 7 18:21:41 1994 device: ... (7 Replies)
Discussion started by: sherbet808
7 Replies

10. UNIX for Dummies Questions & Answers

What utility do I use for this?

I want to pull out the 3rd column of information and stick in a file. What is the Utility I use to do this? (8 Replies)
Discussion started by: James
8 Replies
Login or Register to Ask a Question