Operating System - HP-UX
1748089 Members
5044 Online
108758 Solutions
New Discussion юеВ

Re: Empty subject when using mailx.

 
SOLVED
Go to solution
Adnane_1
Occasional Advisor

Re: Empty subject when using mailx.

Hi Folks,
Yes Pat I do have #!/bin/ksh.

Just to mention that my script is working perfectly in the DEV server, the problem occur on another UNIX HP server.

Thanks.
Pat Lieberg
Valued Contributor

Re: Empty subject when using mailx.

I'm kind of at a loss what to try next, but you might look at the permissions of both the script and the /bin/ksh file.

Sorry I wasn't more help.
Rita C Workman
Honored Contributor

Re: Empty subject when using mailx.

hmmm... I just did this:

#subject=Testing...
#echo $subject

..it echo'd properly..

#mailx -s $subject rworkman@mydomain.com < /dev/null

and then I

#mail -s $subject rworkman@mydomain.com
.

...and they both went to my email reflecting a subject of ... Testing...


Yeppers...drop the {}

Rgrds,
Rita
Dave La Mar
Honored Contributor
Solution

Re: Empty subject when using mailx.

Adnane-
Though I feel your question on the blank subject has been answered, I am attaching a list of different uses of mailx that are used in out shop. Should you still be having a problem, try an example from that attached.

Best of luck.

Regards,

dl
"I'm not dumb. I just have a command of thoroughly useless information."
Adnane_1
Occasional Advisor

Re: Empty subject when using mailx.

Thanks to all of you.

I removed the /dev/null because it seems causing the problem in the subject.

Now I'm using the mailx command :

echo "$EMAIL_SUBJ" | mailx -s"$EMAIL_SUBJ" "$recipient"


Adnane.
Adnane_1
Occasional Advisor

Re: Empty subject when using mailx.

Removed the /dev/null

and using the mailx command as:

echo "$EMAIL_SUBJ" | mailx -s"$EMAIL_SUBJ" "$recipient"
Muthukumar_5
Honored Contributor

Re: Empty subject when using mailx.

Which mailx version you are using. I have tried with /dev/null it is working for me. Ok. You are decided to leave /dev/null. ;) It is not needed at all.

hth.
Easy to suggest when don't know about the problem!
Muthukumar_5
Honored Contributor

Re: Empty subject when using mailx.

Adnane,

I hope you are a new number. Try to assin points to those spent time with you. Hope you know the way to give points.

thx.
Easy to suggest when don't know about the problem!