You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2014/01/06 10:18:16 UTC
[3/3] git commit: CAMEL-7105 polish the code of SesProducer
CAMEL-7105 polish the code of SesProducer
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/6f745008
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/6f745008
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/6f745008
Branch: refs/heads/master
Commit: 6f7450080986f21d8ef92158b790142bc2df3800
Parents: 7433af4
Author: Willem Jiang <wi...@gmail.com>
Authored: Mon Jan 6 17:15:52 2014 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Mon Jan 6 17:15:52 2014 +0800
----------------------------------------------------------------------
.../java/org/apache/camel/component/aws/ses/SesProducer.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/6f745008/components/camel-aws/src/main/java/org/apache/camel/component/aws/ses/SesProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/ses/SesProducer.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/ses/SesProducer.java
index 4ba0630..78a0295 100644
--- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/ses/SesProducer.java
+++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/ses/SesProducer.java
@@ -64,9 +64,9 @@ public class SesProducer extends DefaultProducer {
private com.amazonaws.services.simpleemail.model.Message createMessage(Exchange exchange) {
com.amazonaws.services.simpleemail.model.Message message = new com.amazonaws.services.simpleemail.model.Message();
- Boolean isHtmlEmail = exchange.getIn().getHeader(SesConstants.HTML_EMAIL, Boolean.class);
+ Boolean isHtmlEmail = exchange.getIn().getHeader(SesConstants.HTML_EMAIL, false, Boolean.class);
String content = exchange.getIn().getBody(String.class);
- if (isHtmlEmail != null && isHtmlEmail) {
+ if (isHtmlEmail) {
message.setBody(new Body().withHtml(new Content().withData(content)));
} else {
message.setBody(new Body().withText(new Content().withData(content)));