We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Where in the code is the 2 day wait period for sending emails? | Forum

Jose
Jose Feb 13 '13

Hi,


Where in the code is the 2 day wait period for sending emails? 


Thanks,


Jose

Jose
Jose Mar 19 '13
Found!


ow_plugins/notifications/bol/service.php


Change line  in  public function findUserIdListForSend( $count, $period = null )


$period = 24 * 3600;     for anything  else   like   $period = 600;   for 10 minutes



Alia Team
Alia Mar 19 '13
Topic was moved from General Questions.
Richard E Wallace Jr
I'm pretty sure the code should be:

    public function findUserIdListForSend( $count, $period = null )
    {
        if ( empty($period) )
        {
            $period = 60;
        }

        return $this->notificationDao->findUserIdListForSend($count, $period);
    }

It still is not sending any updates.
I did turn on dev_mode and back off.
Please help.
The Forum post is edited by Richard E Wallace Jr Mar 20 '13
Jose
Jose Mar 20 '13
Richard,


In some accounts they are getting the notifications in the spam folder.

I guess you already have checked that!  Right?


Jose



Richard E Wallace Jr
Thanks so much for the reply.
I did. I created a test user with a completely different email,
and nothing showed up. Had two other testers test as well.

I really need this to work.
Is there some other true/false switch?
I have two installs of Oxwall. Doesn't work on either.
I know it should.

Thanks for the help.
Richard E Wallace Jr
Jose, Just wondering, are you using the SMTP feature?

Jose
Jose Mar 21 '13
Yes.  I am using SMTP. 
Jose
Jose Mar 21 '13

Did you checked the SMTP connection from the adming pages?


Do you see the emails going out in your server mail queue?  Or are they just sitting in the queue?


You might need to have SSH priviledges  for this.  It depends on what server your are using.

Richard E Wallace Jr
That may be the difference. I have been depending on the Cron job.
It has been sending the normal messages so far.
I will try to work with the SMTP.

Thanks again for your time and response.
Richard E Wallace Jr
SMTP is working great.
invites, email verifications and welcome emails are going out fine.
Activity notifications not so much.
This is a huge deal breaker for the people that want this site.

Jose
Jose Mar 21 '13
Great!!!  I am glad for you,


The activity notifications have been fixed in my site right after I changed the code that I've mentioned before.  Now the users are happy!!!


Enjoy!!!

Richard E Wallace Jr
Thanks again Jose.
I'll keep beating my keyboard till it works.
If I find something weird I did I will repost.

Richard E Wallace Jr
So this is my conclusion.
THe shortest I could get was the tem minutes.
I was probably not logged of with my test user long enough
for the tem minutes to laps and send the mail.

Also it only applies to comments that are directly
connected to a user. General comments in the news feeds
do not send as best as I can tell.

Correct me if I am wrong.)

Thanks for all the help.
Jose
Jose Mar 22 '13
You are right Richard.  That is how it seems to work!!!
S. Bourdon
S. Bourdon Jul 28 '13
Hello,


This code can no longer be found in Oxwall 1.5.3.

Could anyone tell me where to look for in that version of Oxwall?


I would like to reduce the default wait period for sending emails to 60 minutes instead of 2 days...


Thank you!

Alex Philipp
Alex Philipp Jul 29 '13
Yes, please, who can help to find it..
Daisy Team
Daisy Aug 2 '13
You can find the fillSendQueue function in /ow_plugins/notifications/cron.php file.
S. Bourdon
S. Bourdon Aug 2 '13
Thanks Daisy!


So here's the function:


    public function fillSendQueue()

    {

        if ( $this->service->getSendQueueLength() == 0 )

        {

            $this->service->fillSendQueue(24 * 3600);

        }

    }


If my understanding of this is right, then notifications set to "Automatically" will go out after 24 hours, not 48, right?


And if I wanted to reduce that waiting period to 1 hour, I could simply change the last line to:


            $this->service->fillSendQueue(1 * 3600);


is that right?


Thanks!

The Forum post is edited by S. Bourdon Aug 2 '13
Daisy Team
Daisy Aug 7 '13
You can simply add this string: $this->service->fillSendQueue(3600);

But, this won't mean that the emails will be sent every hour. Every hour the system will compose the list of notifications that should be sent, then every 10 - 20 minutes (it depends on the cron settings) the system will send 100 letters per one cron run. Thus it can take more then hour to send all the letters if you have a high activity on the site.

If you want the notifications to be sent to users within an hour, then it would be better  to use the immediately option by default.  Please take a look at this topic to see how to achieve this: http://www.oxwall.org/forum/topic/10490