Brian Lovin
/
Hacker News
Daily Digest email

Get the top HN stories in your inbox every day.

hardwaresofton

Does anyone have a good reason they normally fall back on for using the AWS SDK vs the provided SMTP bridge? Rate limits or anything of the sort?

I find that basically every transnational email service supports SMTP so I normally code to that and call it a day…

chrizel

We switched from using SMTP to the AWS SDK for SES because when sending an e-mail the SDK returns the unique message ID of the e-mail. This allowed us to have a special process for handling bounces in our software by using an SNS HTTP endpoint. So the SDK makes sense for use cases where the SMTP protocol doesn't provide enough information.

wiml

Hm, many MTAs do return a unique queue ID when they accept a message over SMTP. Does SES not implement that?

sethammons

Any examples? Curious how they do it. Just extra info in the 250 OK response to the DATA command?

mjl-

Why would the Message-ID (that you assign) not work for this purpose? Perhaps the SNS notification doesn't include the message-id?

redditor98654

SES does not allow the caller to set the id of the message and instead assigns one when you make the call.

It is a bit painful for idempotency.

hardwaresofton

Thanks for noting this, this is a pretty solid reason — I thought most people tried to correlate other fields on the incoming email but this also makes sense

rzzzt

If you want to test SMTP mail delivery, there's MailCatcher: https://mailcatcher.me/

imankulov

There are several alternatives. Most of them, including mailcatcher, seem to be unmaintained.

Mailpit is an alternative that has regular updates: https://mailpit.axllent.org/

nickjj

> Most of them, including mailcatcher, seem to be unmaintained.

MailCatcher is great. It "just works" and has Docker images for both AMD64 and ARM64 CPUs.

nickcotter

Thanks for the link - we’ve been using mailhog for local smtp testing and it still works ok for basic tasks, but it’s not maintained any more.

mjl-

Pitching my own: https://github.com/mjl-/mox has a "mox localserve" subcommand that runs a mail server on localhost for testing, including a pedantic mode and special addresses that cause failure conditions you may want to test for. This is actually a full mail server (SMTP, IMAP and much more) and it comes with a webmail client. The "localserve" mode was just so easy to implement that I couldn't resist.

hardwaresofton

Yeah thanks for this, I’ve been using it for years! Recently switched to mailslurper:

https://github.com/mailslurper/mailslurper

meroje

Can’t use an IAM role to auth to the bridge, it only works with user’s keys.

jjice

That's a really great point. I was wondering the same thing as the comment root but this is enough for it to make sense. At the end of the day, having a wrapper email/notification class with an SMTP and moving to a specific SES implementation seems like it'll always be a safe dev path.

dharmab

Not for production stuff, but for quick hacks I'll wire it up to SNS and send emails via SNS queue.

stephenr

In theory you get higher effective sending rates, however I've not actually proven how much faster in practice.

isuckatcoding

You should get this merged into awslocal

Edit: uh never mind https://docs.localstack.cloud/user-guide/aws/ses/

ac2u

Someone needs to invent a protocol for transferring mail and make it simple.

navigate8310

Simple Email Service

traceroute66

Why would I use this instead of the AWS SES Simulator ? [1]

[1] https://docs.aws.amazon.com/ses/latest/dg/send-an-email-from...

stephenr

> For billing purposes, emails that you send to the Amazon SES mailbox simulator are the same as any other email you send using Amazon SES. In other words, we bill you the same amount for messages that you send to the mailbox simulator as for those that you send to regular recipients.

traceroute66

Fair enough, I didn't know SES simulator was only zero-affecting for stats and quotas.

However then surely this thing is just re-inventing the wheel that LocalStack already invented ?

undefined

[deleted]

oblio

Somewhat offtopic, but is there a simple email service in the sense of SMTP + IMAP/POP + simple email web interface to use AWS as a end-user email service?

petercooper

I suspect you meant something more independent, but technically yes, AWS provides this: https://aws.amazon.com/workmail/

While SES can handle both inbound and outbound mail, I think Workmail is the only way to get IMAP and actual hosting of email. I imagine you could set up https://mailinabox.email/ on the cheapest EC2 instance and use SES for outbound, though.

Daily Digest email

Get the top HN stories in your inbox every day.