Package org.olat.core.util.mail

Examples of org.olat.core.util.mail.Emailer.sendEmail()


      if (logFileEntries != null) {
        for (Iterator iter = logFileEntries.iterator(); iter.hasNext();) {
          out.append((String) iter.next());
        }
      }
      emailer.sendEmail(WebappHelper.getMailConfig("mailSupport"), "Feedback from Error Nr.: " + errorNr, request.getParameter("textarea")
          + "\n------------------------------------------\n\n --- from user: "+username+" ---" + out.toString());
    } catch (AddressException e) {
      // error in recipient email address(es)
      handleException(request, e);
      return;
View Full Code Here


          if(cntctForm.getCheckBoxElement("tcpfrom").isChecked()) {
            ContactList contactList = new ContactList(translate("contact.list.sender"));
            contactList.add(emailFrom);                                            
             cntctForm.addEmailTo(contactList);
          }
          success = emailer.sendEmail(cntctForm.getEmailToContactLists(), cntctForm.getSubject(), cntctForm.getBody());
        } catch (AddressException e) {
          //error in recipient email address(es)
          handleAddressException(success);
          //no return here, depending on boolean success there are
          //events to fire
View Full Code Here

    List<ContactList> lstAddrTO = new ArrayList<ContactList>();
    lstAddrTO.add(cl);
   
    Emailer mailer = new Emailer(ureq.getLocale());
    try {
      mailer.sendEmail(lstAddrTO, subject, body);
    } catch (AddressException e) {
      Tracing.createLoggerFor(BulkDeleteController.class).error("Notificatoin mail for bulk deletion could not be sent");
    } catch (MessagingException e) {
      Tracing.createLoggerFor(BulkDeleteController.class).error("Notificatoin mail for bulk deletion could not be sent");
    }
View Full Code Here

    body = this.translator.translate("email.change.body", new String[] { serverpath + "/dmz/emchange/index.html?key=" + tk.getRegistrationKey() + "&lang=" + ureq.getLocale().getLanguage(), time })
        + SEPARATOR + this.translator.translate("email.change.wherefrom", new String[] { serverpath, today, ip });
    subject = translate("email.change.subject");
    // send email
    try {
      boolean isMailSent = mailer.sendEmail(changedEmail, subject, body);
      if (isMailSent) {
        tk.setMailSent(true);
        // set key
        User user = this.identityToModify.getUser();
        user.setProperty("emchangeKey", tk.getRegistrationKey());
View Full Code Here

   
    Emailer emailer = new Emailer(locale);
    String subject = translator.translate(emailI18nSubkey+".subject");
    String body = translator.translate(emailI18nSubkey+".body");
    try {
      emailer.sendEmail(email, subject, body);
    } catch (AddressException e) {
      log_.error("Error sending information email to user that file was saved successfully.", e);
    } catch (SendFailedException e) {
      log_.error("Error sending information email to user that file was saved successfully.", e);
    } catch (MessagingException e) {
View Full Code Here

          body = getTranslator().translate("reg.body",
              new String[] { serverpath, tk.getRegistrationKey(), I18nManager.getInstance().getLocaleKey(ureq.getLocale()) })
              + SEPARATOR
              + getTranslator().translate("reg.wherefrom", new String [] { serverpath, today, ip });
          try {
            if (mailer.sendEmail(email, translate("reg.subject"), body)) isMailSent = true;
          } catch (Exception e) {
            // nothing to do, emailSent flag is false, errors will be reported to user
          }
        } else {
          // a user exists, this is an error in the registration page
View Full Code Here

          // send email
          Identity identity = UserManager.getInstance().findIdentityByEmail(email);
          body = translate("login.body", identity.getName()) + SEPARATOR
              + getTranslator().translate("reg.wherefrom", new String[] { serverpath, today, ip });
          try {
            isMailSent = mailer.sendEmail(email, translate("login.subject"), body);
          } catch (Exception e) {
            // nothing to do, emailSent flag is false, errors will be reported to user
          }
        }
        if (isMailSent) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.