haystack / YouPS

YouPS: An email automation tool that makes your email management easy! 😎
11 stars 5 forks source link

Review wanted- encoding of send() #186

Closed soyapark closed 5 years ago

soyapark commented 5 years ago

From your comment to PR #180, I implemented test cases for from and cc field using send() feature of message entity. However, send messages using our send() function, emojis are ignored at this line: https://github.com/haystack/YouPS/blob/079ddfece5df6f49553db0be1630a6705d3cb555/engine/models/helpers/message_helpers.py#L73

I assume this happens because I dealt with encoding incorrectly at send(). Can you review the send() function? These are the lines I'm touching encoding at send() function: https://github.com/haystack/YouPS/blob/079ddfece5df6f49553db0be1630a6705d3cb555/smtp_handler/management/commands/youps_test.py#L83-L84 https://github.com/haystack/YouPS/blob/079ddfece5df6f49553db0be1630a6705d3cb555/engine/models/mailbox.py#L209

soyapark commented 5 years ago

I found this link: I could just implement like this. Any thought? https://mg.pov.lt/blog/unicode-emails-in-python.html