Operating System - HP-UX
1757080 Members
2664 Online
108858 Solutions
New Discussion юеВ

Sending Emails and the Subject Line, Using ELM

 
Tim Hawk
Occasional Contributor

Sending Emails and the Subject Line, Using ELM

I am trying to send email via elm. I want to pass a variable as the subject line (-s $Var) but when I do, the subject line is getting chopped off when the user receives the email. The subject line is programmatically determined. If I just specify the subject line without a variable, it works fine (e.g. -s "Test Message"). Any help would be appreciated
3 REPLIES 3
A. Clay Stephenson
Acclaimed Contributor

Re: Sending Emails and the Subject Line, Using ELM

Change it to -s "${Var}" and you are fixed.
If it ain't broke, I can fix that.
Ray Brewer
Valued Contributor

Re: Sending Emails and the Subject Line, Using ELM

I tried

-s "$VAR"

and it worked too.
A. Clay Stephenson
Acclaimed Contributor

Re: Sending Emails and the Subject Line, Using ELM

Of course, the quotes are what you really needed to handle the whitespace; the curly braces are merely the mark of a disciplined script writer. I always enclose shell variables in {}'s; most of the time they don't matter but, ....
If it ain't broke, I can fix that.