Skip to content
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

Notification email not sent to subscribers when consent model set to none #14

Open
hispanic opened this issue Oct 24, 2021 · 1 comment

Comments

@hispanic
Copy link
Owner

hispanic commented Oct 24, 2021

Hi, Michael
first of all, thank you for all the additional work you did on Staticman here. I'm just right now trying to get it to work. I have already working instance of original Staticman on my heroku and was initially set to do some work on my fork but i stumbled upon your fork-revision : Staticwoman. It seems to just have all i need. I did deployed your fork on heroku as well.

Did every configuration required but i'm stuck on last piece of everything : Mailgun sending notification email to subscribers. It does NOT send it all and i have no idea what is happening withing the instance as there is now visible errors on heroku logs.

It's weird even more because i'm using IDENTICAL configuration of my mailgun domain on your instance. I can see Staticwoman creating mailing list actually, but emails are not sent. I have consent model set to "none" - every required variables copied verbatim from previous Staticman instance to this one and i have them as heroku Config Vars.
(but i also tried with config.production.json with domain and apikey properly encrypted....)

Do you have any idea how can i debug this issue ? because everything else seems to work A-OK (including adding subscribers to mailing list as i mentioned -> so it seems that Staticwoman is properly communicating with Mailgun API)

I would love to get into the problem myself and not waste your time but i don't see any way how i can debug this line by line what is happening -> i see console.logs here and there, like in SubscriptionsManager but they are not showing on heroku

p.s. should i use Mailgun Private API KEY with this fork or maybe something changed i need to use Mailgun's "Sending API keys" (defined explicitly for certain domain)

p.s. 2
Using Mailgun API via curl seems to work as well (using same API key same mailgun host and domain)

Any help or advise would be great

Originally posted by @radekkozak in PR #12 (comment)

@hispanic
Copy link
Owner Author

@radekkozak

first of all, thank you for all the additional work you did on Staticman here.

You're welcome!

I have consent model set to "none"

To be honest, this could be the issue. I typically/only set the consentModel to double. It's not hard for me to imagine a bug in the code that is triggered when setting it to other values.

i see console.logs here and there, like in SubscriptionsManager but they are not showing on heroku

Well, that's not very helpful. :P They don't even show up when tailing?
heroku logs -a [your-heroku-app] --tail

Given everything you've explained here, it sounds like you know what you are doing. I suggest running the codebase locally and pumping some messages at it:
heroku local -p 8082 web

That way, you can debug the code and see the log statements. With that being said, are you sure that you have more than one subscriber configured in Mailgun? As noted in the code:

   * Only send a notification email if the commenter is NOT the only subscriber found in the
   * mailing list. This avoids the clumsy scenario where someone makes the first comment on a
   * post (while choosing to subscribe to future comments) and then is sent a notification
   * email for their own comment.

Unfortunately, I don't see myself digging into this anytime real soon. Let me know what you turn up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant