Closed haritn closed 4 years ago
I suspect you should just add newline_to_break=False
:
html = pd.DataFrame({"a": [1,2,3], "b": [1,2,3]}).to_html()
yag.send(contents=html, newline_to_break=False)
Thanks for the suggestion. I would recommend that this option be False by default. To me it doesn't make sense to change html with additional unwarranted tags by default.
Sending html generated by pandas.DataFrame.to_html() shows up completely garbled in email. Used both as content as well as html. Looks like some processing going on in the background unnecessarily. Ultimately used simple smtplib.SMTP and worked just fine.
Hopeful this saves someone else countless hours and frustration figuring this out.