thedevdojo / chatter

Chatter is a Simple Laravel Forum Package
https://devdojo.com/forums
MIT License
898 stars 294 forks source link

Managing my own mail #196

Open galdazbiz opened 6 years ago

galdazbiz commented 6 years ago

I have another way of sending emails different from the queue used here. I want to make pull request adding the ability to choose another code. The question is, where and how can I put the code so that is readable by the postController? For example could it be pasting the code into the config file and then being read by the Controller? Or should I create a new file and then include it into the controller?

marktopper commented 6 years ago

I am not entirely sure what you are asking for, could you try to describe it in more details?

galdazbiz commented 6 years ago

Hi Mark, thanks, I want to change this line in ChatterPostController.php Mail::to($user)->queue(new ChatterDiscussionUpdated($discussion)); And substitute with for example this: $data = ['emailTo' => $user->email, etc...]; Mail::send(new NotificationEmail($data));

What would be the best practices to pull this? Create a new file for the include, copy that code into the config file?

marktopper commented 6 years ago

If you can make it configurable that would be great 😄