Subject line of an email

Hi all,

I am trying to automate a process in which at the end of the process the script should send an email to the user saying this process is completed.

I have done everything but the problem now is the subject line of the email...

the subject line looks like this..

where abc xyz is a company name which changes for every new process.

if i use the above variable for my subject line while sending email, i'll not get any email.

but..
if i use it as below..

it works perfectly fine...

So some one please help me is it not possible to put a subject line with spaces in between?? if yes then is there any way to modify the line 1 using script to replace those spaces into an underscore inside the same file..

PLease help...

Thank you.

Regards,
Deepak.

You haven't posted the code that you use to send the mail. Anyway, you probably just need to add some double quotes, e.g....

mailx -s "$REQ_SUBJECT"

you are giving that variables without $ symbol.
store those company names in a variables and send like this
REQ_SUBJECT="Email_Notification_-_Requested_Process_completed_-_FILE_sent_to_$abc_$xyz"

Deepak,

If you define the company name as a variable then you can do something like this:

COMPANY="abc xyz"
REQ_SUBJECT="Email Notification - Requested Process completed - FILE sent to $COMPANY"
echo "This is an automated email, please do not reply." |mailx -s "$REQ_SUBJECT" email@domain.com

Thanks for all your reply... double quotes has solved my issue... Thanks again..