Closed Dylan-Chapman closed 5 years ago
My apologies, this is unfortunate.
In your case, you can safeguard your contents with "raw" as in:
yag.send(contents=yagmail.raw(html_text))
But then the problem is that it is not html. Wow, this is the first time it is not clear for me how this should be implemented. Let me get back to you on that.
Are you sending scraped contents or a file? If a file, you could of course send the file directly, that would be the best workaround possible at the moment.
Thankfully I'm just sending an HTML list (scraped contents), so I can convert it to line-by-line text and send it with raw.
Glancing at the code, I'm not sure of a solution off the top of my head either. Unfortunately I'm still in the midst of learning Python.
@kootenpv I tried using yagmail.raw() , and it's working. :)
I'm sending a long-ish email (HTML) and am receiving this error when sending on Windows. I'm assuming this happens because of Windows file path limit and because, as the README says, the contents argument 'will try to see if the content (string) can be read as a file locally, e.g. '/path/to/image.png''.
The last few entries from the traceback are
Is there a way to get around this?