从批处理文件(或计划任务)运行Ostendo脚本

时间:2017-02-16 02:31:02

标签: batch-file pascal

我在Ostendo写了一个发送电子邮件的脚本。从Ostendo中运行脚本时,这很好用。但是当我尝试从批处理文件运行脚本时它不起作用:

Ostendo脚本:

Const
TheEmailHostName = 'intmail.company.com';
TheEmailSenderAddress = 'simon.k@company.com';
TheUserEmail= 'Email Message Test';
TheRecipientsEmail = 'simon.k@company.com';

Var
TheEmailSubject, TheEmailBody:                   String;

Begin
TheEmailSubject := 'In stock quantity of Item code CUSTOMPURCHASE does not equal zero';
TheEmailBody := 'Please correct this so the quantity equals zero. Please refer to the SOP which can be found in ...';

SendEmailMessage(TheEmailHostName,TheEmailSenderAddress,TheRecipientsEmail,TheEmailSubject,TheEmailBody);
//Showmessage('There are ' + QueryResult + ' in stock of CUSTOMPURCHASE')


End

批处理文件是:

Z:\ostendo.exe STARTUPID:Demo Script=SK - Test Email

“Demo”是Ostendo数据库的名称; “SK - Test Email”是Ostendo中脚本的名称

没有出现错误。它只是不发送电子邮件。它无法在桌面或网络上运行。

0 个答案:

没有答案
相关问题