Closed xpepermint closed 9 years ago
crotte.
I really liked the library but that's how things are :).
Haraka looks awesome but it is not that easy to setup. Mailin until now is really easy, so that would be a key feature. In addition, haraka has a powerful plugin infrastructure. An haraka plugin can hook up to the correct events. So, a possibility is mailin becoming a wrapper for haraka (like it is today a wrapper for simplesmtp somehow) + a plugin to listen to the correct events. Mailin would setup a nicely configured Haraka instance with all the correct plugins loaded. That sound awesome but that is also a major piece of work, almost a rewrite of the actual mailin.
Yeah, this will be fun. I'll try Haraka and see what options we have.
Nice!
@Flolagale Haraka looks veeeeeeeery promising but it would be an overkill for this project. Well... SMTP protocol will not change right ?:) I guess we could stick to that deprecated module until something new comes up.
Haha! Ok, thanks for having investigated.
Switching over to Haraka would be nice. I'm sure the simplesmtp authors knew why the depreciation notice is a must, as simplesmtp will break in the next release of nodejs. We need a good game plan too.
So does anyone has ideas of what to do next? what to use? Fast look over Haraka lets me agree with @xpepermint that it's overkil.
I did not find any alternative other than Haraka. Haraka looks awesome and it would enable us to receive and forward emails, however dropping simplesmtp would require a consequent amount of work. @heri16 Why do you say that simplesmtp will break in the next release of node ?
It's written in the depreciation notice that it will break in the next release.
I ran into the same issue and tried Haraka - it was way to complicated and went with https://github.com/substack/node-smtp-protocol
Interesting, I'll have a look at it! For what type of project are you using it?
Something like mailin, parse inbound emails for conversations by a unqiue email and posting them to a REST api. It's very basic so no dkim, spf or spam score and no attachments so far (started working on this yesterday)
Ok thanks.
Here is a small gist what works for me, maybe you can use parts of it: https://gist.github.com/steffenmllr/cb3d3af13d0263adf268
@Flolagale Any recommendations for parsing the body and striping the text from the received mail or do you just put a response above this line
hint in the mails?
I'm note sure to understand your question @steffenmllr. Do you mean in Mailin?
I't about striping the email reply - something like https://github.com/pgherveou/mailstrip (which only supports english ...) but it looks like that this is not a feature in mailin so nevermind :)
Ok! mailstrip looks good. If you send the email which is replied to, @Verdier came up with a nice trick which works fairly well for html emails. All you have to do is to start the first email with a <a>
mailto tag with nothing inside:
<a href="mailto:dummy@email.com"></a>
<div>
this is my first email
</div
So that the replied email looks like:
<div>
This is the reply to the previous email
</div>
<a href="mailto:dummy@email.com"></a>
<div>
this is my first email
</div
Then when you receive the reply, you can discard everything which is after this tag.
Since there is nothing in the tag, it is not visible and these mailto links are not stripped by most of the email clients. The email client support is hence fairly good.
If you do not send the first email yourself, unfortunately you'll have to write a lot of regexps and unit tests as in mailstrip ;-).
Thanks, that is a really a nice trick! (nobody really wants to write regexps. Ever.)
Or you can take over the simplesmtp project to be compatible with future version of node ... Haraka is good but as you said it's a heavy dependency.
Nevermind the author of simplesmtp has created a successor : https://github.com/andris9/smtp-server
Awesome! Thanks for the news @zeroware.
sooo, any news on https://github.com/andris9/smtp-server integration?
Not for the moment, but this is definitely something I'd like to do.
PR #44 updates to use smtp-server
Thanks to @DavidTanner mailin 3.0.0+ now uses smtp-server and runs on node ^0.12.0 and iojs.
From https://github.com/andris9/simplesmtp
We'll have to move to Haraka?