Upstream maildev/maildev state of the touched files before f6ee0b5f24
This commit is contained in:
1 parent
15ecda681f
commit
77bb28b844
6 files changed
+13
-69
No files matched your search
@@ -457,11 +457,11 @@ export class APIServer extends EventEmitter {
|
||||
`${apiPath}/email/:id/html`,
|
||||
async (request, reply) => {
|
||||
const { id } = request.params
|
||||
const baseUrl = request.headers.host ?? ''
|
||||
|
||||
try {
|
||||
if (this.smtp) {
|
||||
// No host: the HTML is rendered for a browser already on this origin
|
||||
const html = await this.smtp.getEmailHtml(id, { basePath })
|
||||
const html = await this.smtp.getEmailHtml(id, { baseUrl })
|
||||
if (!html) {
|
||||
return reply.status(404).send({ error: 'Email has no HTML content' })
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user