The body of the Email -- mailx


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting The body of the Email -- mailx
# 1  
Old 09-14-2010
Question The body of the Email -- mailx

Hi,

I am using mailx command to send an email and i took the body of the email from a file,
Code:
   mailx -r gtt.org -s  "Status Report " ss@org.com < $ProcessStatisticsFile

but now i want to declare the body of the email in the command itself.
I have tried with the following command but its not working Smilie
Code:
echo "something" | mailx -r mail.allstate.com -s  "killed" ss@org.com

how i can define the body of the email with the help of command.

Please help me...
# 2  
Old 09-14-2010
Can't see anything wrong. Do you get an error message?

There is much variation in "mailx". What Operating System and version do you have?
# 3  
Old 09-14-2010
The body of an email --mailx

hi,
After run the script, i got the following line and haven't receive any mail

Quote:
The flags you gave are used only when sending mail.
Usage: mailx -eiIUdFntBNHvV~ -T FILE -u USER -h hops -r address
-s SUBJECT -f FILE users
# 4  
Old 09-14-2010
Can you show the actual line you typed (changing any email addresses or confidential data)?


There is much variation in "mailx". What Operating System and version do you have?
# 5  
Old 09-14-2010
try this Smilie
Code:
# echo "something" | mailx -s  "killed" ss@org.com -- -r mail.allstate.com

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Mailx fails when ".com" is specified in email body

Hi Below works and I do receive the email. echo "Unable to send file as attachment as File Size is too big i.e. more than 35 MB. Please download from user1@myserv0131:/web/admin/email/serv0131.mybank" | mailx -s "Attachment too BIG | download from the server" mohtashim@gmail.com... (1 Reply)
Discussion started by: mohtashims
1 Replies

2. Shell Programming and Scripting

Mailx with attachment and message body

i have to attach the 'body in the email' along with attachment below code is throwing errors, how can i do it ? here body file contains message, it should display in email, please help i am using HP-UX (cat body ;) (uuencode attch1 attch1 ;) | mailx -m -s "testing" "abc@gmail.com" ... (4 Replies)
Discussion started by: only4satish
4 Replies

3. Shell Programming and Scripting

Need to print body of content using mailx

Hi, I'm a perl developer. I need to attach a file from my perl cgi script and send mail to our users whoever using our website. I have used mailx command to attach a file.. it is working fine for me. The problem I'm facing is I'm not getting body of the mail. I have a function called... (0 Replies)
Discussion started by: bheeshmaraja
0 Replies

4. UNIX for Dummies Questions & Answers

Send email with attachment and body : mailx , waiting for input , signal Control D

Hi, I am trying to send email with attacment and body using "mailx" (cat body.txt; uuencode attach.txt) | mailx -s "Attachment" abc@xyz.com When i type this command, the shell is still waiting for me to enter something in standard input and press control D before it sends a mail and... (2 Replies)
Discussion started by: aliaszero
2 Replies

5. UNIX for Dummies Questions & Answers

Mailx empty body message

Hi, Is there a way to suppress this message? Null message body; hope that's ok My email string is: mailx -s "This is my subject" myemail@domain.com < /dev/null It's just an annoyance to me that I would like see go away. (3 Replies)
Discussion started by: bbbngowc
3 Replies

6. Shell Programming and Scripting

mailx requirement - email body header in bold and data content in normal text

Dear all- I have a requirement to send an email via email with body content which looks something below- Email body contents -------------------- RequestType: Update DateAcctOpened: 1/5/2010 Note that header information and data content should be normal text.. Please advice on... (5 Replies)
Discussion started by: sureshg_sampat
5 Replies

7. Shell Programming and Scripting

Referring to attached images in html email body through mailx

encoding type for images? (5 Replies)
Discussion started by: biswasbaishali
5 Replies

8. UNIX for Dummies Questions & Answers

mailx and html body messages

Hi, I'm working on Solaris 9 (SPARC) and I like to send an html body message to our users when something happen. The problem is that I can't find how to give mime type information with mailx. To be recognized as html I need to put in email header this information: Mime-Version: 1.0... (2 Replies)
Discussion started by: gbagagli
2 Replies

9. UNIX for Dummies Questions & Answers

Mailx : can we have the body to be a binary file ?

Hi I am totally dummy as far as UNIX is concerned, so please apologize. I was just given the syntax to send multiple attachments with a body.txt message, it works great and we use it a lot. Now, my question is : can we have the body to be a Binary file (like a Word Document for example)? ... (5 Replies)
Discussion started by: CKIRCH
5 Replies

10. UNIX for Dummies Questions & Answers

MAILX Body containing SQL results

I have a KSH script that runs a SQL script, then sends an email to me indicating that it's completed. I would like to modify it so that the body of the email will contain a count of the number of records Added, Changed, Deleted as a result of the SQL script. Here's what I was trying, but it's... (2 Replies)
Discussion started by: dstinsman
2 Replies
Login or Register to Ask a Question