Open WinterSilence opened 5 years ago
You have to be more specific, the Email package isn't written by me, I don't know all ins and outs... ;)
As to 3: I don't think the package should force the use of a view for the email body, which means attachments should still work if you pass a string to body()
.
@WanWizard
isn't written by me, I don't know all ins and outs.
I don't focus on u. I analise mail libs and write my version.
$email->html_body(\View::forge('email/template', $email_data));
it's next step after this example :) Current parser use very easy algorithm(ex: rewrite code added in pre/code tags) and can't be disabled in config/method.
, which means attachments should still work if you pass a string to body()
I'm not understood you
You move code / functionality from the email classes to a View class extension. That creates a dependency, and it breaks existing code that calls html_body()
with a string instead of a View_Body instance.
@WanWizard
You move code / functionality from the email classes to a View class extension
where u find moved code / functionality?
That creates a dependency
View_Body
created for this. I can transfer code into Email_Driver
, but that class already not so SOLID.
breaks existing code that calls html_body() with a string instead of a View_Body instance.
Nope, class have __toString()
method
You have any ideas how adds multi sending and don't break anything?
Ok, lets call it duplicating code then. Like attach_inline(), which should be inside the email classes.
Nope, class have __toString() method
You misunderstood me, inline images should still work for code NOT using a View based solution. Like all existing code already out there... Which means the existing code should be fixed, not worked around.
@WanWizard
Like attach_inline(), which should be inside the email classes.
i add this wrapper because current "attach" methods not returns cid and this solution dont breaks existing code.
Which means the existing code should be fixed, not worked around
I dont have other ideas, replacing in string is worse solution
Example:
Code like this throw error or work slow because multi sending not supported. Rework:
body
/alt_body
typed inEmail_Driver::send()
, not in settersEmail_Driver::before_send()
called inEmail_Driver::send()
init properties only onceEmail\View_Body
would solve it: