for key, value in list(kwargs.items()):
    subject = subject.replace('[{0}]'.format(key.toupper()), value)
body = body.replace('[{0}]'.format(key.toupper()), value)
return subject, body, obj.is_html
loop through kwargs in python