Operating System - HP-UX
1834796 Members
2391 Online
110070 Solutions
New Discussion

Sendmail Query Concerning Subject Header

 
SOLVED
Go to solution
Joanne Keegan
Regular Advisor

Sendmail Query Concerning Subject Header

For e-mails to be sent externally from our site the subject of the email must contain a certain string of text. Hence my problem with sendmail.

Is there a method of including a subject header that is not included in the file that is to be emailed? I can't find any document that indicates if there is an argument that can be used on the command line.

For example:

sendmail -f abcds@wer.wei.nz -'* subject line here' -t jfjf@kdoe.com < /tmp/file

Thanks for your help.

Regards,

Jo

P.S. We are using mailx okay with a subject line but it introduces another problem for us with email addresses.
3 REPLIES 3
Chin Guan
Valued Contributor
Solution

Re: Sendmail Query Concerning Subject Header

Hi,

Sendmail does not has option for Subject. So need some workaround.

I tried to the following and it works :

(echo Subject: THIS_IS_TITLE\\n;cat /tmp/FILE_TO_SEND) | sendmail -f email@address -t email@address
Rita C Workman
Honored Contributor

Re: Sendmail Query Concerning Subject Header

Here's a thread that addresses a 'workaround' for sendmail to send a subject line:
http://us-support.external.hp.com/cki/bin/doc.pl/sid=b551b0eb0d495b49d7/screen=ckiDisplayDocument?docId=200000054887756

Now for another option. Have you thought of trying elm, which does have a -s "subject option". Elm uses the sendmail transport.

Just a thought,
/rcw
Joanne Keegan
Regular Advisor

Re: Sendmail Query Concerning Subject Header

Thanks Chin and Rita. Your advice is great.

Thanks,

Jo