CodeIgniter Forums

Full Version: Message Lib instead of Mail only?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello everyone,

I wan't to open one thread about the Mail system in CI 4. 
Those days sending message / notification is possible not only by e-mail but and by many other gateways "SMS, 3rd party apps (FB, Google, etc..)"

Wouldn't it be better if in CI 4 instead of Mail library there is Message library with email as the only base supported gateway ? 
This way anyone will be able to add any kind of message gateways and to use it by standard framework class/methods following just a base driver interfaces..

In most of the cases a Message (mail or other) has very common things : Sender, Receiver, Message, Attachment.. 
Of course there will be some differences as some of the gateways will require to be authenticated (maybe some key or other) but this will be handled by the drivers and not by the base Message class..

*SEO SPAM LINKS REDACTED*


Thank you!
That was looked into at one point, and I even started coding it. However, it became apparent doing that there are enough significant differences between an email and other types of notifications that it becomes messy quickly. And trying to standardize mail vs things like posting to FB, etc is especially awful. Now - a "Notifications" component that could handle some of those might make more sense, though still tricky if it gets too broad - and then you also have to commit the manpower to keeping on top of all of the changes that third-parties make constantly.
I actually have a stub of a CI3 library that I started for this, "generalized notifications". Ultimately I abandoned it for the similar reasons: the work to configure each endpoint on each CI3 project and server was as much work as using existing individual plugins. CI4 definitely has a more robust configuration system - would others be interested in a "notices" library as an addin, assuming it didn't make the cut to be bundled with? If so, what kind of endpoints would you like to see?
(04-03-2019, 12:22 AM)aaron77 Wrote: [ -> ]Hello everyone,

I wan't to open one thread about the Mail system in CI 4. 
Those days sending message / notification is possible not only by e-mail but and by many other gateways "SMS, 3rd party apps (FB, Google, etc..)"

Wouldn't it be better if in CI 4 instead of Mail library there is Message library with email as the only base supported gateway ? 
This way anyone will be able to add any kind of message gateways and to use it by standard framework class/methods following just a base driver interfaces..

In most of the cases a Message (mail or other) has very common things : Sender, Receiver, Message, Attachment.. 
Of course there will be some differences as some of the gateways will require to be authenticated (maybe some key or other) but this will be handled by the drivers and not by the base Message class..

*SEO SPAM LINKS REDACTED*


Thank you!


Ah that is something I guess most of the users would love as it's comes in handy!
There are too many differences in the other messaging code to go down this route!

Besides how many of them are you really going to use?

KISS - DRY - that's CI's way.