Unverified Commit e42d2aa5 authored by 乔占卫's avatar 乔占卫 Committed by GitHub
Browse files

Merge pull request #35 from Baoqi/dev_dont_send_email_when_no_recipts

 before send mail, check whether no receivers && cc receivers
parents 6fcfb7b2 4fbd9380
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -104,6 +104,10 @@ public class MailUtils {
        Map<String,Object> retMap = new HashMap<>();
        retMap.put(Constants.STATUS, false);
        
        // if there is no receivers && no receiversCc, no need to process
        if (CollectionUtils.isEmpty(receivers) && CollectionUtils.isEmpty(receiversCc)) {
            return retMap;
        }

        receivers.removeIf((from) -> (StringUtils.isEmpty(from)));