-
Notifications
You must be signed in to change notification settings - Fork 1
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
resubscribe functionality via API #20
Conversation
Hi @andreibaca Do you think it makes sense to always add the If the subscribe response is successful even if the user is not actually subscribed, you have to check the message and then call the resubscribe method and this is not so intuitive. If always adding the parameter is not a problem, I think that is better to add it to the subscribe request so it can handle both cases |
I think it's better to offer more choice and document it. If someone wants to use donotmail_resub he can just use the resubscribe function instead of subscribe. I am not sure what problems could arise if we use this parameters for subscribe all the time since it is not documented, and could even change in the future which could result in errors. |
Actually I will test if it's ok to use resubscribe for new users. |
It seems to simply work for new users when using donotmail_resub=true. May be I overengineered it. Just did not want to mess with existing functionality to make it backwards compatible.. :) |
I just thought of a case where the developer might want to confirm that the user really wants to resubscribe then we need 2 separate methods. |
I have added some more functionality to get the list of subscribers and to count them. |
No problem! Next week I'll review the changes and merge it. |
If the user is unsubscribed Zoho allows only resubscription via form.
The subscription response returns true for success but the message is "Contact belongs to Do-not-mail registry." and user does not receive any confirmation emails and is not subscribed again.
To allow re-subscription a specific parameter has to be added to the request url
donotmail_resub=true
With this parameter the response message is the following
"This is a Donotmail contact or removed contact,So the resubscribtion email is sent to the user. User needs to confirm to successfully subscribe."
And user receives a resubscription confirmation email.
With this pull request resubscribe method is added that works.