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 07: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
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
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  
Old 08-05-2005
vgersh99's Avatar
Moderator
 

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

Join Date: Aug 2005
Posts: 4
re: mailx

Thank You,
It worked!
Reply With Quote
  #4  
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  
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
  #6  
Old 09-29-2008
Registered User
 

Join Date: Nov 2007
Posts: 10
"can not chdir(/var/spool/mqueue/): Permission denied
Program mode requires special privileges, e.g., root or TrustedUser."


This is the o/p of mailq after sending mail using mail comand on linux. Does any one know whta does this mean?
Reply With Quote
  #7  
Old 09-29-2008
era era is offline
Herder of Useless Cats
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,650
It means you don't have permission to run the mailq command. If you have root or sudo access, use that.

Please start a new thread unless your question is a direct follow-up to something in a thread.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Tags
linux, ubuntu

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 12:08 AM.


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

Content Relevant URLs by vBSEO 3.2.0