在发送电子邮件警报时,我有多个电子邮件组
英语用户的电子邮件组,西班牙语用户的电子邮件组,葡萄牙语用户的电子邮件组
为每个邮件用户组定义了一个模板(使用速度模板)。现在必须将电子邮件警报发送到模板中定义的不同内容的所有 3 个用户组。如何设置出站电子邮件端点并发送电子邮件。
解决方案(收到回复后)
<all doc:name="All">
<processor-chain >
<custom-transformer class="xxx.xxx.xxx.transformer.VelocityMessageTransformer" doc:name="Mails to en_US">
<spring:property name="templateName" value="templates/EMAIL-MESSAGE.vm"/>
</custom-transformer>
<smtps:outbound-endpoint host="smtp.gmail.com" user="myemail%40gmail.com" password="XXXX" responseTimeout="10000" doc:name="SMTP" subject="Mails to en_US" from="myemail@gmail.com" to="myemail@gmail.com"/>
<custom-transformer class="xxx.xxx.xxx.transformer.SetOriginalPayloadTransformer" doc:name="Set Payload to Orignal Payload"/>
<custom-transformer class="xxx.xxx.xxx.transformer.VelocityMessageTransformer" doc:name="Mails to es_ES">
<spring:property name="templateName" value="templates/EMAIL-MESSAGE-Spanish.vm"/>
</custom-transformer>
<smtps:outbound-endpoint host="smtp.gmail.com" user="myemail%40gmail.com" password="XXXX" responseTimeout="10000" doc:name="SMTP" subject="Mails to es_ES" from="myemail@gmail.com" to="myemail@gmail.com"/>
<custom-transformer class="xxx.xxx.xxx.transformer.SetOriginalPayloadTransformer" doc:name="Set Payload to Orignal Payload"/>
<custom-transformer class="xxx.xxx.xxx.transformer.VelocityMessageTransformer" doc:name="Mails to pt_PT">
<spring:property name="templateName" value="templates/EMAIL-MESSAGE-Portugese.vm"/>
</custom-transformer>
<smtps:outbound-endpoint host="smtp.gmail.com" user="myemail%40gmail.com" password="XXXX" responseTimeout="10000" doc:name="SMTP" subject="Mails to pt_PT" from="myemail@gmail.com" to="myemail@gmail.com"/>
<custom-transformer class="xxx.xxx.xxx.transformer.SetOriginalPayloadTransformer" doc:name="Set Payload to Orignal Payload"/>
</processor-chain>
</all>