Email pdf via https

Hi,

Having a bit of a problem with local phantomjs and emailing pdfs. The pdf is generated normally if you just save it so phantomjs works. But if we want to generate it and send it via email it doesnt work. Log shows:
production.ERROR: PhantomJS - Invalid response https://…

Our .env file has REQUIRE_HTTPS set on True, the APP_URL=https://ninja.ourdomain.com, the PHANTOMJS path is correct and PHANTOMJS_SECRET is something random.

Tried troubleshooting as seen here https://invoice-ninja.readthedocs.io/en/latest/configure.html#troubleshooting . test.jps returns:

\n{
    "contentType": null,
    "headers": [],
    "id": 1,
    "redirectURL": null,
    "stage": "end",
    "status": null,
    "statusText": null,
    "time": "2018-12-28T15:34:01.226Z",
    "url": "https://ninja.sinergise.com/",
    "console": []

Using phantomjs --ignore-ssl-errors=true --ssl-protocol=tlsv1 --web-security=false test.jps returns the same as above so I didn’t even try this - https://www.invoiceninja.com/forums/topic/attach-pdfs-to-emails-using-https-domain/ .

Any ideas? The hostname is ninja.ourdomain.com the /etc/hosts/ has 127.0.0.1 ninja.ourdomain.com localhost . So am running out of ideas.

Nevermind… /etc/hosts was wrong… 127.0.0.1 does not listen https :slight_smile: