The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > Linux
Google UNIX.COM


Linux RedHat, Ubuntu, SUSE, Fedora, Debian, Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
mailx Paul Byrne UNIX for Advanced & Expert Users 6 06-23-2008 01:28 AM
mailX anumkoshy Shell Programming and Scripting 4 08-25-2007 09:08 AM
mailx error message : mailx: NUL changed to @ BG_JrAdmin UNIX for Dummies Questions & Answers 2 12-01-2005 06:27 AM
Help with mailx ssmith001 UNIX for Dummies Questions & Answers 1 09-02-2005 03:20 PM
mailx to to Dl sm321 Shell Programming and Scripting 1 07-16-2004 05:21 PM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-05-2005
Registered User
 

Join Date: Aug 2005
Posts: 4
mailx

hi,
I am working on a ksh script and i want to be able to send a email using mailx.


if [[ "$testcase3" = "email1" ]] || [[ "$testcase3" = "email2" ]]
then
echo "send email"
mailx -s "Subject goes here" <email address>;
fi

thats what i have so far, in place of "<email address>" I have my actualy email address and I want to add a body with the text "body goes here". I have tried googling for this but didnt quite understand the results nor the man pages. Btw the code above doesnt even send an email with just a subject only, any ideas.

Any help would be appreciated.
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 08-05-2005
vgersh99's Avatar
Moderator
 

Join Date: Feb 2005
Location: Boston, MA
Posts: 2,994
echo 'body goes here' | mailx -s "Subject goes here" emailAddress
Reply With Quote
  #3 (permalink)  
Old 08-05-2005
Registered User
 

Join Date: Aug 2005
Posts: 4
re: mailx

Thank You,
It worked!
Reply With Quote
  #4 (permalink)  
Old 07-08-2008
Registered User
 

Join Date: Apr 2008
Posts: 4
how to send mail from the command prompt ubuntu

I am trying to send a mail from the command line using the mail command, it is not giving any error message nor the message is delivered.

Regards,
SM
Reply With Quote
  #5 (permalink)  
Old 07-08-2008
Registered User
 

Join Date: May 2007
Posts: 8
Immediately after sending the mail run "mailq" and paste the output here.

Thanks,
A.
Reply With Quote
Google UNIX.COM
Reply

Tags
linux, ubuntu

Thread Tools
Display Modes




All times are GMT -7. The time now is 03:12 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0