Closed vesper8 closed 7 years ago
@vesper8 you can extend the mail classes of the package if that works in this case
right.. yes that's what I did. But I needed to change which class the package's classes extend. Instead of extending Mailable directly I needed to have them extend something else that itself extends Mailable. So I had to copy your classes to my own codebase so I could change which class they extend. I did all that and it is working.
Thanks
@vesper8 what dylan is saying is that you can extend his class without copying or modifying the namespace:
use TomIrons\Mailables\ActionMailable;
class MyActionMailable extends ActionMailable
{
// ... override some methods
}
I'm on the same page as @Lloople, you can still access everything inside the Mailable
class through the classes in this package.
Would also be nice to have the option to publish the 3 mail classes so we can override them
I have a situation where I need to pass custom headers to Mail::queue and I am implementing the fix here https://medium.com/@guysmilez/queuing-mailables-with-custom-headers-in-laravel-5-4-ab615f022f17
But in order to do that I have to extend Mailable, but your classes also extend Mailable and I want to use your classes.. so now I have to copy your classes to my own codebase and change them so they extend my modified Mailable class :)