#!/usr/bin/env python
import boto.ses
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText


def ses_send_html_mail(
	htmlFile="foobar.html",
	subject="example",
	send_from="from@example.com",
	send_to=["to@example.com"],
	aws_region="us-west-2"):

	message = MIMEMultipart()
	message["Subject"] = subject
	message["From"] = send_from
	message["To"] = send_to # can be string or list of strings

	html = open(htmlFile, 'r').read()
	attachment = MIMEText(html, 'html')
	message.attach(attachment)

	aws_connect = boto.ses.connect_to_region(aws_region)
	send_mail = aws_connect.send_raw_email(
		message.string(),
		source=message['From'],
		destinations=message['To']
	)
	return send_mail

@@ -141,17 +141,20 @@
 l_mail(%0A
-%09
+    
 htmlFile
@@ -169,17 +169,20 @@
 .html%22,%0A
-%09
+    
 subject=
@@ -192,17 +192,20 @@
 ample%22,%0A
-%09
+    
 send_fro
@@ -226,17 +226,20 @@
 e.com%22,%0A
-%09
+    
 send_to=
@@ -258,17 +258,20 @@
 .com%22%5D,%0A
-%09
+    
 aws_regi
@@ -288,17 +288,20 @@
 t-2%22):%0A%0A
-%09
+    
 message 
@@ -318,17 +318,20 @@
 ipart()%0A
-%09
+    
 message%5B
@@ -351,17 +351,20 @@
 subject%0A
-%09
+    
 message%5B
@@ -383,17 +383,20 @@
 nd_from%0A
-%09
+    
 message%5B
@@ -447,17 +447,20 @@
 trings%0A%0A
-%09
+    
 html = o
@@ -485,17 +485,20 @@
 .read()%0A
-%09
+    
 attachme
@@ -525,17 +525,20 @@
 'html')%0A
-%09
+    
 message.
@@ -557,17 +557,20 @@
 hment)%0A%0A
-%09
+    
 aws_conn
@@ -614,17 +614,20 @@
 region)%0A
-%09
+    
 send_mai
@@ -658,18 +658,28 @@
 _email(%0A
-%09%09
+            
 message.
@@ -688,18 +688,28 @@
 ring(),%0A
-%09%09
+            
 source=m
@@ -728,10 +728,20 @@
 '%5D,%0A
-%09%09
+            
 dest
@@ -767,12 +767,18 @@
 o'%5D%0A
-%09)%0A%09
+    )%0A    
 retu

fix indentation