Package org.openntf.domino.email

Examples of org.openntf.domino.email.DominoEmail


    RichTextStyle rts = s.createRichTextStyle();
    rts.setBold(BoldStyle.ISBN_9780133258936);
  }

  public static void sendMail(String p_HTML) {
    DominoEmail myEmail = new DominoEmail();
    ArrayList<String> to = new ArrayList<String>();
    to.add("paulswithers@hotmail.co.uk");
    to.add("tmalone@intec.co.uk");
    to.add("pwithers@intec.co.uk");
    myEmail.setTo(to);
    myEmail.addHTML(p_HTML);
    myEmail.send();
  }


      Session s;
      Database db;
      if (this.session != null) {
        s = this.session;
        db = this.database;
        DominoEmail myEmail = new DominoEmail();
        myEmail.createSimpleEmail("pwithers@intec.co.uk", "", "", "OpenNTF Domino Email",
            "Please find attached an email from OpenNTF Domino API", "");
      }
    } catch (Throwable t) {

    }

    helper.process(sourceCollection);
    ExtLibUtil.getViewScope().put("javaTest", "Done");
  }

  public void sendSimpleEmail() {
    DominoEmail myEmail = new DominoEmail();
    myEmail.createSimpleEmail(Factory.getSession().getEffectiveUserName(), "", "", "OpenNTF Domino API Email",
        "this is an email from Java in the OpenNTF Domino API", "");
  }

    myEmail.createSimpleEmail(Factory.getSession().getEffectiveUserName(), "", "", "OpenNTF Domino API Email",
        "this is an email from Java in the OpenNTF Domino API", "");
  }

  public void sendComplexEmail() {
    DominoEmail myEmail = new DominoEmail();
    ArrayList<String> sendTo = new ArrayList<String>();
    sendTo.add("pwithers@intec.co.uk");
    myEmail.setTo(sendTo);
    ArrayList<String> cc = new ArrayList<String>();
    cc.add("user@domain.com");
    cc.add("anotheruser@domain.com");
    myEmail.setCC(cc);
    ArrayList<String> bcc = new ArrayList<String>();
    bcc.add("user3@domain.com");
    myEmail.setBCC(bcc);
    myEmail.setSubject("Your notification");
    StringBuilder body = new StringBuilder();
    body.append("<h1>Hi!</h1>");
    body.append("<table>");
    body.append("<tbody>");
    body.append("<tr>");
    body.append("<td>contents in a table here</td>");
    body.append("</tr>");
    body.append("</tbody>");
    body.append("</table>");
    myEmail.addHTML(body);
    myEmail.addFileAttachment("c:/temp/report.pdf", "report.pdf", false);
    myEmail.setSenderEmail("pwithers@intec.co.uk");
    myEmail.setSenderName("Paul Withers");
    myEmail.send();
  }

TOP

Related Classes of org.openntf.domino.email.DominoEmail

Copyright © 2018 www.massapicom. 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.