Home » Developer & Programmer » Forms » Senmail didn't work through shell script when trigger from forms (Forms [32 Bit] Version 10.1.2.0.2 (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
dayang_aziz@yahoo.com
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:
Quote:
#!/bin/ksh

# --------------------------------------------------------------------
# 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"
TO=dayangku.masmaryam@lityan.com.my
CC=dayangku.masmaryam@lityan.com.my
(
cat << !
To : ${TO}
Subject : ${SUBJ}
Cc : ${CC}
!
cat << !
HOPE THIS WORKS
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:
Quote:
HOST('cd /home/oramid/dayangTest; ./sendmail2.sh');

Could anyone help me regarding this.

Regards,
Dayang
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
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT 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.

David
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: Sun Sep 25 09:26:47 CDT 2016

Total time taken to generate the page: 0.15294 seconds