[GH-ISSUE #167] Feature request: receive emails via a mock SES API #110

Closed
opened 2026-03-15 12:36:24 +03:00 by kerem · 6 comments
Owner

Originally created by @crdoconnor on GitHub (Sep 24, 2023).
Original GitHub issue: https://github.com/axllent/mailpit/issues/167

I know this is probably reaching a little, but I thought I'd bring it up anyway :)

I found myself trying to use mailpit with an app that sent emails via SES recently and felt sad that that prevented me from using it, and I had to look at inferior tools like https://github.com/askrella/aws-ses-mock

Originally created by @crdoconnor on GitHub (Sep 24, 2023). Original GitHub issue: https://github.com/axllent/mailpit/issues/167 I know this is probably reaching a little, but I thought I'd bring it up anyway :) I found myself trying to use mailpit with an app that sent emails via SES recently and felt sad that that prevented me from using it, and I had to look at inferior tools like https://github.com/askrella/aws-ses-mock
kerem closed this issue 2026-03-15 12:36:29 +03:00
Author
Owner

@axllent commented on GitHub (Sep 24, 2023):

You are right @crdoconnor, it is reaching 😂 I'll explain why... what you're basically asking is for Mailpit to provide an SES-compatible server endpoint. Whilst I'm sure this is technically possible (ie: that other project you mentioned does it), it requires a full implementation and maintenance of that specific functionality in the Mailpit codebase, and integration with authentication etc. This is just for SES, but then what about the other 20 or so popular (similar) services like Mailgun? I would get flooded for requests for x y and z. It gets really complicated very quickly, adds a huge development load on me, increases the Mailpit binary size, and is a nightmare to maintain.

The alternative (and more feasible) option is to build yourself an "SES-to-SMTP proxy", that would be similar to that project, but which then delivers the emails to Mailpit via SMTP.

<!-- gh-comment-id:1732660602 --> @axllent commented on GitHub (Sep 24, 2023): You are right @crdoconnor, it is reaching 😂 I'll explain why... what you're basically asking is for Mailpit to provide an SES-compatible server endpoint. Whilst I'm sure this is technically possible (ie: that other project you mentioned does it), it requires a full implementation and maintenance of that specific functionality in the Mailpit codebase, and integration with authentication etc. This is just for SES, but then what about the other 20 or so popular (similar) services like Mailgun? I would get flooded for requests for x y and z. It gets really complicated very quickly, adds a huge development load on me, increases the Mailpit binary size, and is a nightmare to maintain. The alternative (and more feasible) option is to build yourself an "SES-to-SMTP proxy", that would be similar to that project, but which then delivers the emails to Mailpit via SMTP.
Author
Owner

@crdoconnor commented on GitHub (Sep 24, 2023):

Yeah, I figured as much :)

<!-- gh-comment-id:1732667229 --> @crdoconnor commented on GitHub (Sep 24, 2023): Yeah, I figured as much :)
Author
Owner

@axllent commented on GitHub (Sep 24, 2023):

Cool :) I'd encourage you to build your own SES-to-SMTP-proxy - I'm sure it's not that difficult as you appear to know python and I'm sure AWS have some python SDKs if needed. From what I could tell (based on the project you linked), it could be as simple as a HTTPD server which accepts a JSON post with some data - and then "forwarding" that email via SMTP.

<!-- gh-comment-id:1732675883 --> @axllent commented on GitHub (Sep 24, 2023): Cool :) I'd encourage you to build your own SES-to-SMTP-proxy - I'm sure it's not that difficult as you appear to know python and I'm sure AWS have some python SDKs if needed. From what I could tell (based on the project you linked), it could be as simple as a HTTPD server which accepts a JSON post with some data - and then "forwarding" that email via SMTP.
Author
Owner

@crdoconnor commented on GitHub (Sep 25, 2023):

Yeah, I could and I probably will next time - this solution did occur to me. I think it's probably not quite as good a solution because it's another weighty service (on top of the 6-7 that are already running in parallel) which means those already CPU and RAM hungry tests become even more hungry. It would also have been super nice for mailpit to be 99% a one stop shop for everyone's mail testing needs when it's already 90% there.

I understand the desire to maintain the conceptual integrity of mailpit, though and obviously your vision for this app is going to be different to mine. And, as you said, if you do SES why not mailgun as well (although I think that would be nice too!) - there is a maintenance cost for all of this.

<!-- gh-comment-id:1733366416 --> @crdoconnor commented on GitHub (Sep 25, 2023): Yeah, I could and I probably will next time - this solution did occur to me. I think it's probably not quite as good a solution because it's another weighty service (on top of the 6-7 that are already running in parallel) which means those already CPU and RAM hungry tests become even more hungry. It would also have been super nice for mailpit to be 99% a one stop shop for everyone's mail testing needs when it's already 90% there. I understand the desire to maintain the conceptual integrity of mailpit, though and obviously your vision for this app is going to be different to mine. And, as you said, if you do SES why not mailgun as well (although I think that would be nice too!) - there is a maintenance cost for all of this.
Author
Owner

@axllent commented on GitHub (Sep 25, 2023):

I think you'd be surprised just how little overhead a single proxy httpd service uses in terms of resources. I understand your point about wanting Mailpit to do it all, but it's just not feasible to build and maintain such a variety of mail transfer protocols properly. I've also had requests to add POP3 and IMAP support too, but with the same result ultimately. There's no reason a pop service couldn't be integrated with the Mailpit API, and the same applies to IMAP. This way somebody else also gets to invest their time, knowledge and skills too.

<!-- gh-comment-id:1733482395 --> @axllent commented on GitHub (Sep 25, 2023): I think you'd be surprised just how little overhead a single proxy httpd service uses in terms of resources. I understand your point about wanting Mailpit to do it all, but it's just not feasible to build and maintain such a variety of mail transfer protocols properly. I've also had requests to add POP3 and IMAP support too, but with the same result ultimately. There's no reason a pop service couldn't be integrated with the Mailpit API, and the same applies to IMAP. This way somebody else also gets to invest their time, knowledge and skills too.
Author
Owner

@axllent commented on GitHub (Sep 25, 2023):

And thanks for the sponsorship, I really appreciate it ❤️

<!-- gh-comment-id:1733486073 --> @axllent commented on GitHub (Sep 25, 2023): And thanks for the sponsorship, I really appreciate it ❤️
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#110
No description provided.