-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API Adds Email Multiple Times Duplicated #20
Comments
Do you have any email verification service enabled ? |
No. I did some more testing and I believe I have isolated the reason for the problem. I do not know why MailWizz would cause a POST request to repeat. This seems like a separate issue. The issue here is that MailWizz adds an email even when it already exists. My post request:
|
Maybe you should use On another note, Mailwizz does check for dupes, but somehow your request is multiplied at the same time and therefore is too fast for mailwizz to catch it for some reason, i assume mainly because the database check for dupes takes too long. You might wanna look at https://kb.mailwizz.com/articles/performance-improvements/ or try to see why the post request gets multiplied, as mailwizz doesn't do this. |
I did some more research and it looks like 90% of the issue is because my client is retrying the POST request due to timeout which is why the POST request is being called multiple times. However, the max number of retries is 1 which means at most, the email should only be added twice. There are instances where emails have been added 3 times. Could the internal HttpClient used by MailWizz have a retry timeout too? See this StackOverflow for a description of the default behavior of HttpClient: https://stackoverflow.com/questions/23054289/httpclient-executes-requests-multiple-time-if-request-timed-out Thanks for the help! |
The client we're using in the code does not do any retry. |
Ok, good to know. I think I've solved the issue by setting retry to 0 in the client. If I get anymore duplicates, I'll reopen this issue for further investigation. Thanks for the help! |
The MailWizz API adds the same email multiple times.
This is my code for adding an email:
//MailWizz require_once dirname(__FILE__) . '/mailwizz.init.php'; $endpoint = new MailWizzApi_Endpoint_ListSubscribers(); //App New Users $response = $endpoint->create('wj730zl99w094', array( 'EMAIL' => $email ));
Doesn't MailWizz automatically check if a subscriber is already added and if so, not add that subscriber again?
The text was updated successfully, but these errors were encountered: