atk4 / atk4

PHP framework for developing powerful web applications. Inspired by desktop toolkits (QT, Cocoa, .NET). For developers with any skill level.
http://agiletoolkit.org/
MIT License
182 stars 84 forks source link

default transport duplicates "to:" field #35

Closed romaninsh closed 12 years ago

romaninsh commented 12 years ago

using TMail2 with default (mail()) transport adds a duplicate "To" field.

The Elter: Maybe you can enclose the To and subject in a tag and delete it in the standard case?

TheElter commented 12 years ago

If you have a test case for other transports (you mentioned SES in our chat) I can try to fix it

romaninsh commented 12 years ago

It requires you to register and input your amazon keys, so it's not a simple case to test. I have few installations using SES, so i'll run a test on those, besides if you do implement the deletion of the tags in standard transport, then there won't be any effect on other transports, which is awesome.

TheElter commented 12 years ago

considering the send signature for transport classes array($to,$from,$subject,$body,$headers) probably is wiser to remove all duplicates from $headers var and let the transport class eventually recompose them as needed. Naming it as $additionl_headers could be better explanatory.

I think that is confusing in the transport class to have to, from and subject as separated variables AND in the headers...

TheElter commented 12 years ago

The fix is here https://github.com/TheElter/atk4/commit/eee946855a760a995fe7bf9cd69ea8163df25400

Test it and eventually merge into devel branch.