f3-factory / fatfree-core

Fat-Free Framework core library
GNU General Public License v3.0
207 stars 88 forks source link

Subject encoding in SMTP class #274

Open xfra35 opened 5 years ago

xfra35 commented 5 years ago

The SMTP class doesn't automatically encode the Subject header.

Is that on purpose or is it a bug?

ikkez commented 5 years ago

Probably not just implemented. I had that one on my desk some weeks ago.. it's a tricky task, tried to implement it myself, but not good idea. Best bet is to use iconv_mime_encode, if available. I ended up with this one https://github.com/ikkez/f3-mailer/commit/de405dd9a6c5dd8ea099e40bddbbe67dacd29012 which goes on top of this SMTP plugin, so I'll just set an already encoded Subject. Not sure though, if that's on purpose to do so.