[GH-ISSUE #3499] [bug]: Self hosted email send error #1183

Closed
opened 2026-03-16 19:01:37 +03:00 by kerem · 1 comment
Owner

Originally created by @jobartim44 on GitHub (Nov 6, 2023).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/3499

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

The continue with email and sending the magic links fails with error on both admin and in hoppscotch app.

I have setup the environment variable like following:
MAILER_SMTP_URL="smtps://noreply@mydomain.com:password@mail.mydomain.com"
MAILER_ADDRESS_FROM='"From mycompany Hoppscotch" noreply@mydomain.com'

I even tried with MailCatcher like explained in this tutorial.
MAILER_SMTP_URL="smtp://host.docker.internal:1025"
MAILER_ADDRESS_FROM='"From my company Hoppscotch" noreply@mydomain.com'
I can see the MailCatcher ui running on 1080 port.

But I got following issue on hoppscotch admin app:
https://hoppapi.mydomain.com/v1/auth/signin?origin=admin 500 (Internal Server Error)
Error: Request failed with status code 500
at tu (index.8d42fd3d.js:67:8560)
at nu (index.8d42fd3d.js:67:8743)
at XMLHttpRequest.m (index.8d42fd3d.js:68:16
{"statusCode":500,"message":"Internal server error"}

The docker container shows the following:
[Nest] 19 - 08/16/2023, 9:31:18 AM ERROR [ExceptionsHandler] email/failed
hoppscotch-backend | Error: email/failed
hoppscotch-backend | at throwErr (/usr/src/app/dist/utils.js:13:11)
hoppscotch-backend | at MailerService.sendEmail (/usr/src/app/dist/mailer/mailer.service.js:39:41)
hoppscotch-backend | at async AuthService.signInMagicLink (/usr/src/app/dist/auth/auth.service.js:153:9)
hoppscotch-backend | at async AuthController.signInMagicLink (/usr/src/app/dist/auth/auth.controller.js:36:31)
hoppscotch-backend | at async /usr/src/app/node_modules/.pnpm/https://github.com/nestjs+core@9.2.1_@nestjs+common@9.2.1_@nestjs+platform-express@9.2.1_reflect-metadata@0.1.13_rxjs@7.6.0/node_modules/https://github.com/nestjs/core/router/router-execution-context.js:46:28
hoppscotch-backend | at async /usr/src/app/node_modules/.pnpm/@nestjs+core@9.2.1_@nestjs+common@9.2.1_@nestjs+platform-express@9.2.1_reflect-metadata@0.1.13_rxjs@7.6.0/node_modules/@nestjs/core/router/router-proxy.js:9:17

I am using Alma Linux 9. Please let me know if I need to make any settings related to server or If I am missing something.

Steps to reproduce

Go to hoppscotch admin app.
Click continue with email button
Input your email
Click send the magic link button

For hoppscotch app

Click login
Continue with email
Input your email
Send magic link

Environment

Production

Version

Self-hosted

Originally created by @jobartim44 on GitHub (Nov 6, 2023). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/3499 ### Is there an existing issue for this? - [X] I have searched the existing issues ### Current behavior The continue with email and sending the magic links fails with error on both admin and in hoppscotch app. I have setup the environment variable like following: MAILER_SMTP_URL="smtps://[noreply@mydomain.com](mailto:noreply@mydomain.com):[password@mail.mydomain.com](mailto:password@mail.mydomain.com)" MAILER_ADDRESS_FROM='"From mycompany Hoppscotch" [noreply@mydomain.com](mailto:noreply@mydomain.com)' I even tried with MailCatcher like explained in [this](https://medium.com/@kiranjohns/self-host-your-api-testing-with-hoppscotch-the-open-source-api-platform-cbe8b62d3c54) tutorial. MAILER_SMTP_URL="smtp://host.docker.internal:1025" MAILER_ADDRESS_FROM='"From my company Hoppscotch" [noreply@mydomain.com](mailto:noreply@mydomain.com)' I can see the MailCatcher ui running on 1080 port. But I got following issue on hoppscotch admin app: https://hoppapi.mydomain.com/v1/auth/signin?origin=admin 500 (Internal Server Error) Error: Request failed with status code 500 at tu (index.8d42fd3d.js:67:8560) at nu (index.8d42fd3d.js:67:8743) at XMLHttpRequest.m (index.8d42fd3d.js:68:16 {"statusCode":500,"message":"Internal server error"} The docker container shows the following: [Nest] 19 - 08/16/2023, 9:31:18 AM ERROR [ExceptionsHandler] email/failed hoppscotch-backend | Error: email/failed hoppscotch-backend | at throwErr (/usr/src/app/dist/utils.js:13:11) hoppscotch-backend | at MailerService.sendEmail (/usr/src/app/dist/mailer/mailer.service.js:39:41) hoppscotch-backend | at async AuthService.signInMagicLink (/usr/src/app/dist/auth/auth.service.js:153:9) hoppscotch-backend | at async AuthController.signInMagicLink (/usr/src/app/dist/auth/auth.controller.js:36:31) hoppscotch-backend | at async /usr/src/app/node_modules/.pnpm/https://github.com/nestjs+core@[9.2.1_@nestjs](mailto:9.2.1_@nestjs)+common@[9.2.1_@nestjs](mailto:9.2.1_@nestjs)+platform-express@9.2.1_reflect-metadata@0.1.13_rxjs@7.6.0/node_modules/https://github.com/nestjs/core/router/router-execution-context.js:46:28 hoppscotch-backend | at async /usr/src/app/node_modules/.pnpm/@nestjs+core@[9.2.1_@nestjs](mailto:9.2.1_@nestjs)+common@[9.2.1_@nestjs](mailto:9.2.1_@nestjs)+platform-express@9.2.1_reflect-metadata@0.1.13_rxjs@7.6.0/node_modules/@nestjs/core/router/router-proxy.js:9:17 I am using Alma Linux 9. Please let me know if I need to make any settings related to server or If I am missing something. ### Steps to reproduce Go to hoppscotch admin app. Click continue with email button Input your email Click send the magic link button For hoppscotch app Click login Continue with email Input your email Send magic link ### Environment Production ### Version Self-hosted
kerem 2026-03-16 19:01:37 +03:00
Author
Owner

@jobartim44 commented on GitHub (Nov 6, 2023):

Duplicate

<!-- gh-comment-id:1794405254 --> @jobartim44 commented on GitHub (Nov 6, 2023): Duplicate
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#1183
No description provided.