diff --git a/moto/ses/responses.py b/moto/ses/responses.py
index 5002f925..6640d76b 100644
--- a/moto/ses/responses.py
+++ b/moto/ses/responses.py
@@ -36,7 +36,10 @@ class EmailResponse(BaseResponse):
return template.render()
def send_email(self):
- body = self.querystring.get('Message.Body.Text.Data')[0]
+ bodydatakey = 'Message.Body.Text.Data'
+ if 'Message.Body.Html.Data' in self.querystring:
+ bodydatakey = 'Message.Body.Html.Data'
+ body = self.querystring.get(bodydatakey)[0]
source = self.querystring.get('Source')[0]
subject = self.querystring.get('Message.Subject.Data')[0]
destination = self.querystring.get('Destination.ToAddresses.member.1')[0]
diff --git a/tests/test_ses/test_ses.py b/tests/test_ses/test_ses.py
index 4c0440c4..6b8f357d 100644
--- a/tests/test_ses/test_ses.py
+++ b/tests/test_ses/test_ses.py
@@ -54,7 +54,21 @@ def test_send_email():
send_quota = conn.get_send_quota()
sent_count = int(send_quota['GetSendQuotaResponse']['GetSendQuotaResult']['SentLast24Hours'])
sent_count.should.equal(1)
+
+@mock_ses
+def test_send_html_email():
+ conn = boto.connect_ses('the_key', 'the_secret')
+ conn.send_email.when.called_with(
+ "test@example.com", "test subject",
+ "test body", "test_to@example.com", format="html").should.throw(BotoServerError)
+
+ conn.verify_email_identity("test@example.com")
+ conn.send_email("test@example.com", "test subject", "test body", "test_to@example.com", format="html")
+
+ send_quota = conn.get_send_quota()
+ sent_count = int(send_quota['GetSendQuotaResponse']['GetSendQuotaResult']['SentLast24Hours'])
+ sent_count.should.equal(1)
@mock_ses
def test_send_raw_email():