use of com.amazonaws.services.simpleemail.model.SendRawEmailResult in project camel by apache.
the class AmazonSESClientMock method sendRawEmail.
@Override
public SendRawEmailResult sendRawEmail(SendRawEmailRequest sendRawEmailRequest) throws AmazonServiceException, AmazonClientException {
this.sendRawEmailRequest = sendRawEmailRequest;
SendRawEmailResult result = new SendRawEmailResult();
result.setMessageId("1");
return result;
}
use of com.amazonaws.services.simpleemail.model.SendRawEmailResult in project camel by apache.
the class SesProducer method process.
public void process(Exchange exchange) throws Exception {
if (!(exchange.getIn().getBody() instanceof javax.mail.Message)) {
SendEmailRequest request = createMailRequest(exchange);
log.trace("Sending request [{}] from exchange [{}]...", request, exchange);
SendEmailResult result = getEndpoint().getSESClient().sendEmail(request);
log.trace("Received result [{}]", result);
Message message = getMessageForResponse(exchange);
message.setHeader(SesConstants.MESSAGE_ID, result.getMessageId());
} else {
SendRawEmailRequest request = createRawMailRequest(exchange);
log.trace("Sending request [{}] from exchange [{}]...", request, exchange);
SendRawEmailResult result = getEndpoint().getSESClient().sendRawEmail(request);
log.trace("Received result [{}]", result);
Message message = getMessageForResponse(exchange);
message.setHeader(SesConstants.MESSAGE_ID, result.getMessageId());
}
}
Aggregations