Fixed mailgun config not allowing custom hosts with ports

no issue

- `mailgun()` expects the `host` option not to include a port but `url.host` will include the port, we instead want to use `url.hostname` which skips the port
This commit is contained in:
Kevin Ansfield 2020-07-30 17:28:28 +01:00
parent 56ceb1e312
commit 29d94e7814

View File

@ -11,7 +11,7 @@ function createMailgun(config) {
apiKey: config.apiKey, apiKey: config.apiKey,
domain: config.domain, domain: config.domain,
protocol: baseUrl.protocol, protocol: baseUrl.protocol,
host: baseUrl.host, host: baseUrl.hostname,
port: baseUrl.port, port: baseUrl.port,
endpoint: baseUrl.pathname, endpoint: baseUrl.pathname,
retry: 5 retry: 5