mail -s not showing subject on emails


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers mail -s not showing subject on emails
# 1  
Old 04-15-2009
mail -s not showing subject on emails

Hi,

I have a cron job that creates backups nightly and sends me an email with output from the script. I'm recieving the email and the output; however, the subject field is always empty. Here is what I have in my crontab

00 23 * * * sh /test_backup/test_script | mail -s "Backups" <myusername@mydomain.com>

I should see Backups in the mail subject but the subject is empty when I recieve the email.

Any ideas why the subject field is empty?
# 2  
Old 04-15-2009
Code:
00 23 * * * /test_backup/test_script | mailx -s 'Backups' <myusername@mydomain.com>

# 3  
Old 04-15-2009
that worked!

thanks
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Issues sending emails using PostFix Mail Server

I'm unable to send email from my Linux server despite SMTP port 25 Active and Listening. # hostname TechX I checked the mail log ( /var/log/maillog ) and found the below error. I'm sharing all the ".cf" files seen in the error log. 1. # more /etc/postfix/main.cf # postfix... (0 Replies)
Discussion started by: mohtashims
0 Replies

2. Shell Programming and Scripting

Mail command does not work for Distribution List emails

mail works for my personal email address mailx -s "Alert" mymail@mycomp.com<results.txt mail fails for the Teams Distribution List (copied from outlook) mailx -s "Alert" #My-Team@mycomp.com<results.txt This was the first problem. The second problem is if I have the subject line... (4 Replies)
Discussion started by: mohtashims
4 Replies

3. AIX

Mail subject splitted

Hi I have a script that is sending mail and it was working fine. But the last time it run, it gave some errors. It look like the subject was split into many receiver. I am on AIX 6.1. #!/bin/ksh # HOSTNAME=`which hostname` MACHINE=`${HOSTNAME}` # E-mail to inform hci of a stop echo "###... (9 Replies)
Discussion started by: jacquesT
9 Replies

4. Shell Programming and Scripting

PHP Mail Script Takes Hours to Send emails

guys, i have a php script that i wrote that takes hours to send emails to recipients. i can't post the content of this script in here because the script contains some very important confidential information. so my question is, why is it that when the php script runs, it runs successfully, but... (3 Replies)
Discussion started by: SkySmart
3 Replies

5. UNIX for Dummies Questions & Answers

How to set Subject in 'mail' ?

Hi, I am trying to send some file to some mail ids using mail command in UNIX. Now the issue is I am not able to find how to add "Subject text" to the command. So I am using command like "mail abc@yahoo.com < file_name" Now if I use simple mail command I can set subject text by using... (2 Replies)
Discussion started by: hkapil
2 Replies

6. UNIX for Dummies Questions & Answers

Unix IMAP e-mail via Outlook showing +10 hours

Multiple users at my work are connecting to a UNIX IMAP e- mail server via Outlook 2003 that is creating a small problem. Random new e-mails repeat themselves up to 3 times with an additional 10 hours added to them of when the original arrived. i.e Original e-mail marked arrived at 10:00am... (2 Replies)
Discussion started by: arkady
2 Replies

7. UNIX for Dummies Questions & Answers

forward emails with specific subject line

Is there a way to forward email from user1@mydomain.com to user2@mydomain.com only when the subject line is "this subject"? I figure it would be done with .forward somehow if it is possible. I'm using Red Hat 9 and sendmail. (4 Replies)
Discussion started by: pmj1970
4 Replies

8. UNIX for Dummies Questions & Answers

Mail subject output of script

I am new to this site so please bear with my ignorances. I have started playing with mail on AIX 4.3.3 with many successes (thanks to this site) but am now stuck. I want to send a mail with the subject as the result of a script, eg. I want the mail body to read as the output from 'df -k... (4 Replies)
Discussion started by: kiano
4 Replies

9. UNIX for Dummies Questions & Answers

Send a mail with a subject and an attachement

Dear All: I want to send a message to a list of people with a subject and an attachement, currently I am using the following command into a shell script: uuencode $FILENAME.gz $FILENAME.gz | mail john.kennedy@mycompany.com m.m@mycompany.com With this command I can send the message for a... (1 Reply)
Discussion started by: josecollantes
1 Replies

10. UNIX for Dummies Questions & Answers

Using mail to send HTML emails

Hi, I'm a programmer not a sys admin, so please excuse this if it seems a little out of place, but I think it applies to this forum. When I send my HTML newsletter from the server it comes in as plain text on some email programs and not others. Eudora is fine; Outlook Express, Hotmail, and... (2 Replies)
Discussion started by: dmennis
2 Replies
Login or Register to Ask a Question