ArsenDev

Send private message

You must be logged in to send a private message.

Group membership

Activity

  • ArsenDev replied on the discussion topic Limiting EMaills
    what crons i need, i am trying to limit every plugin view reply
  • ArsenDev replied on the discussion topic Limiting EMaills
    Ok, hooks?? view reply
  • ArsenDev replied on the discussion topic Limiting EMaills
    Dear Evan, Please tell me cron job, and codes, and hook please,   Thanks In Forward! view reply
  • ArsenDev added a new discussion topic Limiting EMaills in the group Performance and Scalability
    Hello! I am wondering how to  limit email verification limit per minute, so i wont get suspended   Thanks In Forward!
    • Documentation about plugin hooks: http://learn.elgg.org/en/1.x/design/events.html#plugin-hooks

      Check also the garbagecollector and logrotate plugins for examples on how to use cron with plugin hooks.

    • what crons i need, i am trying to limit every plugin

    • Some explanation - not a ready solution!

      Setting up the cronjobs on the server does nothing regarding limiting the emails as such. The cronjobs getting executed (per minute, fivemin, etc.) is just a requirement to be able to queue emails at all.

      What you would have to do by writing a plugin hook is collecting all emails (more precisely: notifications and messaged by "mail" method) and prevent them from getting sent immediately. You have to queue up all collected emails and then send them (via a cron plugin hook) on the next execution of the cronjob you decided to use - but of course send a number of X emails at once. For example you could decide on using the 5 min cronjob, i.e. each time this cronjob is triggered (if configured on the server), a maximum number of X emails is sent from the emails that have queued up.

      It's not a trivial task to get this implemented:

      • you have to make it working for all plugins (some might not using the default "mail" method but add their own method),
      • your code has to manage the mail queue (make sure all mails are sent but not send them twice),
      • what happens if there are more mails to be send on average than allowed by the restrictions on your shared server? As a consequence the queue would increase more and more.

      Elgg 1.9 will queue notifications and messages and send them out by cronjob together (but I think there's no option implemented to limit the maximum number of mails sent and it's maybe quite difficult to backport this new notification handling to Elgg 1.8).

      Emails from account registrations will most likely also be the least of the problems regarding the number of mails sent. By default, email sending is enabled in the notifications settings of Elgg for new accounts. The number of mails sent for example due to comments made on content will surely be much higher than from account registering. A plugin to turn off the mail method by default is the SetNoNotifications plugin (https://community.elgg.org/plugins/869366/1.8.2/elgg-1819-set-no-notifications). This will reduce the number of mails if your users don't turn on the mail method again (rather unlikely for all). Still they are not denied from turning it on again. For preventing them from turning on the email sending as available notification method you would have to override the default notification settings view via a customized plugin to remove the mail method as a notification method offered to your users.

  • ArsenDev replied on the discussion topic Geting user GUID
    Never Mind, i used MySQL query, Thanks Anyways view reply
  • ArsenDev added a new discussion topic Geting user GUID in the group Plugin Development
    Hello, i am wondering how to get users GUID from external php scrypt.   Thanks In Forward!
  • ArsenDev replied on the discussion topic Having trouble authenticating from an Android App
    i get Registration Failed, and cookie expiration is null. view reply
  • ArsenDev added a new discussion topic Having trouble authenticating from an Android App in the group Plugin Development
    Hello, i used https://github.com/ColdTrick/ws_pack/ and https://github.com/josealopezpastor/ElggAndroidClient, i edited login and so on, and to login used...