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

Email Queue | Forum

Topic location: Forum home » Support » General Questions
simon
simon Aug 16 '16
Hi,


All my emails are going to the mail queue table in the database but are taking 5 minutes to get mailed out. Cron is set to run every minute but all these emails are staying there for 5 minutes exactly. I'm setup using SMTP. 


Anyone have advise?


Thanks!



ross Team
ross Aug 18 '16
Yes, this is done deliberately to decrease the load on the server. 

You can find it in ow_system_plugins/base/cron.php line 37: 


        $this->addJob('mailQueueProcess', 5);

simon
simon Aug 19 '16
Thanks!
misel
misel Aug 20 '16

This is also a problem for me, sendig the message on email
messages come to email sent from users 1 to and more hours later
Here my settings:


ross,what's the problem here?
Attachments:
  sy_cron.jpg (14Kb)
  cron.jpg (11Kb)
  smtp.jpg (51Kb)
dave Leader
dave Aug 20 '16
your cron is running every 5 min for one thing
misel
misel Aug 20 '16
I do not understand how do you mean? is running every 5 min for one thing..

What I'm wrong,setting is wrong?
dave Leader
dave Aug 20 '16
what i mean is that one of the issues is that your cron is running every 5 min, not every 1 min as it should.  The cron is what processes the mail queue. 


Now if it is taking an hour to get your mail, that is probably an issue with either the mail server at your host or your email client. 

The Forum post is edited by dave Aug 20 '16
misel
misel Aug 20 '16
thanks for the reply,I will see how to proceed
Darryl B Leader
Darryl B Aug 20 '16
Based on what Ross was saying. The mail queue is set to process 5 emails each time cron runs to keep from overloading the mail server.

So, if you have your cron set to run every 5 minutes, and you have 10 emails sent, it would take 10 minutes to send those emails to the mail server.
If you cron was set to run every 1 minute, it would take 2 minutes to clear the mail queue.
misel
misel Aug 20 '16
thanks,Darryl B
What is now better 1 m- or 5 minutes?
misel
misel Aug 20 '16
Darry B
one question,it is necessary to change cron.php
Attachments:
  cron.jpg (56Kb)
Darryl B Leader
Darryl B Aug 20 '16
Here is a post that has some info on the topic.
https://developers.oxwall.com/forum/topic/27940

From reading this post I may have been a little off. I was thinking it processed 5 mails out of the queue each time cron ran, but it apparently clears the queue every five minutes. the five minute interval is to allow the server time to process the requests. so Dave's comment below is correct.
The Forum post is edited by Darryl B Aug 20 '16
dave Leader
dave Aug 20 '16
no misel if you change it to 1, and you send out a mass mail you might be in trouble with your host or get yourself black listed..  just leave that at 5...  set your cronjob to 1 but leave that setting at 5
dave Leader
dave Aug 20 '16
Its ok Darryl, i get confused too at this stuff all the time... lol  
misel
misel Aug 20 '16
guys thank you very much,very useful information
I just changed only cPanel cron job seting

I hope will post faster ?????
The Forum post is edited by misel Aug 20 '16
misel
misel Aug 26 '16
There is still a big problem notifications !!!!!

Sign up notifications via e-mail to get 1/2 minutes
Notification on my email if someone sends me a wink email gets 1/2 minutes,other Notifications "example" Send Private Message,Send gift,Friends request comes to e-mail next day.My question is that I am very interested What is wrong here ???

misel
misel Aug 26 '16
2 hour ago I sent three messages

1.Send Private Message,
2.Send gift,
3.Friends request
-------------------------
my settings for cron:

in the file phpAdmin ow_base_mail ---> is all empty


I do not know what's going on here............?

Attachments:
  smtp.jpg (25Kb)
  base_mail.jpg (50Kb)
  easycron_test.jpg (71Kb)
  cronjob.jpg (26Kb)
misel
misel Aug 26 '16
14 hours of this I sent messages..
e-
mail is not come? s..t
ross Team
ross Aug 29 '16
Misel, you must be Skadate client, since you have winks on your website. 

I'm sorry but we do not provide assistance to Sakdate clients. Please contact Skadate support team to assist you. 

The Forum post is edited by ross Aug 29 '16