alash3al / smtp2http

A tiny software that receive a smtp request (email) and send it to the specified webhook as a http post request
Apache License 2.0
512 stars 79 forks source link

Issue getting the utility #6

Closed roshanjonah closed 4 years ago

roshanjonah commented 4 years ago

root@chat-srv1:/home/chat# go get github.com/uflare/smtp2http

# github.com/uflare/smtp2http
/root/work/src/github.com/uflare/smtp2http/handler.go:25:33: cannot use req.Message (type *mail.Message) as type io.Reader in argument to parsemail.Parse:
    *mail.Message does not implement io.Reader (missing Read method)
/root/work/src/github.com/uflare/smtp2http/handler.go:30:8: undefined: resty.R
skorokithakis commented 4 years ago

You can get the resty dependency by changing the import, but I don't know how to fix the first one.

skorokithakis commented 4 years ago

I managed to fix this on my fork: https://github.com/skorokithakis/smtp2http

roshanjonah commented 4 years ago

Awesome! Thank you :)

alash3al commented 4 years ago

@skorokithakis @roshanjonah

sorry guys for the late reply, I did update the deps and fixed the mentioned issues

skorokithakis commented 4 years ago

Fantastic, thank you! Would it be possible for you to add an HTTP parameter for the rest of the headers? Eg I sometimes need In-Reply-To, and a single JSON object holding everything else suits me fine.

alash3al commented 4 years ago

@skorokithakis No problem, I pushed an update with all possible headers I can fetch,

I'm thinking of making a SaaS version of this software with a dashboard featuring the following:

...

what is your opinion, will it be good or not, I just want to remove any setup & management related hassle?

skorokithakis commented 4 years ago

Personally, I migrated from MailGun (which does the same) to this utility because of how simple and easy it was to set up, and because MailGun made it really hard for me to contain the cost. It was also pretty expensive for such a simple operation.

Depending on how much you charged, I might use it. I currently use it to run https://spa.mnesty.com/, and it's really good for that purpose. I have a few features I'd like to see, but since this is a side project I run in my spare time for free, I couldn't really pay anything more than a few dollars a month, and even that's a stretch, since the functionality is so simple.

alash3al commented 4 years ago

Great,

Can I know how much mailgun charge for a service like this?

skorokithakis commented 4 years ago

They charge per incoming email, which was crazy, because it meant that a spammer can just send me a million emails and I'd have to pay tens of thousands of dollars. I'm not sure exactly how much, you can find the pricing on their site.

alash3al commented 4 years ago

hmmmm, what do you think about a better pricing model from your point of view? and if there were some features like spam-fighting, could it be ok?

skorokithakis commented 4 years ago

The problem with Mailgun is that they charge the same for incoming vs outgoing emails, when outgoing emails are a much more valuable service than incoming. If there were spam fighting, I wouldn't want this, since I explicitly only want the spam :)

alash3al commented 4 years ago

I understood, so the main problem is "inbound emails are same pricing as outgoing" and you're expecting that it should be about +60% less than the outbound right?

skorokithakis commented 4 years ago

In price? I'd expect to have a fixed-price tier, so from 1 to X emails, it's $10, then it's $30, and so on.

alash3al commented 4 years ago

how about something like this: 20k or 30k email = 10$? Sorry if I'm asking a lot

skorokithakis commented 4 years ago

Nah no problem. I think I'm unlikely to switch right now because running the utility works fine for me. I would like something like stripping of HTML to plain text, but I implemented it myself, so my needs are currently met. That sounds like fair pricing, though.

alash3al commented 4 years ago

Thank you for that great discussion, if I launched the service, I would send you a coupon code with a great discount for months

skorokithakis commented 4 years ago

That'd be great, thanks!