发送模板邮件

1、数字化建模-消息平台-消息通道里,配上发邮件的邮箱

图1

2、数字化建模-消息平台-消息模板,配上发邮件的模板

图2

图3

图4

3、在函数设计页面

图5

 let AbstractTrigger = require('AbstractTrigger');
 class MyTrigger extends AbstractTrigger {
     execute(context, param) {

         var mailReceiver = ["xxx@yonyou.com"];
         var templateCode = "test0008##F98VJn3s";
         var channels = ["mail"];
         var busiData = {
             "name": "guoxgui"
         }

         var messageInfo = {
             'sysId': 'diwork',
             'tenantId': 'wezq3vfl',
             'templateCode': templateCode,
             'busiData': busiData,
             'mailReceiver': mailReceiver,
             'channels': channels,
         };
         var result = sendMessage(messageInfo);
         return {
             result
         };
         // throw new Error(result);
     }
 }
 exports({
     "entryPoint": MyTrigger
 });

4、结果验证

图6

Copyright © 用友 -【生态技术部】 2021 all right reserved,powered by Gitbook修订时间: 2022-01-18 14:55:15

results matching ""

    No results matching ""