Hello,
I have now tested Mailgun using the command line on my server:
curl -s --user 'api:redacted-aaaaaaaa-aaaaaaaa' https://api.eu.mailgun.net/v3/blog.example.org.uk/messages -F from='Blog <noreply@blog.example.org.uk>' -F to=me@example.org.uk -F subject='Testing from SSH' -F text='Testing mailgun from Blog server.'
The email is correctly delivered.
The problem only seems to be when sending emails via the members feature. Specifically the “Email Newsletter > send test email” function.
The Ghost log shows:
{“name”:“Log”,“hostname”:“blog-server”,“pid”:12337,“level”:30,“req”:{“meta”:{“requestId”:“a5651543-7627-44f7-88e9-09a341881798”,“userId”:“5”},“url”:“/email_preview/posts/redacted/”,“method”:“POST”,“originalUrl”:“/ghost/api/v3/admin/email_preview/posts/redacted/”,“params”:{“id”:“redacted”},“headers”:{“host”:“blog.example.org.uk”,“x-forwarded-proto”:“https”,“x-real-ip”:“redacted”,“x-forwarded-for”:“redacted, redacted”,“connection”:“close”,“content-length”:“38”,“accept-encoding”:“gzip”,“cf-ray”:“1354198b9ebc6a83-LHR”,“cf-visitor”:“{"scheme":"https"}”,“user-agent”:“Mozilla/5.0 (X11; Linux x86_64; rv:75.0) Gecko/20100101 Firefox/75.0”,“accept”:“application/json, text/javascript, /; q=0.01”,“accept-language”:“en-GB”,“referer”:“https://blog.example.org.uk/ghost/",“content-type”:"application/json; charset=UTF-8”,“x-ghost-version”:“3.13”,“app-pragma”:“no-cache”,“x-requested-with”:“XMLHttpRequest”,“origin”:“https://blog.example.org.uk”,“dnt”:“1”,“cookie”:“REDACTED”,“cf-request-id”:“redacted”,“cf-connecting-ip”:“redacted”,“cdn-loop”:“cloudflare”},“query”:{}},“res”:{“_headers”:{“x-powered-by”:“Express”,“cache-control”:“no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0”,“access-control-allow-origin”:“https://blog.example.org.uk”,“vary”:“Origin, Accept-Encoding”,“content-type”:“application/json; charset=utf-8”,“content-length”:“2”,“etag”:“W/"2-vyHn7IuFo4RvsFtPoIWeCReyIC8"”},“statusCode”:200,“responseTime”:“218ms”},“msg”:“”,“time”:“2020-04-25T12:34:43.377Z”,“v”:0
Any assistance would be gratefully received.
Many thanks,
Jonathan