Obtaining Email Message HTML body error
Hi there, I get the following error when attempting to get an html email via redbox.
Traceback (most recent call last): File "/Users/max/support-bot/sandbox.py", line 45, in <module> test2() File "/Users/max/support-bot/sandbox.py", line 43, in test2 print(emails[0].html_body) File "/Users/max/.local/share/virtualenvs/support-bot-ZEAB9n9N/lib/python3.10/site-packages/redbox/models/message.py", line 48, in html_body return insp.get_html_body() File "/Users/max/.local/share/virtualenvs/support-bot-ZEAB9n9N/lib/python3.10/site-packages/redbox/utils/inspector.py", line 15, in get_html_body content_type = pl['Content-Type'].split(";") TypeError: string indices must be integers
Any insight would be great.
Bump, same issue when attempting to get msg.text_body. I think inside of the Inspector class, the get methods use the self.message,get_payload() function. The variable is then indexed with pl['content-type'] and throws an error. My hypothesis is that the function has changed from returning a dictionary to returning a list and now the variable pl must be indexed with pl[0] or pl[1].
Bump, same thing happens here with msg.html_body. Weirdly enough, it doesn't happen when I use Outlook to send my bot an email.