Comments (17)
Thanks for the idea @jumoog! MailDev has never preserved state before and I think it might be too drastic a change if that was added to the core, especially something as specific as Mongo. I had thought about adding something like sqlite a while back, but since it's geared more towards development, I thought it would be better to keep it a bit simpler.
I would be open to the idea of creating a way to accept different storage backends which would be published independently on NPM (similar to how browserify has transforms). They could be passed via options. I'm not quite sure how to do this right away, but here's how I could see it working:
$ maildev --plugin maildev-mongo
Or
$ maildev --store mongo
$ maildev --store sqlite
As a side note, are you using MailDev on your own server for development purposes, or to act as your own email client? If you're using it for real world email, I would suggest maybe using something like Haraka?
Let me know what you think!
from maildev.
Haraka is to complex .. MailDev is easy to use and come with a nice gui
mongodb is perfect because we getting the email as json object and mongodb works with json
from maildev.
I'll try to think about a plugin/storage implementation, but I might not have the time right now to hack on this feature, sorry. Currently #30 is the highest priority task for the project. If you need something faster, I would recommend forking the project and trying using something like Mongoose.
from maildev.
I agree that maildev is geared toward development, however it would be convenient to have some sort of simple persistence, when you can't keep maildev always running and still want to view or compare previous emails. Something like Redis may be really easy to implement for fast and simple storage.
from maildev.
@pkat thanks for your thoughts! Adding a Redis adapter into the main project might lead to the desire to add other adapters like Memcached, SQLite, Mongo, etc. I'm totally open the idea of some persistance options, but maybe in the form of a plugin. Perhaps there could be some usage like:
$ maildev --storage=maildev-redis
$ maildev --storage=/path/to/custom-module
Which would use a compatible storage module either installed via npm or potentially something custom written that's API-compatible. What do you think?
from maildev.
Yeah that makes sense. Going the adapter router would keep things more modular and lightweight and allow for any number of data stores. Reminds me of Nodemailer's concept of transport method plugins.
from maildev.
I too would like to see some kind of persistence; not because I want to keep them long term, but rather when developing and testing we need to be able refer to emails across process shutdowns / server reboots. It can problematic to run a test on a system that generates email, make a change, then run it again - hoping to compare the results between the emails - if the process or server has shut down in the mean time.
Even just writing them to files in a path other than /tmp would be very useful.
from maildev.
I kind of already explored that option
https://github.com/donut87/MailDev/tree/persistMails
I stopped using this tool so I did not persue this branch any further. But recall that persisting in temp files was not that hard.
from maildev.
@donut87 - Did you stop using it because you no longer needed it, or because you changed to another tool?
from maildev.
We did not switch to another tool. I would not say we did not need it, but we changed the way we send mails and did not reimplement this.
from maildev.
I like this idea for development. I don't daemonize my Docker containers when I'm developing so I can just kill and restart them quickly. I do all of them at once so there's no links or anything leftover. That means I kill my maildev container.
from maildev.
Any plans to include this feature? I too would like to see some kind of persistence with emails after service restarts.
from maildev.
Sorry it's been a long time ago, we will look into it
from maildev.
+1
from maildev.
Looking forward to this 🔥
from maildev.
+1
from maildev.
+1
from maildev.
Related Issues (20)
- Dockerfile health check is not using correct port and base path HOT 1
- Tarket _blank not always correctly added to head in iframe
- Webhook Communication
- Remember last panelVisibility option selected
- Delete all button not working HOT 5
- the port 1025 doesn't work
- [Vulnerability] Arbitrary File Write leading to Remote Code Execution (RCE) HOT 4
- maildev does not allow STARTTLS advertising
- Health check not working with --wait param of docker compose HOT 1
- ERR_SSL_NO_SUITABLE_SIGNATURE_ALGORITHM without using TLS
- Health check problem with MAILDEV_BASE_PATHNAME, MAILDEV_WEB_USER and MAILDEV_WEB_PASS HOT 1
- Critical Security vulnerabilitie in Docker image
- Config params for testing purposes
- Limiting messages amount HOT 1
- Error on DATA input when sending mail over SMTP
- Cannot connect to the internet from Keycloak docker container HOT 1
- Unhealthy maildev container in docker compose HOT 15
- docker: open /var/lib/docker/tmp/GetImageBlob4135723857: no such file or directory.
- Bad sender address syntax for valid addresses
- Perfomance: is it possible to speed up?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from maildev.