1752604 Members
4442 Online
108788 Solutions
New Discussion юеВ

elm mailing address

 
SOLVED
Go to solution
Thi Vu
Frequent Advisor

elm mailing address

Hello everyone,

I wrote a script that will notify, using elm, a group whenever the process error out. However, the email address for that group has a space in between (i.e news group@host.ca). How can I do this? I had try this:
mailgrp=`"news group@host.ca"`
elm -s "error message" ${mailgrp}

but elm expand the email address to: news@host.ca and group@host.ca and there's no such email address as that.

Any help is greatly appreciate. Thanks

Thi
4 REPLIES 4
Steven E. Protter
Exalted Contributor

Re: elm mailing address

Not to knock your technique but this code works well for me.

if **** error condition ****
# create message file
cat message | mailx -s "Error Report" steve@somedomain.net

fi

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
James A. Donovan
Honored Contributor
Solution

Re: elm mailing address

Did you try enclosing the ${mailgrp} inside quotes?

elm -s "error message" "${mailgrp}"

Remember, wherever you go, there you are...
A. Clay Stephenson
Acclaimed Contributor

Re: elm mailing address

Your problem has nothing to do with elm and everything to do with the shell. ${mailgrp} when passed to elm (or any other command) expands to two arguments but "${mailgrp}" expands to only one.
If it ain't broke, I can fix that.
Chushia
Frequent Advisor

Re: elm mailing address

Hi there,

I got the same problem but now I found a solution.

In your /etc/mail/sendmail.cf
uncomment the line:
0 OldStyleHeaders=True

And then use "" around the address that has a space, sendmail should go.