Re: how to specify Subject line with the sendmail command.
- From: Stephane CHAZELAS <this.address@xxxxxxxxxx>
- Date: Fri, 19 May 2006 08:52:30 +0100
2006-05-19, 00:38(-07), Prasad:
Hi All,[...]
I want to send a mail from command line, I am using sendmail command
for the same.
I tried sending mails to myself. I am able to send mails but, i don't
know how to specify Subject line.
I used command
# sendmail -F "Prasad Joshi." -t prasad_joshi1@xxxxxxxxxxxx <<< "TEST"
You need to provide the headers. sendmail will add some headers
if you fail to provide them (such as Message-Id, Date...) but it
expects that you provide the headers. sendmail is to send raw
emails. You should consider using the mailx command instead.
Or:
sendmail -oi -t << EOF
From: Prasad Joshi <your@address>
To: Prasad <prasad_joshi1@xxxxxxxxxxxx>
Subject: the subject
Body of the message
EOF
The headers are separated from the body by an empty line.
"-t" tells sendmail to look for the addresses to send this to in
the To: and Cc: (and possibly Bcc: in which case it will remove
it before sending the email) headers of the message.
--
Stephane
.
- References:
- Prev by Date: how to specify Subject line with the sendmail command.
- Next by Date: Re: how to specify Subject line with the sendmail command.
- Previous by thread: how to specify Subject line with the sendmail command.
- Next by thread: Re: how to specify Subject line with the sendmail command.
- Index(es):
Relevant Pages
|
|