如何从Peopelsoft Application Server测试SMTP设置?

时间:2015-12-22 14:35:57

标签: peoplesoft

我在Application Server和Process Scheduler Server中配置了SMTP设置,以通过电子邮件发送报告。我运行了一个示例报告,在Process Scheduler中对其进行测试。这很好用。如何在应用程序服务器中测试 SMTP设置

1 个答案:

答案 0 :(得分:1)

创建自定义组件和页面,在页面上放置一个按钮。

FieldChange PeopleCode:

Local string &MAIL_CC, &MAIL_TO, &MAIL_BCC, &MAIL_SUBJECT, &MAIL_TITLES, &MAIL_TEXT, &MAIL_FILES, &MAIL_FROM, &REPLYTO, &SENDER;
Local number &MAIL_FLAGS;

&MAIL_FLAGS = 0;
&MAIL_TO = "email-address-message-going-to";
&MAIL_CC = "";
&MAIL_BCC = "";
&MAIL_SUBJECT = "Test email"; 
&MAIL_TEXT = "Sending an email from PeopleCode.";
&MAIL_FILES = "";
&MAIL_TITLES = "";
&MAIL_FROM = "email-address-message-is-from";
&MAIL_SEP = ";";
&CONTTYPE = "";
&REPLYTO = "";
&SENDER = ""; 

&RET = SendMail(&MAIL_FLAGS, &MAIL_TO, &MAIL_CC, &MAIL_BCC, &MAIL_SUBJECT, &MAIL_TEXT, &MAIL_FILES, &MAIL_TITLES, &MAIL_FROM, &MAIL_SEP, &CONTTYPE, &REPLYTO, &SENDER); 

If &RET <> 0 Then
 MessageBox(0, "", 0, 0, "Return code from SendMail= " | &RET);
 /*Do error processing here*/ 
End-If;

如果您需要更强大的测试工具,可以为每个&amp; MAIL_变量向页面添加字段,否则只需对其进行硬编码。