PopcornNotify – Send simple emails and text messages from one API
popcornnotify.com
popcornnotify.com
For anyone who has similar concerns and wants to use something more customizable and reliable like Mailgun/Twilio, but wants access to the same elegant API showcased here, you can use something like this (admittedly naive) implementation:
const mailgun = require('mailgun-js')({apiKey: api_key, domain: domain});
const twilio = new require('twilio')(accountSid, authToken);
export default function notify (to, msg, options) {
if (Array.isArray(to)) {
to.forEach((toSingle) => notify(toSingle, msg, options));
return;
}
if (to.includes("@")) {
mailgun.messages().send({
from: 'Your name <yourname@example.com>', // your email
to: to,
subject: options && options.subject,
text: msg
});
} else {
twilioClient.messages.create({
body: msg,
to: to,
from: '+5555555555' // your number
});
}
}
This implementation wouldn't require that much extra effort to set up initially (i.e. signing up for two API credentials instead of one and installing two packages instead of one), but it gives you a lot more flexibility to configure the from address and phone number and might help you sleep easier at night.However, as a fellow startup founder, I think it's noble to support newer projects like this. As such, I've signed up for an account and plan to test it out for at least a month.
This was my thought as well. I've had a number of projects where I had to deliver large numbers of emails and SMS and the problem has never been the design of the API I used to send them. It's always about the delivery rates of those messages. Particularly with SMS we've had to be very careful with our providers, often needing to select a different one in different countries.
Send me a tweet @flutemail if you're interested, I'll let you know when it's ready (should be in about a month).
If your business sends out any kind of transactional emails, the Junkie McJunkbuttons of the interwebs will trash your domain and IP reputation because they use the Junk button as the Delete button.
Why does this matter? Please, let me invite you in to this rabbit hole. What I say here is based on information my best friend, who is an engineer working on email transport for a national ISP. And let me tell you, blacklists like Spamhaus, SORBS, etc. and code like SpamAssassin are the Tonka toys of spam filtering.
1. The storage for their mail system is close to 1PB of usable storage via RAID 60 storage modules in their SAN. It's a lot of drives. A lot of Enterprise-class, high RPM, expensive drives.
2. The SAN stores about 3% of all email they receive. This is not because their users are all about Inbox Zero. No, this is because they route ~97% of their received email straight into the bit bucket. Because it is clearly SPAM. Think about that 1PB of storage being multiplied to 33PB just because SPAMmers want to send email. Think about even larger ISP/ESPs that operate at much larger scale and face 97% influx of utter crap.
3. Keeping up with the constantly-evolving threat models used by SPAMmers is too much for just about any engineering team that wants to get some real work done, so they outsource the filtering. These are companies like CloudMark and Symantec to name a couple. They provide APIs where you send an email, and they return an extensive SPAMminess profile for that message. They are the Caterpillar 797F's of SPAM filtering. These companies are used by numerous other companies, so SPAM reported at one customer site aids detection at all customer sites. BTW, they have no page to log in where you can request removal from their blacklist.
4. Since false positives on classifying mail as Junk (the Junk that actually gets to the Junk box) is a huge drain on support resources, they decided to employ two such companies from the Email Filtering Industry. This is because they get different profiles from each company. They glued the two results together in multivariate tests until they found the right formula to significantly reduce the "SPAM False Positive" type of support inquiry.
5. When someone hits the Junk button in their webmail client, the ISP reports that email to both of their Email Filtering partners.
These filtering companies can extrapolate the volume of email your domain sends because they see those emails as they are received by their customers. They can also track how many times a user reports it as SPAM. A few SPAM reports won't hurt your domain/IP reputation, but once you hit a certain threshold, you're blacklisted across all their customers.
So what Mailgun or SendGrid can do for a customer in this ecosphere is use their relationships with the CloudMarks and Symantecs of the world. And gain some forbearance to to de-blacklist customers who are sending legit email, or who suffered an incident and were exploited by SPAMmers. I've witnessed this happening on the ConvertKit Facebook group multiple times. A marketer posts that suddenly their emails aren't reaching their canary accounts, say at Gmail. CK support gets in and says they'll contact their email provider. A day later, problem resolved and said marketer reports their mails being delivered again.
So where does Junkie McJunkbutton come in to all of this? Well, they are usually non-hostile people who don't understand the implications of hitting the Junk Button. That they are essentially reporting a bad faith email event to the "Equifaxes of the email world" about you.
PS Junkie McJunkbutton + going it alone for email transport is what will kill PopcornNotify and similar solutions.
Is there something special why you’d need to pay for a product such as mailgun, and not just something like the ISPmail guide suggests?
Both for small bootstrapped projects, and for larger companies it should be cheaper to just run it yourself.
That is most definitely not the norm. Entire ISPs get blacklisted on a regular basis, working around that is difficult.
There are a lot of hurdles to hosting an email service, and some of them are geographic, and out of your immediate control.
If things are difficult... Why wouldn't you pay to make the hassles go away all together?
It’s just, I can’t believe that it’s just luck that I never had these issues. Is it luck? Is it because people try configuring email without such tutorials (which actually would be quite complicated)? Is it because people with no devops experience try it?
On the other hand, if a devops engineer can set it up in a day, it’ll cost you ~270€ (taking a usual European salary for such a person), which would you get 27000 emails with this service. So it might actually be worth it.
It’s certainly not impossible but takes more work as you scale up. I think that’s part of the attraction of these services. Pay for it to be their problem (in theory anyway) :)
Funny part is, that Google has all the best ML engineers working for them, yet they seem to be unable to check a mail for spam... They can teach a computer to play Go at superhuman level yet they are not able to check an E-Mail for the words Viagra and Cialis.
With many people using smartphones to check email, my guess is that only a very small percentage of people still check their spam folders regularly to see if there were any false positives and help train the spam filter (to the extent it's willing to learn). Most people only check their inboxes (and many may not even know about a slam folder), and I'm sure there are billions of harmless and expected emails around the world that just got lost because of these filters.
More specifically, SPF exists for a domain owner (in this case, popcornnotify.com) to specify who is authorized to send mail on behalf of the host email.popcornnotify.com. This is set in a DNS record and used by spam filters to prevent spoofing and such.
There is an audience for every (useful) product!
EDIT: similarly, does it support MMS in addition to SMS?
Because of that simple reason, I'd only use this for optional stuff, but I struggle to think of a use case where notifications are optional.
ps. that said, this is a very attractive service to send SMS to Europe. I know of no service that undercuts $0.10 per SMS to European countries unless you buy in huge bulks.
Twilio looks to be under $0.10 for more than a few european countries I checked:
https://www.twilio.com/sms/pricing/ch https://www.twilio.com/sms/pricing/de https://www.twilio.com/sms/pricing/es https://www.twilio.com/sms/pricing/se https://www.twilio.com/sms/pricing/fi https://www.twilio.com/sms/pricing/nl
Looks like plivo has some good rates too:
https://www.plivo.com/pricing/ES/#!sms https://www.plivo.com/pricing/FR/#!sms https://www.plivo.com/pricing/FI/#!sms https://www.plivo.com/pricing/SE/#!sms
The monthly cost of a number with plivo seems a bit higher, overall, but also looks like they have free incoming SMS, which may end up being a much better deal for some use cases.
Well done.
Pricing: API keys cost $10 for each 1,000 messages and last one year.
It's right above the BUY API KEY button.It's just fairly small and not distinguished.