3 ms·
Well if I understand you right you are using Aws smtp service I want to learn how does it work
by umen 8y ago
Well if I understand you right you are using Aws smtp service
I want to learn how does it work
- ThisIsDrCode 8y agoOk I'll bite and give a bit more info. SES sets up the ability to send or receive email. The receiving is handled by SES by either creating an SNS notification and/or storing the email (in MIME format) into an S3 bucket. Now let's say you've configured SES to store the email to S3 and emit an SNS notification, if you want to create a backend that will allow you to read the emails, you'll want to handle the SNS notification (via a subscribed Lambda, or a service in EC2 polling a SQS which is subscribed to the SNS) and store some of the email metadata in a database (like DynamoDB or Aurora) so that you can search the emails easier. The SNS notification tells you the email information as well as telling you the name of the file that it will create in S3, so if you store all this in the database you can load the raw email later (e.g. to get the attachments) Now let's say you have a searchable database, you'll want to make a service that allows a front-end (website or app) to read this information. So you'll want to make a backend REST API which allows users to get emails for a particular user by searching the database for emails to that user. If you're making this for users other than yourself, you'll also probably want some more user specific information in another, user-orientated, database like which stores which users have read which emails. And you'll also want to setup some user authentication/authorisation so only the right users can read the right emails. Anyways that's how you setup recieving. To setup sending is much simpler, and I'd just follow the documentation.
- ThisIsDrCode 8y agoSo ignore this ^ comment unless you're interested in setting up for own email system wrapping around SES
- ThisIsDrCode 8y agoOk I just reread your comment. Yeah I'm using SES to setup an email system. If you want to do the SMTP by yourself then that's a shit tonne more effort than what I've just described. Other people have linked some useful stuff so I won't comment any further.