Sendy Integration & Newsletters

Sendy Integration & Newsletters [Paid] 2023-08-10

No permission to buy ($50.00)
Is this supporting Sendy house keeping features:

🧹 New House keeping section!

• Unconfirmed subscribers

Unconfirmed subscribers

You can now easily remove unconfirmed subscribers from the new ‘Housekeeping’ section. ‘Unconfirmed’ subscribers are those who did not click the double opt-in confirmation link to confirm their subscription. Easily remove users who are unconfirmed for 1 week, more than 1 week, more than 2 weeks or not at all. This will keep your database lean and mean.

• Inactive subscribers

Inactive subscribers

You can now easily remove inactive subscribers from the new ‘Housekeeping’ section. Easily remove all subscribers who did not open or click any campaigns ever sent to them. This will not only keep your list clean, you save even more money by not having to pay for emails sent to inactive subscribers.
 
Been getting several of these errors in my AdminCP after sending a newsletter (Sendy 3.1.2.3).

Server error log
  • XF\PrintableException: Job Truonglv\Sendy\Job\EmailBounce: An error occurred while subscribe newsletters. Please try again later.
  • src/addons/Truonglv/Sendy/Api/Sendy.php:161
  • Generated by: Unknown account
  • Apr 16, 2019 at 3:20 PM
Stack trace
#0 src/addons/Truonglv/Sendy/Api/Sendy.php(91): Truonglv\Sendy\Api\Sendy->post('https://www.dom...', Array)
#1 src/addons/Truonglv/Sendy/Service/Subscription.php(46): Truonglv\Sendy\Api\Sendy->getStatus('1merman187@g...', '0W8Dy763bK7M9HW...')
#2 src/addons/Truonglv/Sendy/Job/EmailBounce.php(59): Truonglv\Sendy\Service\Subscription->checkEmailBouncing()
#3 src/XF/Job/Manager.php(253): Truonglv\Sendy\Job\EmailBounce->run(G)
#4 src/XF/Job/Manager.php(195): XF\Job\Manager->runJobInternal(Array, G)
#5 src/XF/Job/Manager.php(79): XF\Job\Manager->runJobEntry(Array, G)
#6 job.php(42): XF\Job\Manager->runQueue(false, 8)
#7 {main}
 
Hi @truonglv

we've had problems with syncing subscriptions from XenForo to Sendy and built a quick fix.

The Sync job fetches chunks of 10 unprocessed records from xf_sendy_user (synced_date = 0) and syncs the subscription to Sendy if all prerequisites are met. After a successful sync, the synced_date is set to the current timestamp.

When a user record has a user_state not equal to valid it's not synced (see Service\Subscription::onRegistered() and Service\Subscription::onEmailChanged()), but fetched on the next run again as synced_date is 0. That leads to an infinite loop, as there are unsynced records found each time the job runs.

Our quick-fix loads only records from xf_sendy_users when the XenForo user account has the user_state = 'valid', see the attached diff.

I don't know if that's the best solution but at least it works in our case.

Code:
--- a/Job/Sync.php
+++ b/Job/Sync.php
@@ -32,6 +32,7 @@ class Sync extends AbstractJob

         $finder = $this->app->finder('Truonglv\Sendy:User');
         $finder->with('User');
+        $finder->where('User.user_state', 'valid');
         $finder->where('synced_date', 0);
         $finder->order('queue_date', 'asc');
 
Hi @truonglv

we've had problems with syncing subscriptions from XenForo to Sendy and built a quick fix.

The Sync job fetches chunks of 10 unprocessed records from xf_sendy_user (synced_date = 0) and syncs the subscription to Sendy if all prerequisites are met. After a successful sync, the synced_date is set to the current timestamp.

When a user record has a user_state not equal to valid it's not synced (see Service\Subscription::onRegistered() and Service\Subscription::onEmailChanged()), but fetched on the next run again as synced_date is 0. That leads to an infinite loop, as there are unsynced records found each time the job runs.

Our quick-fix loads only records from xf_sendy_users when the XenForo user account has the user_state = 'valid', see the attached diff.

I don't know if that's the best solution but at least it works in our case.

Code:
--- a/Job/Sync.php
+++ b/Job/Sync.php
@@ -32,6 +32,7 @@ class Sync extends AbstractJob

         $finder = $this->app->finder('Truonglv\Sendy:User');
         $finder->with('User');
+        $finder->where('User.user_state', 'valid');
         $finder->where('synced_date', 0);
         $finder->order('queue_date', 'asc');
Are you used version 3.0.x?
 
Top Bottom