T
T
tgtho2014-12-14 21:58:00
Flask
tgtho, 2014-12-14 21:58:00

Flask Cyrillic (not all) leads to bad header error?

The presence of more than 20 Cyrillic characters in the subject leads to an error in sending an email with the wording bad header error (the presence of a line break character). It's as if something processing and encoding the subject in flaske breaks it apart after a certain number of characters. Has anyone come across? How did they decide?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
B
bitaz, 2014-12-14
@bitaz

.encode("utf-8") / .decode("utf-8") don't help? Specifically, I did not come across flask-mail.
https://github.com/mattupstate/flask-mail/blob/mas...
You need to look at a specific line and where the line break comes from.

S
SagePtr, 2014-12-15
@SagePtr

You need to encode it:
ncona.com/2011/06/using-utf-8-characters-on-an-em...
There is an example for PHP, but for Python you will write it yourself

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question