[GH-ISSUE #594] Default mail address when releasing message #382

Closed
opened 2026-03-15 14:09:51 +03:00 by kerem · 13 comments
Owner

Originally created by @gabriele-v on GitHub (Dec 12, 2025).
Original GitHub issue: https://github.com/axllent/mailpit/issues/594

Hello,
in my use case I'm using mailpit in dev environment just changing the app SMTP configuration from production one, so mail recipients are real addresses that I don't want to send mails when debugging.

I need to release mails to my mailbox to double check the result, so basically every time I need to override the mail address inserted into release function. It would be helpful to have it automatically populated.

I'll leave it up to you to choose the best approach, taking into account any other scenarios you may be aware of.
Personally, the following come to mind:

  • Adding another parameter
  • Use the mailbox of MP_SMTP_RELAY_ALLOWED_RECIPIENTS if it's set to a single mail address
  • Save the last used mail address somewhere in the browser (cookie, session, etc..) if it has been override from the original one

Thank you very much for the platform, it's really useful and almost perfect!

Originally created by @gabriele-v on GitHub (Dec 12, 2025). Original GitHub issue: https://github.com/axllent/mailpit/issues/594 Hello, in my use case I'm using mailpit in dev environment just changing the app SMTP configuration from production one, so mail recipients are real addresses that I don't want to send mails when debugging. I need to release mails to my mailbox to double check the result, so basically every time I need to override the mail address inserted into release function. It would be helpful to have it automatically populated. I'll leave it up to you to choose the best approach, taking into account any other scenarios you may be aware of. Personally, the following come to mind: - Adding another parameter - Use the mailbox of MP_SMTP_RELAY_ALLOWED_RECIPIENTS if it's set to a single mail address - Save the last used mail address somewhere in the browser (cookie, session, etc..) if it has been override from the original one Thank you very much for the platform, it's really useful and almost perfect!
kerem 2026-03-15 14:09:51 +03:00
Author
Owner

@axllent commented on GitHub (Dec 12, 2025):

Hi @gabriele-v . I believe the functionality you are describing already exists - by using forwarding instead of releasing.

<!-- gh-comment-id:3648365828 --> @axllent commented on GitHub (Dec 12, 2025): Hi @gabriele-v . I believe the functionality you are describing already exists - by using [forwarding](https://mailpit.axllent.org/docs/configuration/smtp-forward/) instead of releasing.
Author
Owner

@gabriele-v commented on GitHub (Dec 12, 2025):

Not really, because forwarding is forwarding all of them. I'd like to release only someones, when everything looks ok.

<!-- gh-comment-id:3648368334 --> @gabriele-v commented on GitHub (Dec 12, 2025): Not really, because forwarding is forwarding all of them. I'd like to release only someones, when everything looks ok.
Author
Owner

@axllent commented on GitHub (Dec 12, 2025):

OK, I understand your use-case better. I won't make this a global setting (ie: env or flag), but this could definitely be a browser setting, such as an option to "Save send to" with a "Click to apply" ... or something... in the release modal. I will need to give this a lot more thought as the UI/UX needs to make sense to everyone. If you have suggestions of how the UI could work I'll gladly take that into consideration.

<!-- gh-comment-id:3648466607 --> @axllent commented on GitHub (Dec 12, 2025): OK, I understand your use-case better. I won't make this a global setting (ie: env or flag), but this could definitely be a browser setting, such as an option to "Save send to" with a "Click to apply" ... or something... in the release modal. I will need to give this a lot more thought as the UI/UX needs to make sense to everyone. If you have suggestions of how the UI could work I'll gladly take that into consideration.
Author
Owner

@gabriele-v commented on GitHub (Dec 13, 2025):

Maybe adding another checkbox option here "Save as default releasing addresses".
When enabled and release is clicked, for next releases addresses are automatically inserted into "Send to" and checkbox is enabled. If checkbox is then disabled, it reverts to the original behaviour.

Image
<!-- gh-comment-id:3649378495 --> @gabriele-v commented on GitHub (Dec 13, 2025): Maybe adding another checkbox option here "Save as default releasing addresses". When enabled and release is clicked, for next releases addresses are automatically inserted into "Send to" and checkbox is enabled. If checkbox is then disabled, it reverts to the original behaviour. <img width="1422" height="386" alt="Image" src="https://github.com/user-attachments/assets/cd47d6fd-6e84-4137-aa78-22b0f18fd1ab" />
Author
Owner

@axllent commented on GitHub (Dec 14, 2025):

Thanks for the suggestion, I'll definitely look at this some time over the next few weeks - sorry, I'm really busy at the moment with end-of-year work commitments.

<!-- gh-comment-id:3650466905 --> @axllent commented on GitHub (Dec 14, 2025): Thanks for the suggestion, I'll definitely look at this some time over the next few weeks - sorry, I'm really busy at the moment with end-of-year work commitments.
Author
Owner

@gabriele-v commented on GitHub (Dec 14, 2025):

No worries, not urgent on my side, I'll just type my mail more times :)

<!-- gh-comment-id:3650467618 --> @gabriele-v commented on GitHub (Dec 14, 2025): No worries, not urgent on my side, I'll just type my mail more times :)
Author
Owner

@iamgerwin commented on GitHub (Dec 18, 2025):

Hi @gabriele-v,

Thank you for the feature request! This is indeed a useful enhancement for development workflows.

I've submitted PR #595 that implements a new configuration option to address this use case. The solution adds:

New Configuration Options:

  • Environment variable: MP_SMTP_RELAY_DEFAULT_RELEASE_TO
  • YAML config: default-release-to

How it works:

  • When configured, the release form pre-populates with your specified default address instead of the original message recipients
  • The original message addresses (To/Cc/Bcc) remain available in the dropdown, so you can still select them if needed
  • A helpful note is displayed in the release modal indicating that a default address has been configured
  • When not configured, the existing behavior is preserved

Example usage:

# Environment variable
export MP_SMTP_RELAY_DEFAULT_RELEASE_TO=myemail@example.com

Or in your relay YAML configuration:

default-release-to: myemail@example.com

This approach follows the existing configuration patterns in Mailpit and integrates seamlessly with the current relay settings.

Looking forward to the maintainer's review!

<!-- gh-comment-id:3670774976 --> @iamgerwin commented on GitHub (Dec 18, 2025): Hi @gabriele-v, Thank you for the feature request! This is indeed a useful enhancement for development workflows. I've submitted PR #595 that implements a new configuration option to address this use case. The solution adds: **New Configuration Options:** - Environment variable: `MP_SMTP_RELAY_DEFAULT_RELEASE_TO` - YAML config: `default-release-to` **How it works:** - When configured, the release form pre-populates with your specified default address instead of the original message recipients - The original message addresses (To/Cc/Bcc) remain available in the dropdown, so you can still select them if needed - A helpful note is displayed in the release modal indicating that a default address has been configured - When not configured, the existing behavior is preserved **Example usage:** ```bash # Environment variable export MP_SMTP_RELAY_DEFAULT_RELEASE_TO=myemail@example.com ``` Or in your relay YAML configuration: ```yaml default-release-to: myemail@example.com ``` This approach follows the existing configuration patterns in Mailpit and integrates seamlessly with the current relay settings. Looking forward to the maintainer's review!
Author
Owner

@gabriele-v commented on GitHub (Dec 18, 2025):

Hi @iamgerwin thanks for the PR.
I don't think that's exactly how @axllent was discussing before, but let's see what he thinks about.

<!-- gh-comment-id:3671595935 --> @gabriele-v commented on GitHub (Dec 18, 2025): Hi @iamgerwin thanks for the PR. I don't think that's exactly how @axllent was discussing before, but let's see what he thinks about.
Author
Owner

@axllent commented on GitHub (Dec 18, 2025):

Thanks guys. Whilst @gabriele-v is correct (that wasn't my suggested approach), I'll definitely take a look at what @iamgerwin has submitted. I'm currently finishing up for a very busy work year, but I will find time in the next week or two to look into this and provide feedback (if necessary).

<!-- gh-comment-id:3671633645 --> @axllent commented on GitHub (Dec 18, 2025): Thanks guys. Whilst @gabriele-v is correct (that wasn't my suggested approach), I'll definitely take a look at what @iamgerwin has submitted. I'm currently finishing up for a very busy work year, but I will find time in the next week or two to look into this and provide feedback (if necessary).
Author
Owner

@axllent commented on GitHub (Jan 7, 2026):

Sorry about the delay here - I have not forgotten about this feature, I just got caught up in a security issue which required my attention and time. I have started looking into this today and how to have something out by the end of the week.

<!-- gh-comment-id:3718069879 --> @axllent commented on GitHub (Jan 7, 2026): Sorry about the delay here - I have not forgotten about this feature, I just got caught up in a security issue which required my attention and time. I have started looking into this today and how to have something out by the end of the week.
Author
Owner

@axllent commented on GitHub (Jan 10, 2026):

I've released v1.28.2 which includes this new feature. The default release email (or emails) can be set/edited in the web UI settings.

<!-- gh-comment-id:3731762669 --> @axllent commented on GitHub (Jan 10, 2026): I've released [v1.28.2](https://github.com/axllent/mailpit/releases/tag/v1.28.2) which includes this new feature. The default release email (or emails) can be set/edited in the web UI settings.
Author
Owner

@gabriele-v commented on GitHub (Jan 10, 2026):

Hello, I confirm is working as expected, thank you!

Just for information I've found a small bug, don't know if it can be fixed or a note about that may be added in "Message Release" tab

How to reproduce:

  • Open a email and click release
  • Click "can be configured in Settings"
  • Set the default and click close
  • Reclick release, default is not applied
  • Open another email and click release, default is applied

Also in this case is not applied:

  • Open a email
  • Click gearbox icon at bottom left
  • Set the default and click close
  • Click release in open mail, default is not applied
  • Open another email and click release, default is applied
<!-- gh-comment-id:3732128167 --> @gabriele-v commented on GitHub (Jan 10, 2026): Hello, I confirm is working as expected, thank you! Just for information I've found a small bug, don't know if it can be fixed or a note about that may be added in "Message Release" tab How to reproduce: - Open a email and click release - Click "can be configured in Settings" - Set the default and click close - Reclick release, default is not applied - Open another email and click release, default is applied Also in this case is not applied: - Open a email - Click gearbox icon at bottom left - Set the default and click close - Click release in open mail, default is not applied - Open another email and click release, default is applied
Author
Owner

@axllent commented on GitHub (Jan 10, 2026):

Hi @gabriele-v - thanks for the feedback, and great to hear it's working well!

I am aware of the glitch you describe - I just wasn't able to find an elegant solution prior to the release as my primary focus was on the two recent security-related fixes. I have just pushed a fix for this issue which will be included in the next release, however given that I have just released two new versions in the last week, it will need to wait until next weekend at the earliest.

<!-- gh-comment-id:3732243195 --> @axllent commented on GitHub (Jan 10, 2026): Hi @gabriele-v - thanks for the feedback, and great to hear it's working well! I am aware of the glitch you describe - I just wasn't able to find an elegant solution prior to the release as my primary focus was on the two recent security-related fixes. I have just pushed a fix for this issue which will be included in the next release, however given that I have just released two new versions in the last week, it will need to wait until next weekend at the earliest.
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/mailpit#382
No description provided.