Closed zainawan99 closed 1 year ago
Hi @zainawan99,
would you be able to provide the version of the library that you are working with at the moment? if it's v3 or a dev-master branch?
Also would it be possible to provide more context for the mailable? Are you setting the recipient in the mailable or is it only coming from the defaults?
Also was this possibly while sending a test email?
Thanks Reece
"qoraiche/laravel-mail-editor": "^3.2", if u want more detail kindly mention please
Hi @zainawan99, thank you for the version on the package.
At what point of using the package did this error happen?
i m open the mail-eclipse URL then face this issue and remove error line number to email then run fine and some pages required mail-able email.
i m open the mail-eclipse URL then face this issue and remove error line number to email then run fine and some pages required mail-able email.
Hi @zainawan99, thanks for that. I will try to see if I can reproduce this myself.
Is there any solution for this? Encountering the same error when trying to open the dashboard for the first time.
Hi @domjanzsoo, I know I tried to reproduce this but there was limited information about how the setup was for the OP. I did get it to work once, but it was more of an oddity in the default laravel configuration.
Are you able to share information if you have any default email users set, or if you are loading up the mailables that are already in your application with constructor properties?
Hi Reece,
Thanks for getting back to me. Can you give me an email address, where I can contact you? Thanks.
I think the issue is caused by the handleMailableViewDataArgs of MailEclipse class. It maps all the arguments received by the view from the mailable. Now in my case the mailable class has a property named from, which is an array having an address and a name key. Now for some reason when MailEclipse creates an instance of my mailable class, it passes a from argument as an array to it, but both the name and address keys have null value. Probably this can be easily avoided within the mailable class, but I'm just wondering if there is no any option the set the mailable in a away, that it uses the settings of the mail config as default values?
Hi @domjanzsoo, the configuration you describe sounds about right for the issue to occur.
The MailEclipse will try to hydrate the constructor args with the types that are returned in the ReflectionClass
so if it is an object or type that it knows of it will try to populate it with default values. If it isn't it loads a dynamic class that just mocks 'fake' data for objects. But that doesn't seem to be happening.
The only way I can think of allowing the MailEclipse package to change it's behavior per mailable class without being too invasive and you and others who would use it, we could make use of the #Attributes
for a class. In that way a certain config could be passed. Or maybe the docblocks, that would be backwards compatible.
Are you still needing my email address?
Yeah, if you don't mind. It was a colleague who decided to implement this package on our emailing microservice. He left the company since then, and because we never really used this tool ,it took me a while to debug the eclipse side of the package. I'll give it shot to your solution and we'll see where that goes. Thanks, again.
You were right, the dockblocks are all written already in the mailable class, but the from param tag didn't have any type. Thanks again.
You were right, the dockblocks are all written already in the mailable class, but the from param tag didn't have any type. Thanks again.
Sorry, I think I gave the wrong context there, I was talking in the way of adding a feature to solve the question you had.
The main area that you would need to type hint is in the constructor of the class mainly.
Also the email you can get me on is zsh.rce@gmail.com
php version :7.3 laravel version :8