By shoulders on Saturday, 13 January 2018
Posted in General
Replies 9
Likes 0
Views 681
Votes 0
Hi,

A feature for a centralized email que system that can be control by cron is a good idea and would be helpful for your software.

There is a discussion/feture request going on here

https://issues.joomla.org/tracker/joomla-cms/19073

Can I ask you guys to have a look and give your support (if you want)

Thanks

shoulders
Thanks for sharing this with us and this is definitely very interesting! However there are many issues that needs to be considered when Joomla decides to add a centralize mail scheduling system. For instance, there needs to be a dynamic way of generating contents when it is dispatching the e-mails.

It cannot just store the entire contents of the e-mail on the database due to several factors like for instance, locale and etc.
·
Sunday, 14 January 2018 14:01
·
0 Likes
·
0 Votes
·
0 Comments
·
It cannot just store the entire contents of the e-mail on the database due to several factors like for instance, locale and etc.


I dont think this is the case at all.

Consider the following (i will give the simple version)

in Joomla at some point the function of the actual mail transport system is triggered and the email sent

mail($to, $recipeint, $subject, $body)


All you need to do is put a wrapper on it


cronWrapper($to, $recipient, $subject, $body, $sendToCron = false) {

if($sendToCron == false) {

mail($to, $recipeint, $subject, $body);

} else {

// send the email to the cron mail system
cronMailSystem($to, $recipient, $subject, $body);

}


So you can make calls to this new wrapper and choose whether to send the email immediately or sent to the cron email system. The email would only need to be temporarily be stored and this method would allow compatability with all current plugins

NB: I know there is a JMailer class but this code is just for the theory.

Hope this helps
·
Monday, 15 January 2018 21:25
·
0 Likes
·
0 Votes
·
0 Comments
·
Oh, you meant a single central location to trigger cronjobs. I thought you were referring to storing the e-mail contents on a global level.

Hm, that might work but another concern that I have is the max_execution_time on most hosting companies. The primary reason that we want you to setup a cronjob is because sending e-mails takes time and if you try to group up all extension's e-mail dispatcher at one go, it may eventually hit the max_execution_time.
·
Tuesday, 16 January 2018 10:39
·
0 Likes
·
0 Votes
·
0 Comments
·
This centralized system will be cron based.

This will allow the control of email sending limits at one point and allow other components to take advantage of this rather than several different systems or just sending emails on triggers which have their own problem.

Thanks
·
Tuesday, 16 January 2018 17:21
·
0 Likes
·
0 Votes
·
0 Comments
·
Yeah, it really depends on the architecture of the way this is built. It may be good!
·
Tuesday, 16 January 2018 23:02
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post