Commit 4ec03f7db1576a101d6e719b6a3d9b6cf2d1c1a4
Committed by
GitHub
1 parent
7e0871d5
Update MailPlugin.java
Allows to add multiple e-mail recipients in TO, CC, BCC seperated by "," see https://groups.google.com/forum/#!searchin/thingsboard/attribute%7Csort:date/thingsboard/03V4Out1bgc/XVm9IswTEAAJ
Showing
1 changed file
with
3 additions
and
3 deletions
... | ... | @@ -108,12 +108,12 @@ public class MailPlugin extends AbstractPlugin<MailPluginConfiguration> implemen |
108 | 108 | MimeMessage mailMsg = mailSender.createMimeMessage(); |
109 | 109 | MimeMessageHelper helper = new MimeMessageHelper(mailMsg, "UTF-8"); |
110 | 110 | helper.setFrom(msg.getFrom()); |
111 | - helper.setTo(msg.getTo()); | |
111 | + helper.setTo(msg.getTo().split("\\s*,\\s*")); | |
112 | 112 | if (!StringUtils.isEmpty(msg.getCc())) { |
113 | - helper.setCc(msg.getCc()); | |
113 | + helper.setCc(msg.getCc().split("\\s*,\\s*")); | |
114 | 114 | } |
115 | 115 | if (!StringUtils.isEmpty(msg.getBcc())) { |
116 | - helper.setBcc(msg.getBcc()); | |
116 | + helper.setBcc(msg.getBcc().split("\\s*,\\s*")); | |
117 | 117 | } |
118 | 118 | helper.setSubject(msg.getSubject()); |
119 | 119 | helper.setText(msg.getBody()); | ... | ... |