In some weird cases the newsletter is not send to the entire list. Resending it to the list will send it twice to the people who were in the first run, so this should be avoided. With the following query I tried to add everyone that wasn't added the first time. The thing is that the send out is now stuck. Am I missing something here?
What query does the send out task do, to see to whom he should sent a newsletter?
(I tried the below script with bot Status = 0 and status = 1 for the ns_EmailTrackingItems table)
DECLARE @NewsletterId int;
DECLARE @SubscriptionId int;
SET @NewsletterId = [NEWSLETTERID];
SET @SubscriptionId = [SUBSCRIPTIONLISTID]
INSERT INTO ns_EmailTrackingItems(Newsletter_Id, SubscriberId, [Status], Name, Email, CreateDate, SubscriptionAlias)
SELECT @NewsletterId AS Newsletter_Id, ns_Subscribers.Id, 0 As [Status], ns_Subscribers.Name, ns_Subscribers.Email, getDate(), 'NewsletterStudioSubscriptionProvider_' + CAST(@SubscriptionId AS char(1)) AS SubscriptionAlias FROM ns_Subscribers
LEFT JOIN ns_EmailTrackingItems ON ns_EmailTrackingItems.Email = ns_Subscribers.Email AND ns_Subscribers.SubscriptionId = @SubscriptionId AND ns_EmailTrackingItems.Newsletter_Id = @NewsletterId
WHERE ns_Subscribers.SubscriptionId = @SubscriptionId AND ns_EmailTrackingItems.Id IS NULL
UPDATE ns_Newsletters
SET Status = 2
WHERE Id = @NewsletterId
This is what I ended up doing.
Not as nice, but it worked nonetheless:
DECLARE @NewsletterId int
SET @NewsletterId = [NEWSLETTERID]
UPDATE ns_Subscribers
SET [Status] = 4
WHERE Id IN (
SELECT SubscriberId FROM ns_EmailTrackingItems WHERE Newsletter_Id = @NewsletterId)
AND [Status] = 1
Copy the newsletter that was sent to too little subscribers and send it to the same list.
Send it to the same list. Directly after the send out is started run this sql script, faking an error so that the send out stops. If you do this quickly at most 100 people will get the newsletter twice:
DECLARE @NewsletterId int;
SET @NewsletterId = [NEW_NEWSLETTERID];
UPDATE ns_Newsletters SET Status = 3 WHERE Id = @NewsletterId
DELETE FROM ns_EmailTrackingItems WHERE SubscriberId IN (
SELECT Id FROM ns_Subscribers WHERE [Status] = 4) AND Newsletter_Id = @NewsletterId
UPDATE ns_Subscribers
SET [Status] = 1
WHERE [Status] = 4
UPDATE ns_Newsletters SET Status = 2 WHERE Id = @NewsletterId
Thats one hell of a hack indeed. I read before similar issues where sending stuck in the middle and I didnt get to utilize NS yet but it will happen soon - so this is indeed interesting to see how you handled that particular case.
Can I check if the bounce collection and marking of email address is working for you properly?
So what you are saying is that some of the subscribers are left out? This works in all other enviroments - might be related to duplication or errors in the validation?
To be 100% we would need to investigate your data - would that be possible?
Please send me a PM at markus [at sign goes here] enkelmedia.se
Hacking Newsletter Studio
In some weird cases the newsletter is not send to the entire list. Resending it to the list will send it twice to the people who were in the first run, so this should be avoided. With the following query I tried to add everyone that wasn't added the first time. The thing is that the send out is now stuck. Am I missing something here? What query does the send out task do, to see to whom he should sent a newsletter? (I tried the below script with bot Status = 0 and status = 1 for the ns_EmailTrackingItems table)
This is what I ended up doing. Not as nice, but it worked nonetheless:
Copy the newsletter that was sent to too little subscribers and send it to the same list.
Send it to the same list. Directly after the send out is started run this sql script, faking an error so that the send out stops. If you do this quickly at most 100 people will get the newsletter twice:
Hi Gijs
Thats one hell of a hack indeed. I read before similar issues where sending stuck in the middle and I didnt get to utilize NS yet but it will happen soon - so this is indeed interesting to see how you handled that particular case.
Can I check if the bounce collection and marking of email address is working for you properly?
cheers
Hi!
This "hack" should not be needed as the send out should work from the beging - let's work on this one.
What version are of Newsletter Studio are you running? Do you see any errors in the logs when the send out fails?
/ m
Hey Markus,
Sorry I didn't get back to you sooner.
It happened a few times again since last April. Today was one of those times.
A successful sendout returns the following results in the dashboard:
But that list has 15085 active subscribers.
Umbraco v6.2.5
Newsletter Studio v1.4.5.1
Hi!
So what you are saying is that some of the subscribers are left out? This works in all other enviroments - might be related to duplication or errors in the validation?
To be 100% we would need to investigate your data - would that be possible?
Please send me a PM at markus [at sign goes here] enkelmedia.se
// m
is working on a reply...