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

Allow for configuring the Mailgun region/host #12

Merged
merged 2 commits into from
Mar 21, 2021
Merged

Conversation

hispanic
Copy link
Owner

This addresses eduardoboucas#274 - "Add support for mailgun EU-region api"

The following property has been added to the schema for the JSON-formatted "server" configuration file:

    apiHost: {
      doc: 'Mailgun API host/region to be used for email notifications. Will be overridden by a `notifications.apiHost` parameter in the site/repo config, if one is set.',
      format: String,
      default: 'api.mailgun.net',
      env: 'EMAIL_API_HOST'
    },

A corollary property has been added to the YAML-formatted "site/repo" file. This allows for targeting either the US or EU Mailgun region.

Michael Harry Scepaniak added 2 commits March 21, 2021 19:32
…EU-region api"

- Allow for the Mailgun region/host to be configured instead of assuming the US region.
@hispanic hispanic merged commit b59f43b into dev Mar 21, 2021
@radekkozak
Copy link

radekkozak commented Oct 21, 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

@hispanic
Copy link
Owner Author

@radekkozak I've created issue #14 to track this.

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

Successfully merging this pull request may close these issues.

None yet

2 participants