我正在尝试使用 PeopleCode 中的 SendMail() 发送 html 格式的电子邮件。我正在尝试做的是非常基本的 html 电子邮件(例如粗体文本、href 标记等)。
我们最近升级到 PeopleTools 8.52
当我使用 PeopleBooks 中的默认 SendMail() 示例时,电子邮件以纯文本形式发送,而不管我将内容类型指定为“text/html”。
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 = "laurie_thomas@peoplesoft.com";
&MAIL_CC = "";
&MAIL_BCC = "";
&MAIL_SUBJECT = "Testing SendMail - Are you receiving Attachment?";
&MAIL_TEXT = "This is a test for SendMail function";
&MAIL_FILES = "/data9/ps/e841g2bp/lat/attach.txt";
&MAIL_TITLES = "";
&MAIL_FROM = "peoplesoft@peoplesoft.com";
&MAIL_SEP = ";";
&CONTTYPE = "Content-type: text/html; charset=utf8";
&REPLYTO = "lthomas@peoplesoft.com";
&SENDER = "00972@peoplesoft.com";
&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);
End-If;