alexpreyer
17th March 2004, 10:46
Hello,
I searched the forum but found nothing to solve my problem.
I want to start a unix shell script after printing a report. Is it possible to do this over the device and not over the report script?
In my case I have a session which creates some reports and I want to sent them automatically in one mail.
Thanks
Alex Preyer
mark_h
17th March 2004, 15:26
I know you can write your own device driver and with this email the reports out. You can search on the board for email solutions, the only problem is that I am not sure anyone handles multiple reports with one email.
How are you planning the session to run? If in batch mode then you could run the session and send all the reports to a directory, then have a second session which pulls those reports into one mail message. If this session is run by a user then you can create a new API session to run this session in the background and send the reports to a directory. The last step in the API session would be to mail the newly created reports.
I have sent mail messages from Baan using mailx, but never tried doing an attachment.
Just some thoughts!
Mark
alexpreyer
17th March 2004, 15:34
We have session running here which sending mails over mailx with attachments. Thats not my problem.
What I want to do is to offer a printer to the users which will send the reports to a defined email-adress without changing the scripts of the reports.
Is it possible to create a new printer in Baan and starting the script over the shell script field? But when I do this I have to convert the output with my script because ttstpconv is not used. Is this a possible way.
Thanks
Alex
goooch
17th March 2004, 16:35
Hi alexpreyer
I think you may explore print device queue
Francesco
17th March 2004, 18:15
Originally posted by alexpreyer
But when I do this I have to convert the output with my script because ttstpconv is not used. Is this a possible way.
Hi Alex,
You will have to use ttstpconv unless you are planning on sending raw printer data as an email attachment.
But say for instance that you want your attachments in rtf format, you can chose a device type 4 printer with the ttstpconv conversion program and the following line in the argument:
RTF\mail.ksh %s your.email@foo.com
Where mail.ksh is the mailx script that you are already using, assuming that it takes the file and email arguments in this order.
mark_h
17th March 2004, 20:10
Here is a post (http://www.baanboard.com/baanboard/showthread.php?s=&threadid=513) which is an example of writing your own device driver. You can see one of the steps is activating ttstpconv to convert the report. Or as Fransesco says you can convert to other formats. You device driver could also then call the mail.ksh script.
Mark
alexpreyer
18th March 2004, 12:06
@Francesco
I want to try first your suggestion.
Where has the mailscript to be that it will be executed (Path)?
@mark_h
I took a look on your script and it looks like it has many possibilities for me. Have I compile it as a 3GL Programm?
Thanks all for your help
Alex
mark_h
18th March 2004, 16:17
Yes it is setup as a 3gl program.
Mark
Gert Verheyen
17th June 2004, 13:03
Hi,
We are using Triton 3.1
some of our reports are send to our novell server via a script.
I use ttstpconv, or a piece of software that converts pcl to pdf, and send that via mail, or ftp or whatever to elsewere.
Or I just send the document via a device to a script, without ttstpconv. But in that case I use an own printer driver without printer Esc sequences.
is that what you want? is your question still open?
We also build our own Triton screen interface in between, where it is possible to fill a number of field. For instance a number of e-mail addresses or fax numbers where you want to send the document to. In that case we always deliver pdf's.
I stop writing now. I first need to know if your question is still open.
regards,
Gert Verheyen.