def __init__(self,<EOL>aws_access_key_id=None,<EOL>aws_secret_access_key=None,<EOL>region="<STR_LIT>",<EOL>sender=None,<EOL>reply_to=None,<EOL>template=None,<EOL>template_context={},<EOL>app=None):
if app:<EOL><INDENT>self.init_app(app)<EOL><DEDENT>else:<EOL><INDENT>if region:<EOL><INDENT>self.ses = boto.ses.connect_to_region(region,<EOL>aws_access_key_id=aws_access_key_id,<EOL>aws_secret_access_key=aws_secret_access_key)<EOL><DEDENT>else:<EOL><INDENT>self.ses = boto.connect_ses(aws_access_key_id=aws_access_key_id,<EOL>aws_secret_access_key=aws_secret_access_key)<EOL><DEDENT>self.sender = sender<EOL>self.reply_to = reply_to or self.sender<EOL>if template:<EOL><INDENT>self.template = Template(template=template)<EOL><DEDENT>if template_context:<EOL><INDENT>self.template_context = template_context<EOL><DEDENT><DEDENT>
Setup the mail