micku_100
11th December 2008, 06:23
Hi,

I am using following command in my script:

cmd = "/usr/bin/mailx -s ""MAIL SUBJECT"" ramakrishnan.p@patni.com < bodymessage"

rc = shell(cmd, SHELL_CONFIRM)

When the system opens the Terminal Emulator it gives error:
sh:bodymessage: can not open

I am enclosing the document contating the error message.

Why sh can not be opened? we are using KSH.

The problem is the email is not getting fired.
I tried even run.prg("mailx..) still email is not getting fired

Can anybody help me out?

Regards,
Nilesh

bdittmar
11th December 2008, 10:42
Hi,

I am using following command in my script:

cmd = "/usr/bin/mailx -s ""MAIL SUBJECT"" ramakrishnan.p@patni.com < bodymessage"

rc = shell(cmd, SHELL_CONFIRM)

When the system opens the Terminal Emulator it gives error:
sh:bodymessage: can not open

I am enclosing the document contating the error message.

Why sh can not be opened? we are using KSH.

The problem is the email is not getting fired.
I tried even run.prg("mailx..) still email is not getting fired

Can anybody help me out?

Regards,
Nilesh

Hello,

Try :

string sh.cmd(200)

function create.shell.command.for.mail()
{
sh.cmd = "mailx "
&"-s "
&strip$(subject)
&" -r "
&strip$(receipient)
&" "
&strip$(sender)
&" < "
&strip$(path.file)

}

ret.mail = shell(sh.cmd, 64)