发送给多个收件人 MuleSoft 电子邮件 SMTP

问题描述 投票:0回答:1

我一直在尝试发送给多个收件人,但没有成功。 目前,我定义了一个转换来拆分然后加入收件人字符串,然后将其传递给电子邮件连接器,但它失败了

Error while sending email: Error while creating [email protected],[email protected] InternetAddress

原始变换定义如下:

if((emailString as String) contains "," )
        (emailString as String) splitBy "," joinBy ","
    else if(emailString != "" and emailString != null)
        [emailString]
    else
        null

我想知道是否存在我在检查文档时没有看到的错误或特殊情况。

mule mulesoft mule4 anypoint-studio mule-connector
1个回答
0
投票

您正在拆分包含电子邮件地址的字符串,但随后将结果项重新连接到字符串中。只需将结果数组传递给连接器即可。您可能不需要其他案例。

示例:

vars.emailString splitBy ","

参考:https://help.salesforce.com/s/articleView?id=001114454&type=1

© www.soinside.com 2019 - 2024. All rights reserved.