Example usage for com.amazonaws.services.simpleemail AmazonSimpleEmailServiceClient getSendQuota

List of usage examples for com.amazonaws.services.simpleemail AmazonSimpleEmailServiceClient getSendQuota

Introduction

In this page you can find the example usage for com.amazonaws.services.simpleemail AmazonSimpleEmailServiceClient getSendQuota.

Prototype

@Override
    public GetSendQuotaResult getSendQuota() 

Source Link

Usage

From source file:net.smartcosmos.plugin.service.aws.email.AwsEmailService.java

License:Apache License

@Override
public boolean isHealthy() {
    try {/*from ww  w  .  jav a 2s  . co  m*/
        AmazonSimpleEmailServiceClient client = new AmazonSimpleEmailServiceClient(credentials);
        client.getSendQuota();
        return true;
    } catch (Exception e) {
        return false;
    }
}

From source file:org.openchain.certification.utility.EmailUtility.java

License:Apache License

@SuppressWarnings("unused")
private static void logMailInfo(AmazonSimpleEmailServiceClient client, ServletConfig config) {
    logger.info("Email Service Name: " + client.getServiceName());
    List<String> identities = client.listIdentities().getIdentities();
    for (String identity : identities) {
        logger.info("Email identity: " + identity);
    }//from   w ww.j av  a  2 s . co  m
    List<String> verifiedEmails = client.listVerifiedEmailAddresses().getVerifiedEmailAddresses();
    for (String email : verifiedEmails) {
        logger.info("Email verified email address: " + email);
    }
    GetSendQuotaResult sendQuota = client.getSendQuota();
    logger.info("Max 24 hour send=" + sendQuota.getMax24HourSend() + ", Max Send Rate="
            + sendQuota.getMaxSendRate() + ", Sent last 24 hours=" + sendQuota.getSentLast24Hours());
}