Package de.chris_soft.fyllgen.utilities

Examples of de.chris_soft.fyllgen.utilities.MailTools


    /**
     * Send mail with ZIP-File to given mail address.
     */
    private void sendMail(String zipFilename, String mail, long documentNumber) {
      MailTools mt = new MailTools();
      String from = OptionData.instance.getString(OptionData.EXPORT_MAIL);
      String subject = OptionData.instance.getString(OptionData.EXPORT_TITLE).replace("#TITLE#", "" + documentNumber);
      String password = OptionData.instance.getExportPassword(true);
      String text = OptionData.instance.getString(OptionData.EXPORT_TEXT);
      mt.setFrom(from);
      mt.setPassword(password);
      mt.setSubject(subject);
      mt.setText(text);
      mt.addTO(mail);
      mt.addAttachment(zipFilename);
      boolean sendMailError = false;
      try {
        if (!mt.sendMail()) {
          sendMailError = true;
        }
      }
      catch (Exception exc) {
        sendMailError = true;
View Full Code Here

TOP

Related Classes of de.chris_soft.fyllgen.utilities.MailTools

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.