mailUtil.setSmtpHost(mailInfoObj.getSmtpHost(), StringUtil.getInt(mailInfoObj.getSmtpPort()));
mailUtil.setSmtpAuthentication(mailInfoObj.getUserName(), mailInfoObj.getPassWord());
// 支持发送多人邮件 #4185
String to = fixMailTo.getMailTo();
if (to == null || to.equals("")) {
throw new FixFlowBizException("mailTo is null");
}
String[] str = to.split(",");
List<String> userMailToList=new ArrayList<String>();
for (String userMail : str) {
if(userMail==null||userMail.equals("")||userMail.trim().equals("")){
}
else{
userMailToList.add(userMail);
}
}
if(userMailToList.size()==0){
throw new FixFlowBizException("Mail toaddress is null");
}
String[] userMailToFinStrings=(String[])userMailToList.toArray(new String[userMailToList.size()]);
mailUtil.setTo(userMailToFinStrings);
String cc = fixMailTo.getMailCc();
if (cc != null && !cc.equals("")) {
String[] strCC = cc.split(",");
List<String> userMailCCList=new ArrayList<String>();
for (String userMail : strCC) {
if(userMail==null||userMail.equals("")||userMail.trim().equals("")){
}
else{
userMailCCList.add(userMail);
}
}
if(userMailCCList.size()==0){
throw new FixFlowBizException("Mail ccaddress is null");
}
String[] userMailCCFinStrings=(String[])userMailCCList.toArray(new String[userMailCCList.size()]);