Hey @Kevin, I’m experiencing the same problem:
[2021-06-16 17:29:50] ERROR "POST /ghost/api/canary/admin/email_preview/posts/60ca346d9d993c09ba8864a8/" 500 62ms
NAME: EmailError
CODE: BULK_EMAIL_SEND_FAILED
MESSAGE: The server has encountered an error.
level: normal
"The email service was unable to send an email batch."
EmailError: The server has encountered an error.
at EmailError.GhostError (/var/www/ghost/versions/4.6.4/node_modules/@tryghost/errors/lib/errors.js:10:26)
at new EmailError (/var/www/ghost/versions/4.6.4/node_modules/@tryghost/errors/lib/errors.js:34:20)
at /var/www/ghost/versions/4.6.4/core/server/services/bulk-email/index.js:237:30
at async Object.sendTestEmail (/var/www/ghost/versions/4.6.4/core/server/services/mega/mega.js:89:22)
at async Object.query (/var/www/ghost/versions/4.6.4/core/server/api/canary/email-preview.js:72:30)
TypeError [ERR_UNESCAPED_CHARACTERS]: Request path contains unescaped characters
at new ClientRequest (_http_client.js:147:13)
at Object.request (https.js:316:10)
at Object.<anonymous> (/var/www/ghost/versions/4.6.4/node_modules/agent-base/patch-core.js:25:22)
at Object.request (/var/www/ghost/versions/4.6.4/node_modules/socks-proxy-agent/node_modules/agent-base/patch-core.js:23:20)
at Request.performRequest (/var/www/ghost/versions/4.6.4/node_modules/mailgun-js/lib/request.js:360:21)
at /var/www/ghost/versions/4.6.4/node_modules/mailgun-js/lib/request.js:143:14
at retryAttempt (/var/www/ghost/versions/4.6.4/node_modules/async/dist/async.js:4611:9)
at retry (/var/www/ghost/versions/4.6.4/node_modules/async/dist/async.js:4622:5)
at Request._request (/var/www/ghost/versions/4.6.4/node_modules/mailgun-js/lib/request.js:141:7)
at promisifyCall (/var/www/ghost/versions/4.6.4/node_modules/promisify-call/index.js:25:15)
at Request.request (/var/www/ghost/versions/4.6.4/node_modules/mailgun-js/lib/request.js:161:12)
at Mailgun.request (/var/www/ghost/versions/4.6.4/node_modules/mailgun-js/lib/mailgun.js:98:16)
at constructor.impl (/var/www/ghost/versions/4.6.4/node_modules/mailgun-js/lib/build.js:101:26)
at promisifyCall (/var/www/ghost/versions/4.6.4/node_modules/promisify-call/index.js:25:15)
at constructor.promisifed [as send] (/var/www/ghost/versions/4.6.4/node_modules/mailgun-js/lib/build.js:105:14)
at Promise.reject.error.error (/var/www/ghost/versions/4.6.4/core/server/services/bulk-email/mailgun.js:103:40)
at new Promise (<anonymous>)
at Object.send (/var/www/ghost/versions/4.6.4/core/server/services/bulk-email/mailgun.js:102:16)
at Object.send (/var/www/ghost/versions/4.6.4/core/server/services/bulk-email/index.js:232:32)
at Object.sendTestEmail (/var/www/ghost/versions/4.6.4/core/server/services/mega/mega.js:89:45)
at async Object.query (/var/www/ghost/versions/4.6.4/core/server/api/canary/email-preview.js:72:30)
[2021-06-16 17:30:11] INFO "GET /ghost/api/canary/admin/members/stats/count/" 200 98ms
[2021-06-16 17:30:11] INFO "GET /ghost/api/canary/admin/posts/?limit=30&page=1&filter=status%3A%5Bdraft%2Cscheduled%2Cpublished%5D" 200 219ms
[2021-06-16 17:30:16] INFO "GET /ghost/api/canary/admin/settings/?group=site%2Ctheme%2Cprivate%2Cmembers%2Cportal%2Cnewsletter%2Cemail%2Camp%2Clabs%2Cslack%2Cunsplash%2Cviews%2Cfirstpromoter%2Coauth%2Ceditor" 200 14ms
[2021-06-16 17:30:16] INFO "GET /ghost/api/canary/admin/members/?limit=1&filter=subscribed%3Atrue%2B(status%3Afree%2Cstatus%3A-free)&include=labels%2CemailRecipients" 200 53ms
[2021-06-16 17:30:16] INFO "GET /ghost/api/canary/admin/members/?limit=1&filter=subscribed%3Atrue&include=labels%2CemailRecipients" 200 53ms
[2021-06-16 17:30:16] INFO "GET /ghost/api/canary/admin/labels/?limit=all" 200 51ms
It seems Ghost is failing the form and submit the payload for bulk email. Another thing is it seems to be using a canary API to send the e-mail. Am I correct?
The weirdest thing is the transaction e-mail is working normally but the bulk e-mail simply fails every time. It sounds like a bug to me. I checked the API key a hundred times (it’s not that, believe me).