mirror of
https://github.com/axllent/mailpit.git
synced 2026-04-26 16:56:00 +03:00
[GH-ISSUE #202] Feature request / query to migrate emails from MailHog to Mailpit #133
Labels
No labels
awaiting feedback
bug
docker
documentation
enhancement
github_actions
invalid
pull-request
question
stale
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/mailpit#133
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @snaray4 on GitHub (Oct 31, 2023).
Original GitHub issue: https://github.com/axllent/mailpit/issues/202
Hi @axllent,
I am planning on migrating from MailHog to Mailpit and have some 100's of emails in one of the long lived QA environment that I would like to migrate to Mailpit. These are some the emails that we can't afford to lose. I checked the API docs, but couldn't find a way to create messages. Is there a way you would suggest I can achieve this? Thanks.
@axllent commented on GitHub (Oct 31, 2023):
Hi @snaray4. That's a good question. There is no a native way (and won't be) to read the MailHog database as that would involve me basically having to add all the MailHog database drivers, data structure and logic etc into Mailpit's codebase...
But they both share one common "injection" method - SMTP. The simplest solution I can think of is the following:
--use-message-datesflag - this will ensure that the message dates reflected in Mailpit's web UI/API reflect the dates embedded in the emails themselves, and not the current date/time they were received. This effectively "backdates" their supposed delivery dates/times as seen in the message overview.Something like this in the MailHog directory where your MailHog emails are kept) - untested:
If you don't have a compatible sendmail client, then you could use Mailpit directly (also untested):
Does this help you?
@snaray4 commented on GitHub (Oct 31, 2023):
@axllent yes, this sounds like a plan. Thanks for the quick response, appreciate it.