This topic contains a post which is marked as Best Answer. Press here if you would like to see it.
*

megacheb

  • ***
  • 21 posts
When any premium services ended users do nor receive email (osp_email_expired)
Mail server work - other emails like osp_email_promote or osp_email_expired_membership and from osclass core send well
Cron works well - all premium end in time.

Regards.

*

Abhi Jain

  • **
  • 9 posts
Yes For some reason only expiry emails are not getting sent from osclass pay plugin

*

megacheb

  • ***
  • 21 posts
This sounds like a bug

*

MB Themes

Cron for osclass must be configured properly.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Abhi Jain

  • **
  • 9 posts
Cron for Ever Email works well other than expiry email so it should be a bug not the cron problem

*

megacheb

  • ***
  • 21 posts
Cron works properly, all other functions depended on cron work well!

*

MB Themes

@megacheb
Try to reference cron.php directly in new cron job.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

megacheb

  • ***
  • 21 posts
Nothing change. Emails still do not send
I found old post


Re: Bug: send osp_email_promote not work
« Reply #29 on: November 01, 2017, 03:10:12 PM »
Hey guys

Today I found that the osp_email_expired is not send automatically once the premium expired, Im just receiving the osp_email_promote but the custom link to the cart still not working. My cron is working and sending the Alerts emails or Expiring emails


on this page https://forums.osclasspoint.com/osclass-pay-plugin/bug-send-osp_email_promote-not-work/15/

Сonsidering this, minimum 3 persons have this bug.
I think its enought for you atention.
Please check this issue,  its very easy to reproduce.
« Last Edit: November 07, 2019, 02:39:42 PM by megacheb »

*

MB Themes

@megacheb
Are premium/highlight/... labels removed successfully when they expire just mail is not sent?
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Abhi Jain

  • **
  • 9 posts
@megacheb
Are premium/highlight/... labels removed successfully when they expire just mail is not sent?

for me those are removed but emails not sent

*

megacheb

  • ***
  • 21 posts
@megacheb
Are premium/highlight/... labels removed successfully when they expire just mail is not sent?
Yes, labels removed successfully, but email about expiration don't send.

*

MB Themes

@megacheb
Everything looks good in code, so there might be some minor mistake.
Please check:
- if you error log does not reference to osp_email_expired function
- if email template osp_email_expired exists in your osclass
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

megacheb

  • ***
  • 21 posts
@megacheb
Everything looks good in code, so there might be some minor mistake.
Please check:
- if you error log does not reference to osp_email_expired function
- if email template osp_email_expired exists in your osclass

Thanks for your reply.
My error log does not consist any information about osp_email_expired function
Email template present and work (i made some test).

I think, something wrong in function osp_email_expired($item, $notify) in email.php,
probably in this piece of code :
Code: [Select]

  foreach($types as $type) {
    if(!in_array($type, $notify)) {
      if($type == OSP_TYPE_PREMIUM) {
        $content['s_text'] = preg_replace('|{START_PREMIUM}(.*){END_PREMIUM}|', '', $content['s_text']);
      } else if($type == OSP_TYPE_HIGHLIGHT) {
        $content['s_text'] = preg_replace('|{START_HIGHLIGHT}(.*){END_HIGHLIGHT}|', '', $content['s_text']);
      } else if($type == OSP_TYPE_REPUBLISH) {
        $content['s_text'] = preg_replace('|{START_REPUBLISH}(.*){END_REPUBLISH}|', '', $content['s_text']);
      } else {
        return false;
      }
    }
  }


I think, this function always return FALSE, and email dont send.
When i change if(!in_array($type, $notify)) to if(in_array($type, $notify)) i receive email, but in body of email i see all premium services, not only expired.

*

MB Themes

Try just to comment return false row.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

megacheb

  • ***
  • 21 posts
When i comment return false i receive email with all premium services, not only expired.

Code: [Select]
Premium
 - listing is no more premium as paid period has expired.

Highlight
 - listing is no more highlighted as paid period has expired.

Republish
 - listing has been republished for last time and will not be republished anymore, as paid repeats has been used.

 

Only premium was expired in this ad. Other services not applied for this ad.