Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sendmail subject line

Status
Not open for further replies.

umeman

Technical User
Oct 2, 2001
59
US
Admins,

Does anyone know how to add a subject line to
the sendmail command on a Solaris 8 system

For example the line "This is a test" will appear
in the e-mail body, but now I also want to
add a subject line

echo "This is a test" | sendmail test@test.com

Any help appreciated with example

Thanks
 
why not just use the mail options on the task bar.
It will give you that option for a subject.
 
mrfixit - there's no taskbar on the command line ;-)

umeman, how about something like this ...
[tt]
# /usr/lib/sendmail test@test.com
subject: Test
This is a test ;-)
.
#
[/tt]
This works on my solaris box

But, assuming you want to call it from a script, why not use mailx?

Eg:[tt]
# echo "This is a test" | mailx -s "Test subject" test@test.com
[/tt] One by one, the penguins steal my sanity. X-)

 
The reason why I need this format is because I need to execute the email from
a shell script

Thanks
 
HI

Ya. mailx is good option.

Try
#mailx -s &quot;subject&quot; e-mail_addresses < file containing mail details

Sharad
 
does anyone know how to configure mailx on solaris 8, when i try to send mail I get a host unknown response
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top