LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-25-2007, 11:32 PM   #1
just_a_kid
LQ Newbie
 
Registered: Dec 2006
Posts: 24

Rep: Reputation: 15
How to send mail using sh/bash in Solaris


Hi


anyone could teach me step by step send simple mail to users
using script in bash/sh in Solaris/Unix Environment?

Thanks
 
Old 01-26-2007, 12:42 AM   #2
indienick
Senior Member
 
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853

Rep: Reputation: 65
I can't remember how to do it, off-hand, but I would recommend looking into creating a Perl script that interfaces with SENDMAIL.

Simply enough, I vividly remember it being as simple as making sure sendmail is installed, and opening it as a file stream. I'm sorry I can't be of more immediate help, but I'm at work.
 
Old 01-26-2007, 12:54 AM   #3
just_a_kid
LQ Newbie
 
Registered: Dec 2006
Posts: 24

Original Poster
Rep: Reputation: 15
Hi

I found an example which does something like below
echo "This is the body."| mailx -s "mailx Test1" jsmith@abc.com


but i was wondering where do u configure ur mail server
and from email ??




i checked man mailx and it doesnt say if it can accept hostname as parameter
 
Old 01-26-2007, 12:06 PM   #4
indienick
Senior Member
 
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853

Rep: Reputation: 65
I've never heard of mailx. It seems as though it may be a command line mail program that interfaces with either Sendmail, or Postfix. In which case, you'd have to worry about sendmail or postfix being configured, not mailx.
 
  


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
with the linux proxi, backend pop3 mail client can not receive mail and send mail rubin823 Linux - Networking 0 12-21-2006 11:06 PM
Unable to send mail to some mail servers due smtp greetings malformed atotomex Linux - Networking 6 12-20-2005 05:38 PM
Server does'nt send mail until shutdown and LAN can't send or receive. Wolfy Linux - Networking 0 08-02-2004 08:31 PM
Cannot send mail with mail() command in PHP 4.3.4, Apache 2.0.48, Mandrake Linux 10 arcanum Linux - General 3 06-27-2004 07:06 PM
bash script to send mail Cruger Programming 1 03-06-2004 09:25 AM


All times are GMT -5. The time now is 06:57 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration