Page 1 of 1

sending file my email

Posted: Fri Feb 18, 2005 2:10 pm
by bobby
hi,
i have an execl file which i load then i send to client for test data , can i automate that as soon as the job complete it automtically get emailed to them , i mean any automatic process i can do.
thanks
bobby

Re: sending file my email

Posted: Fri Feb 18, 2005 2:15 pm
by vcannadevula
bobby wrote:hi,
i have an execl file which i load then i send to client for test data , can i automate that as soon as the job complete it automtically get emailed to them , i mean any automatic process i can do.
thanks
bobby

Once the job for load is complete you can use the after routine to execute a shell script to mail the file to the specified person. use the MailX command for sending the mail with an attachment.

If you are sending a mail to just let them know the loaded file is there, then Use Notification activity.

Posted: Fri Feb 18, 2005 2:22 pm
by bobby
Hi,
I want to send that file so u mean routine activity i should use , can u advise wht routine name as i have not seen any mail in there
thanks
bobby

Posted: Fri Feb 18, 2005 2:28 pm
by vcannadevula
bobby wrote:Hi,
I want to send that file so u mean routine activity i should use , can u advise wht routine name as i have not seen any mail in there
thanks
bobby

if you want to send the file as an attachement, call the shell script from the routine activity or from after subroutine.

In the shellscript write the MailX command

Posted: Fri Feb 18, 2005 2:29 pm
by Sainath.Srinivasan
You need to use sendmail routine.

Posted: Fri Feb 18, 2005 2:31 pm
by vcannadevula
vcannadevula wrote:
bobby wrote:Hi,
I want to send that file so u mean routine activity i should use , can u advise wht routine name as i have not seen any mail in there
thanks
bobby

if you want to send the file as an attachement, call the shell script from the routine activity or from after subroutine.

In the shellscript write the MailX command

Use the ExecSH

Posted: Fri Feb 18, 2005 2:35 pm
by vcannadevula
Sainath.Srinivasan wrote:You need to use sendmail routine.

SendMail routine will not handle the Attachment. So, use the shell script to do that.

Posted: Fri Feb 18, 2005 2:38 pm
by bobby
sri
u said DSsend in valueexpression should i give path of tht file
thanks
bobby

Posted: Fri Feb 18, 2005 2:46 pm
by Sainath.Srinivasan
sendmail is an Unix command that you can use to send with attachment. This is the underlying command called by dssendmail routine.

Posted: Fri Feb 18, 2005 3:08 pm
by bobby
hi
i did this ,its not working i went to EXECSH and in input i wrote

$mail bobby@express.com</datastage01/nin/Act_Sub.csv
thanks
bobby

Posted: Fri Feb 18, 2005 3:18 pm
by Sainath.Srinivasan
Does that work from command prompt?

Posted: Fri Feb 18, 2005 3:26 pm
by vcannadevula
bobby wrote:hi
i did this ,its not working i went to EXECSH and in input i wrote

$mail bobby@express.com</datastage01/nin/Act_Sub.csv
thanks
bobby


mailx -s "ur subject" -c 'any CC address' 'TO address' < /tmp/email.msg


Use the above command. The last part is the path of the file you want to attach and email.msg is the file being attached here in this example which is located in /tmp folder.

Posted: Fri Feb 18, 2005 3:38 pm
by bobby
this command give me whole body of excel file i want attachment
$mail bobby@express.com</datastage01/nin/Act_Sub.csv

Posted: Fri Feb 18, 2005 3:44 pm
by vcannadevula
bobby wrote:this command give me whole body of excel file i want attachment
$mail bobby@express.com</datastage01/nin/Act_Sub.csv

cat /datastage01/nin/Act_Sub.csv >> /tmp/email.msg
mailx -s "$SUBJECT" -c $CCADDRESS $TOADDRESS < /tmp/email.msg