Simpler Navigation coming for Servers and Operating Systems
Coming soon: a much simpler Servers and Operating Systems section of the Community. We will combine many of the older boards, and you won't have to click through so many levels to get at the information you need. If you are looking for an older board and do not find it, check the consolidated boards, as the posts are still there.
Messaging
cancel
Showing results for 
Search instead for 
Did you mean: 

Sendmail : How can I set the "Subject:" ?

SOLVED
Go to solution
Eckle
Occasional Advisor

Sendmail : How can I set the "Subject:" ?

Hello everybody,

I am using sendmail and reach many problems :
1. Is it possible to set the "SUBJECT:" clause of a mail, when using sendmail ?
2. Mails which had correctly been sent & received (on Exchange) don't show the "To:" clause (the receiver himself...). Can it be shown ?
3. About one year ago I configured automatic emails via cron which needed to attached files(UX 10.20). At this time the only way was to use uuencode + elm (sendmail made troubles with the attachement...). Is it now possible the attach file with sendmail (UX 10.20 or 11.XX) ???

P.S. : If all thoses problems can be solved by another command that sendmail, I would use it ...
4 REPLIES
Robin Wakefield
Honored Contributor

Re: Sendmail : How can I set the "Subject:" ?

Hi,

1.

(echo "Subject: hello

this is the hosts file";cat /etc/hosts) | sendmail robin.wakefield@ubsw.com

will set the subject to hello. If the first line starts with "Subject:" & is followed by an empty line, this triggers it to be the Subject.

3. uuencode still required with sendmail:

uuencode /tmp/1 /tmp/1.txt | sendmail robin.wakefield@ubsw.com

Rgds, Robin.
Rita C Workman
Honored Contributor
Solution

Re: Sendmail : How can I set the "Subject:" ?

Have you tried:

elm -s "My subject for today $(date)" user@abc.com < /home/me/include_command_for_attached_file

Just because I like the include statement that sendmail will use...See this thread:
http://my1.itrc.hp.com/cm/QuestionAnswer/1,,0x41950559ff7cd4118fef0090279cd0f9!0,00.html

I'm not positive about #2..is it possible it's on the Exchange side that is blocking out the To:..?

Rgrds,
Rita
Paula J Frazer-Campbell
Honored Contributor

Re: Sendmail : How can I set the "Subject:" ?

Hi

mailx -s "Subject" fred@there.com
Paula
If you can spell SysAdmin then you is one - anon
Uday_S_Ankolekar
Honored Contributor

Re: Sendmail : How can I set the "Subject:" ?

Hi,
You can also try this.
# sendmail user@hostname {return}
Subject: This the subject {return} ( You need to write Subject and name of subject in this manner)

Write down here the message {return}
. {return}
#

-Goodluck,
-USA..
Good Luck..