0

当记录数为 0 时,我正在尝试从 hyperion 服务器发送电子邮件。我正在 onPostProcess() 中编写脚本代码。

var dtm_current = new Date();
Application.ExecuteBScript("Set BrioQuery, Mail, 'Internet Mail', mailserverwithoutquotes,fromid'"); //note that mailserver name is given without quotes and 
//from id does nt have starting quote
Application.ExecuteBScript("Export Section Root.'Results', OfficeMHTML, 'job_output', Silent, email, 'Testing Email action', 'This is a test of the email action. \n\n\n', UTF-8, To, tomailid'");
Console.Writeln ( "Post Process Script complete:"+dtm_current );

我收到错误将“结果”部分作为“Microsoft Office Web 存档”通过电子邮件发送到:com

导出失败。错误:连接未能找到主机 127.0.0.1。SMTP 服务器在端口 25 上吗?(错误码=146)

我有问题:为什么它试图连接到本地主机而不是指定的电子邮件服务器

4

1 回答 1

0

我有这个工作。

var dtm_current = 新日期();Application.ExecuteBScript("设置 BrioQuery, Mail, 'Internet Mail', emailserverwithoutquotes,'fromemailid'"); var count =1* ActiveDocument.Sections['R-Results'].RowCount;

Console.Writeln(count); if(count > 0){ Application.ExecuteBScript("Export Section Root.'R-Results', csv, 'job_output', Silent, email, 'Testing Email action if', '这是对email action if的测试。 \n\n\n', UTF-8, To, 'tomailid'"); } else{ Application.ExecuteBScript("Export Section Root.'R-Results', csv, 'job_output', Silent, email, 'Testing Email action else', '这是对email action else的测试。\n\n \n', UTF-8, To, 'tomailid'"); }

于 2012-07-10T23:15:11.347 回答