Greetings,
I am encountering one problem with one of my action in stackstorm where email formatting still has newline characters. It is python runner where I send email in plain-text or html format, depending on input:
def run(self, toEmail, fromEmail, body, subject, isHTML=False, ccEmail=None):
'''
Run method to send email.
'''
smtpObj = smtplib.SMTP('localhost')
if isHTML:
message = MIMEText(str(body), 'html')
else:
message = MIMEText(body, "plain")
message['To'] = toEmail
message['From'] = fromEmail
message['Subject'] = subject
message['cC'] = ccEmail
smtpObj.sendmail(fromEmail, [toEmail, ccEmail], message.as_string())
Has anyone seen this issue before in Stackstorm? Any help is appreciated.
Thanks
Anand S.