Page 1 of 1

Urgent help on using mailx on UNIX

Posted: Tue Dec 17, 2002 8:28 am
by nilotpalr
Hi All,
I need to execute the mailx command on unix from data stage
I am unable to append my Message body;
My Command is:
MailCmd = "mailx -s " : ArgSubject : " " : "abc@hotmail.com " : "n" : ArgMessageBody
But i am not getting the mail. I have also tried replacing "n" with CHAR(13) but without success. Can any one suggest how to append the message body to mailx command

Thanks,
Nilotpal.

Posted: Tue Dec 17, 2002 9:50 am
by chulett
I'd suggest writing a script to call 'mailx' and then call the script from DataStage, passing in your variables as parameters. It works fine for us and we end up having alot more control over the contents of the email that way.

-craig

Posted: Tue Dec 17, 2002 2:35 pm
by jseclen
Hi Nilotpal

I use the mailx with the follow sintax:

> mailx -s 'Subject' 'Email_Address' < /msgs/NomArch.txt

Where /msgs/NomArch.txt contains the body email text..

I hope this help



Miguel Seclen
Lima - Peru