Home » Developer & Programmer » Forms » Senmail didn't work through shell script when trigger from forms (Forms [32 Bit] Version (Production), unix)
Senmail didn't work through shell script when trigger from forms [message #420739] Tue, 01 September 2009 23:27 Go to next message
Messages: 19
Registered: August 2009
Junior Member
Hi All,

I have a shell script to send email. I manage to run the script when I telnet to the server and called the script directly and I got email in my inbox.

However, when I call the script through froms when trigger WHEN-BUTTON-PRESSED, the script ran but I didnt get the email.

Here is the script:

# --------------------------------------------------------------------
# Script: unix_mail_withattachments.ksh
# Aurthor: Ravin Maharaj
# Purpose: Use sendmail to e-mail messages from Unix with
# --------------------------------------------------------------------

mkdir start

SUBJ="Send mail from Unix with file attachments"
cat << !
To : ${TO}
Subject : ${SUBJ}
Cc : ${CC}
cat << !
Hello world.

) | sendmail ${TO} ${CC}

mkdir ${TO}

The script was successfully executed because there are two directory created at the server name start and dayangku.masmaryam@lityan.com.my. Somehow, I wonder why the sendmail function didn't work.

This is the code at trigger:
HOST('cd /home/oramid/dayangTest; ./sendmail2.sh');

Could anyone help me regarding this.

Re: Senmail didn't work through shell script when trigger from forms [message #423029 is a reply to message #420739] Mon, 21 September 2009 20:03 Go to previous message
Messages: 10180
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Have you solved your problem?

Remember, each script starts in a NEW session. Therefore, if the default path does not contain the directory holding the script then you need to set up the environment.

Previous Topic: diffcult issue in accessing Lob object and functions?
Next Topic: Can any one solve it. List Item disappears when i set it type to combo
Goto Forum:

Current Time: Fri Jul 21 05:35:40 CDT 2017

Total time taken to generate the page: 0.19231 seconds