Package org.sonatype.micromailer

Examples of org.sonatype.micromailer.MailRequestStatus


    StringBuilder body = new StringBuilder();
    body.append("Your current SMTP configuration is valid!");

    request.getBodyContext().put(DefaultMailType.BODY_KEY, body.toString());

    MailRequestStatus status = emailer.sendSyncedMail(request);

    if (status.getErrorCause() != null) {
      log.error("Unable to send e-mail", status.getErrorCause());
      throw new EmailerException("Unable to send e-mail", status.getErrorCause());
    }

    return status.isSent();
  }
View Full Code Here


        "Mail requestId[%s] not sent, SMTP not configured", request.getRequestId()
    );

    LOG.debug(message);

    final MailRequestStatus status = new MailRequestStatus(request);
    status.setErrorCause(new EmailerException(message));
    return status;
  }
View Full Code Here

    final MailRequest request = //
    nexusEmailer.getDefaultMailRequest(subject, message);

    request.getToAddresses().add(new Address(email));

    final MailRequestStatus status = nexusEmailer.sendMail(request);

    if (status.isSent()) {
      return;
    }

    log.error("failed to send email", status.getErrorCause());

  }
View Full Code Here

    final MailRequest request = //
    nexusEmailer.getDefaultMailRequest(subject, message);

    request.getToAddresses().add(new Address(email));

    final MailRequestStatus status = nexusEmailer.sendMail(request);

    if (status.isSent()) {
      return;
    }

    log.error("failed to send email", status.getErrorCause());

  }
View Full Code Here

TOP

Related Classes of org.sonatype.micromailer.MailRequestStatus

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.