Urgent help on using mailx on UNIX

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
nilotpalr
Participant
Posts: 29
Joined: Tue Dec 10, 2002 2:54 am

Urgent help on using mailx on UNIX

Post 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.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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
jseclen
Participant
Posts: 133
Joined: Wed Mar 05, 2003 4:19 pm
Location: Lima - Peru. Sudamerica
Contact:

Post 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
Post Reply