mail -s does not put subject

Hi,

I am using Sun OS 10 and trying to use mail in a shell script.

Is there a bug in the -s parameter for the mail command. According to
the api it should put the subject if used with -s, but it never does.
Is there a workaround for this?

Thanks,
Anoop
Anoop kumar V [ Mo, 29 Oktober 2007 05:44 ] [ ID #1856587 ]

Re: mail -s does not put subject

In article <1193633066.949903.59100 [at] k79g2000hse.googlegroups.com>, Anoop wrote:
> Hi,
>
> I am using Sun OS 10 and trying to use mail in a shell script.
>
> Is there a bug in the -s parameter for the mail command. According to
> the api it should put the subject if used with -s, but it never does.
> Is there a workaround for this?
>
> Thanks,
> Anoop
>
You could try constructing the message with a Subject: header.
ChrisOD [ Mo, 29 Oktober 2007 08:12 ] [ ID #1856588 ]

Re: mail -s does not put subject

Anoop wrote:
> Hi,
>
> I am using Sun OS 10 and trying to use mail in a shell script.
>
> Is there a bug in the -s parameter for the mail command. According to
> the api it should put the subject if used with -s, but it never does.
> Is there a workaround for this?

Maybe the program mailx (instead of mail) does what you want on Sun OS.

Janis

>
> Thanks,
> Anoop
>
Janis Papanagnou [ Mo, 29 Oktober 2007 12:06 ] [ ID #1856593 ]

RE: mail -s does not put subject

anoopkumarv [at] gmail.com wrote:
>Hi,
>
>I am using Sun OS 10 and trying to use mail in a shell script.
>
>Is there a bug in the -s parameter for the mail command. According to
>the api it should put the subject if used with -s, but it never does.
>Is there a workaround for this?
>
>Thanks,
>Anoop
>
I assume you are referring to /bin/mail
If so, it does NOT take a -s option
but mailx does if you have access to it

--
------------------------------------------------------------ ---
Will Renkel
Wheaton, Ill.

------------------------------------------------------------ ---
Nobody [ Mo, 29 Oktober 2007 14:46 ] [ ID #1856600 ]

Re: mail -s does not put subject

On Oct 29, 3:12 am, ChrisOD <ch... [at] dont.send.me.any.email> wrote:
> In article <1193633066.949903.59... [at] k79g2000hse.googlegroups.com>, Anoop wrote:
> > Hi,
>
> > I am using Sun OS 10 and trying to use mail in a shell script.
>
> > Is there a bug in the -s parameter for the mail command. According to
> > the api it should put the subject if used with -s, but it never does.
> > Is there a workaround for this?
>
> > Thanks,
> > Anoop
>
> You could try constructing the message with a Subject: header.

Wow - I didnt know that you could do that - it worked very well - I
wonder where I can find all the other such tags that go with the mail
command.
I just figured out that it supports the To: and the From: as well.

Thank you - it worked nice.
Anoop kumar V [ Do, 01 November 2007 00:38 ] [ ID #1859583 ]

Re: mail -s does not put subject

Anoop wrote:
> On Oct 29, 3:12 am, ChrisOD <ch... [at] dont.send.me.any.email> wrote:
>
>>In article <1193633066.949903.59... [at] k79g2000hse.googlegroups.com>, Anoop wrote:
>>
>>>Hi,
>>
>>>I am using Sun OS 10 and trying to use mail in a shell script.
>>
>>>Is there a bug in the -s parameter for the mail command. According to
>>>the api it should put the subject if used with -s, but it never does.
>>>Is there a workaround for this?
>>
>>>Thanks,
>>>Anoop
>>
>>You could try constructing the message with a Subject: header.
>
>
> Wow - I didnt know that you could do that - it worked very well - I
> wonder where I can find all the other such tags that go with the mail
> command.

I'd start with RFC822 (http://www.ietf.org/rfc/).

Janis

> I just figured out that it supports the To: and the From: as well.
>
> Thank you - it worked nice.
>
Janis Papanagnou [ Do, 01 November 2007 01:04 ] [ ID #1859586 ]

RE: mail -s does not put subject

anoopkumarv [at] gmail.com wrote:
>On Oct 29, 3:12 am, ChrisOD <ch... [at] dont.send.me.any.email> wrote:
>> In article <1193633066.949903.59... [at] k79g2000hse.googlegroups.com>, Anoop wrote:
>> > Hi,
>>
>> > I am using Sun OS 10 and trying to use mail in a shell script.
>>
>> > Is there a bug in the -s parameter for the mail command. According to
>> > the api it should put the subject if used with -s, but it never does.
>> > Is there a workaround for this?
>>
>> > Thanks,
>> > Anoop
>>
>> You could try constructing the message with a Subject: header.
>
>Wow - I didnt know that you could do that - it worked very well - I
>wonder where I can find all the other such tags that go with the mail
>command.
>I just figured out that it supports the To: and the From: as well.
>
>Thank you - it worked nice.
>
Actually you can put any string you want in the header,
as long as it is of form "Cap-Letter followed by non-blank in string followed by a : followed by anything
eg - Commentary: junk mail

--
------------------------------------------------------------ ---
Will Renkel
Wheaton, Ill.

------------------------------------------------------------ ---
Nobody [ Do, 01 November 2007 15:36 ] [ ID #1859604 ]

Re: mail -s does not put subject

Post removed (X-No-Archive: yes)
Notifier Deamon [ Do, 01 November 2007 22:23 ] [ ID #1859623 ]

Re: mail -s does not put subject

On Thu, 01 Nov 2007 01:04:07 +0100, Janis Papanagnou wrote:

> Anoop wrote:
>>
>> Wow - I didnt know that you could do that - it worked very well - I
>> wonder where I can find all the other such tags that go with the mail
>> command.
>
> I'd start with RFC822 (http://www.ietf.org/rfc/).
>
RFC 822 has been superseded by 2822.


John.
John Horne [ Sa, 03 November 2007 21:10 ] [ ID #1861410 ]

Re: mail -s does not put subject

On Nov 3, 3:10 pm, John Horne <john.ho... [at] plymouth.ac.uk> wrote:
> On Thu, 01 Nov 2007 01:04:07 +0100, Janis Papanagnou wrote:
> > Anoop wrote:
>
> >> Wow - I didnt know that you could do that - it worked very well - I
> >> wonder where I can find all the other such tags that go with the mail
> >> command.
>
> > I'd start with RFC822 (http://www.ietf.org/rfc/).
>
> RFC 822 has been superseded by 2822.
>
> John.

Thank you all - certainly very useful information.

-Anoop
Anoop kumar V [ Di, 06 November 2007 10:52 ] [ ID #1863290 ]
Linux » comp.unix.shell » mail -s does not put subject

Vorheriges Thema: use of find
Nächstes Thema: use of find