* if the mailhost was not set in the olat_config.xml, we assume that no
* emailing is wished.
*/
if (MailHelper.getMailhost() == null || MailHelper.getMailhost().equals("") || ((MailHelper.getMailhost() instanceof String) && ((String)MailHelper.getMailhost()).equalsIgnoreCase("disabled"))) return false;
MimeMessage msg = MailHelper.createMessage();
msg.setFrom(new InternetAddress(this.mailfrom));
msg.setSubject(subject, "utf-8");
msg.setText(body + footer, "utf-8");
msg.setSentDate(new Date());
Iterator iter = listOfContactLists.iterator();
while (iter.hasNext()) {
ContactList tmp = (ContactList) iter.next();
InternetAddress groupName[] = InternetAddress.parse(tmp.getRFC2822Name() + ";");
InternetAddress members[] = tmp.getEmailsAsAddresses();
msg.addRecipients(RecipientType.TO, groupName);
msg.addRecipients(RecipientType.BCC, members);
}
msg.saveChanges();
MailerResult result = new MailerResult();