-
-
Notifications
You must be signed in to change notification settings - Fork 782
Description
SUMMARY
When using the core.sendmail action if the subject line is too long (approx 56 but apparently really depends on the line length of the base64 encoded text) then the encoding apparently line-wraps which in turn causes the formatting of the subject and the body of the message to get mangled.
STACKSTORM VERSION
Paste the output of st2 --version: st2 3.1.0, on Python 2.7.5
OS, environment, install method
RPM install on CentOS 7.7
Steps to reproduce the problem
st2 run core.sendmail from="st2 notifier <XXXXXX@plexxi.com>" to=XXXXXXXXX@plexxi.com body="<html><body><h2>Test message</h2>How does this end up getting formatted?<p>new line here</p></body></html>" subject="This is a subject line that is too long - it will get mangled"
Expected Results
HTML message with subject line: This is a subject line that is too long - it will get mangled and HTML formatted body
Actual Results
Actual email message headers/body look like this:
TO: XXXXXXXXX@plexxi.com
FROM: st2 notifier XXXXXX@plexxi.com
SUBJECT: =?UTF-8?B?>VGhpcyBpcyBhIHN1YmplY3QgbGluZSB0aGF0IGlzIHRvbyBsb25nIC0gaXQgd2lsbCBnZXQgbWFu
Message-Id: 20190930180507.XXXXXXXX@XXXXXXXX.plexxi.com
Date: Mon, 30 Sep 2019 14:05:07 -0400 (EDT)Z2xlZAo=?=
Content-Type: text/html; charset=UTF-8Test message
How does this end up getting formatted?new line >here
This message was generated by StackStorm action send_mail running on XXXXXX.plexxi.com`
As you can see, the subject line apparently wrapper and flowed onto another line which resulted in a message that looked like this:
Shortening the subject line by a couple of characters causes everything to work properly and the HTML message is formatted as expected.
