Operating System - HP-UX
1833784 Members
4207 Online
110063 Solutions
New Discussion

Problem with elm subject line

 
SOLVED
Go to solution
lenny Marder
New Member

Problem with elm subject line

As an Application programmer I need to mail a file to outlook.
I am using elm command:

elm -s "My Subject Line" user@mailserver.com < myfile

When I do this from command line it?s fine,
but when I do it from the script using variables,

subject=""My Subject Line ""

elm -s ${subject} user@mailserver.com < myfile

elm treats "My Subject Line" as 3 words:
1. "My - it will treat as a subject
2. Subject - it will treat as an address and send email there
3. Line" - it will treat as an address and send email there

Seems like it does not sense double quotes in this case, even though when I do echo " subject is ${subject} " it is quoted!

is there anyway around this problem? May be there is other separators beside " ?

Thanks for help.
Lenny
There is a way around it!
3 REPLIES 3
James R. Ferguson
Acclaimed Contributor

Re: Problem with elm subject line

Hi Lenny:

Try this:

# SUBJECT=`"My Subject Line"`
# elm -s "${SUBJECT}" user@mailserver.com < myfile

Regards!

...JRF...
Dave La Mar
Honored Contributor
Solution

Re: Problem with elm subject line

Try -
subject='"mysubject"'
This provides email subject "mysubject"
dl
"I'm not dumb. I just have a command of thoroughly useless information."
lenny Marder
New Member

Re: Problem with elm subject line

Thanks everybody for your help, single quote around double quotes indeed worked for me.
Lenny
There is a way around it!