*

pietkei

  • ***
  • 69 posts
Alert function not sending emails
« on: February 02, 2021, 08:53:11 PM »
Hello,

The alerts function is working, except there is no email sent to the user.

I use a cronjob using my own host.

All suggestions are welcome!

Thanks.

OsClass: 4.4.2
Theme: Gamma
Website: https://marktplaats24.nl

*

MB Themes

Re: Alert function not sending emails
« Reply #1 on: February 03, 2021, 07:52:31 AM »
@pietkei
1) is your mail server functional?
2) can you find related email template in backoffice?
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

pietkei

  • ***
  • 69 posts
Re: Alert function not sending emails
« Reply #2 on: February 03, 2021, 11:09:31 AM »
@pietkei
1) is your mail server functional?
2) can you find related email template in backoffice?
Thanks!
Yes my mail server is working well and the mail template is in the backoffice.
I've tested the templates using 'Test Email' and they are working .

Email templates:
alert_email_hourly   
alert_email_daily   
alert_email_weekly   
alert_email_instant
« Last Edit: February 03, 2021, 12:32:06 PM by pietkei »

*

MB Themes

Re: Alert function not sending emails
« Reply #3 on: February 03, 2021, 12:34:50 PM »
@pietkei
What is name (code) of this one?
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

pietkei

  • ***
  • 69 posts
Re: Alert function not sending emails
« Reply #4 on: February 03, 2021, 12:39:50 PM »
@pietkei
What is name (code) of this one?

Sorry, i'm not sure what you mean, which code?

*

MB Themes

Re: Alert function not sending emails
« Reply #5 on: February 03, 2021, 12:56:50 PM »
Template name/code
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

pietkei

  • ***
  • 69 posts
Re: Alert function not sending emails
« Reply #6 on: February 03, 2021, 01:06:41 PM »
Template name/code

Still not sure if this is what you mean.
(added 2 images)

Email templates:
alert_email_hourly   
alert_email_daily   
alert_email_weekly   
alert_email_instant


*

MB Themes

Re: Alert function not sending emails
« Reply #7 on: February 03, 2021, 04:18:27 PM »
@pietkei
Ok, so basically, if all your cron are working properly and new listings is added on your classifieds that match to some of alerts search patterns, user should get notification via email.
I was testing this and updating functionality like month ago and everything worked properly.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

pietkei

  • ***
  • 69 posts
Re: Alert function not sending emails
« Reply #8 on: February 03, 2021, 04:34:26 PM »
@pietkei
Ok, so basically, if all your cron are working properly and new listings is added on your classifieds that match to some of alerts search patterns, user should get notification via email.
I was testing this and updating functionality like month ago and everything worked properly.

Cronjobs are working properly.
I dont know how to solve it.
Thanks anyway.

*

MB Themes

Re: Alert function not sending emails
« Reply #9 on: February 04, 2021, 07:38:20 AM »
@pietkei
I can confirm after setting up mail server and cron, alerts functionality works properly.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

pietkei

  • ***
  • 69 posts
Re: Alert function not sending emails
« Reply #10 on: February 04, 2021, 11:10:36 AM »
@pietkei
I can confirm after setting up mail server and cron, alerts functionality works properly.

Thanks for checking, much appreciated.

I'll have to look further.

Pieter

*

pietkei

  • ***
  • 69 posts
Re: Alert function not sending emails
« Reply #11 on: February 04, 2021, 09:59:50 PM »
@pietkei
I can confirm after setting up mail server and cron, alerts functionality works properly.

Sorry i have one more question.

I just checked the crontab if it was running, this was the log:

Feb 4 11:00:02 web0082 CROND[397597]: (u43825p39641) CMD (flock -n /home/u43825p39641/.c84793bfa89e958.cronlock -c "/opt/alt/php73/usr/bin/php /home/u43825p39641/domains/marktplaats24.nl/public_html/index.php -p cron -t hourly")


In the Osclass documentation i read this:

Best case scenario
You are able to run one or many cronjobs. In that case, execute oc-includes/osclass/cron.php in your cronjob ‘each hour.’
Should the cronjob point to /cron.php?


My Cronjob:
0    *    *    *    *    /opt/alt/php73/usr/bin/php /home/u43825p39641/domains/marktplaats24.nl/public_html/index.php -p cron -t hourly   
0    0    *    *    *    /opt/alt/php73/usr/bin/php /home/u43825p39641/domains/marktplaats24.nl/public_html/index.php -p cron -t daily   
0    0    *    *    0    /opt/alt/php73/usr/bin/php /home/u43825p39641/domains/marktplaats24.nl/public_html/index.php -p cron -t weekly



*

MB Themes

Re: Alert function not sending emails
« Reply #12 on: February 04, 2021, 10:54:40 PM »
You copied from docs to execute cron.php, but in your crontab you still have index.php. what is purpose of that?
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

pietkei

  • ***
  • 69 posts
Re: Alert function not sending emails
« Reply #13 on: February 04, 2021, 11:15:45 PM »
You copied from docs to execute cron.php, but in your crontab you still have index.php. what is purpose of that?

My mistake, this is the cronjob:
0    *    *    *    *    /opt/alt/php73/usr/bin/php /home/u43825p39641/domains/marktplaats24.nl/public_html/oc-includes/osclass/cron.php -p cron -t hourly   
0    0    *    *    *    /opt/alt/php73/usr/bin/php /home/u43825p39641/domains/marktplaats24.nl/public_html/oc-includes/osclass/cron.php -p cron -t daily   
0    0    *    *    0    /opt/alt/php73/usr/bin/php /home/u43825p39641/domains/marktplaats24.nl/public_html/oc-includes/osclass/cron.php -p cron -t weekly


Now i get this message from the cron job:

ABS_PATH is not loaded. Direct access is not allowed.

Now i am lost.



« Last Edit: February 05, 2021, 12:05:44 AM by pietkei »

*

MB Themes

Re: Alert function not sending emails
« Reply #14 on: February 05, 2021, 07:09:05 AM »
Right, I think docs has not been updated on this for a while.
For me works this: https://web.com/index.php?page=cron
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots