The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Operating Systems > Linux > Ubuntu
.
google unix.com



Ubuntu Ubuntu is a complete desktop Linux operating system, freely available with both community and professional support.

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 05:28 AM
mailX anumkoshy Shell Programming and Scripting 4 08-25-2007 01:08 PM
mailx error message : mailx: NUL changed to @ BG_JrAdmin UNIX for Dummies Questions & Answers 2 12-01-2005 10:27 AM
Help with mailx ssmith001 UNIX for Dummies Questions & Answers 1 09-02-2005 07:20 PM
mailx to to Dl sm321 Shell Programming and Scripting 1 07-16-2004 09:21 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rating: Thread Rating: 1 votes, 3.00 average. Display Modes
  #1 (permalink)  
Old 08-05-2005
mike509123 mike509123 is offline
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.
  #2 (permalink)  
Old 08-05-2005
vgersh99's Avatar
vgersh99 vgersh99 is offline Forum Staff  
Moderator
  
 

Join Date: Feb 2005
Location: Boston, MA
Posts: 5,131
echo 'body goes here' | mailx -s "Subject goes here" emailAddress
  #3 (permalink)  
Old 08-05-2005
mike509123 mike509123 is offline
Registered User
  
 

Join Date: Aug 2005
Posts: 4
re: mailx

Thank You,
It worked!
  #4 (permalink)  
Old 07-08-2008
smolgara smolgara is offline
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
  #5 (permalink)  
Old 07-08-2008
anindra anindra is offline
Registered User
  
 

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

Thanks,
A.
  #6 (permalink)  
Old 09-30-2008
rimser9 rimser9 is offline
Registered User
  
 

Join Date: Nov 2007
Posts: 14
"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?
  #7 (permalink)  
Old 09-30-2008
era era is offline Forum Advisor  
Herder of Useless Cats (On Sabbatical)
  
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,652
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.
Closed Thread

Bookmarks

Tags
linux, ubuntu

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 01:07 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0