Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to set Subject in 'mail' ? Post 86485 by hkapil on Friday 14th of October 2005 01:16:24 PM
Old 10-14-2005
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 "Subject:" option of command. But while sending an attached file how can I set the subject?

I tried "-s" option but it is nto working?

I am using Sun SOlaris and k shell.

Thanks in advance.
 

9 More Discussions You Might Find Interesting

1. 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

2. 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

3. Linux

How to set up mail server in Linux machine

Hi, I have a desktop on which linux is installed. It is connected to office LAN. I am able to send mails(using the 'mail' command) to anybody who is connected to the linux machine. But I am not able to send mails to internet IDs. Please inform, what do I have to do to enable mailing to internet... (3 Replies)
Discussion started by: abhishek_ss
3 Replies

4. UNIX for Advanced & Expert Users

date need to be add in the subject of the mail.

Hi Am fetching a weekly report pf data..once i fetched the data i need a sent report by mail. In the subject of that mail i want to sent a message like.. SUBJECT :The report had been fetched from (01/12/08 to 07/12/08). I need to send a report like this every week with that particular... (2 Replies)
Discussion started by: bobprabhu
2 Replies

5. UNIX for Dummies Questions & Answers

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"... (2 Replies)
Discussion started by: orahi001
2 Replies

6. Shell Programming and Scripting

mail: subject and body text

HI, After giving the mail -e name@domain.com its asking the subject : after this its enter in to the body of the mail i.e. (in edit mode) How to end this edit process to send mail ? (2 Replies)
Discussion started by: thelakbe
2 Replies

7. UNIX for Dummies Questions & Answers

How to set Subject in Sendmail in Crontab

Hello All, I am trying to send a file through email everyday from one of my Linux (x86_64) system. I've scheduled Sendmail in Crontab like this- 00 8 * * * /usr/sbin/sendmail name@xxx.co.uk < /home/file1.out This entry in crontab is working very fine and I am receiving file file1.out... (10 Replies)
Discussion started by: NARESH1302
10 Replies

8. Red Hat

How to set up a mail server

Hi, I need to set up a mail server and I do not have much knowledge in Linux RedHat. Does anyone know how to do this? (0 Replies)
Discussion started by: shakshakshuk
0 Replies

9. 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
mhmail(1)						      General Commands Manual							 mhmail(1)

NAME
mhmail - send or read mail (only available within the message handling system, mh) SYNOPSIS
mhmail [addrs...] [options] OPTIONS
Specifies the text of the message. If it is specified, then the standard input is not read. Specifies addresses to be placed in the cc: field of the message. Specifies the content of the From: header of the draft. The address given is placed in the From: field of the mes- sage. The Sender: field is filled in correctly by post. Prints a list of the valid options for this command. Specifies the mail system over which mail is sent. The only value allowed is smtp, which is the standard mail system. Additional values are supported only for use with other mail systems. Provides the text of the Subject: field of the message. DESCRIPTION
The mhmail program is intended as a replacement for the standard mail programs, bellmail and ucbmail. See binmail(1) and mail(1) for more details of these mail programs. When invoked without arguments, it simply invokes inc to incorporate new messages from the user's maildrop. When one or more users is specified, a message is read from the standard input and spooled to a temporary file. The mhmail program then invokes post with the name of the temporary file as its argument to deliver the message to the specified user. Normally, people will use comp and send to send messages. RESTRICTIONS
Messages with a null body part will not be sent by mhmail. You must include some body text in all messages to be sent by mhmail. For this version, the -mts option only supports the value smtp. Additional values are supported for use only with other mail systems. FILES
Program to incorporate a maildrop into a folder. Program to deliver a message. Temporary copy of message. SEE ALSO
inc(1), post(8) mhmail(1)
All times are GMT -4. The time now is 09:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy