We always compete in this technological world by providing our best services. One of our most prominent service is Amazon SES for sales and marketing module, where our clients are extremely happy and wants to continue their business partnership with our AWS consulting
Using Amazon SES, You can send and receive email from your verified emails and domains. SES offers email receiving for entire domains or for individual addresses within a domain.We can use other AWS services S3(to store encrypted messages in bucket), SNS topic(to process the message, lamda function).
To send, receive, process the incoming messages, we have a package called django-ses-gateway
Install
pip install django-ses-gateway
Things To Do Before Integration:
AWS_ACCESS_KEY_ID = "Your AWS Access Key"
AWS_SECRET_ACCESS_KEY = "Your AWS Secret Key"
2.To use Amazon SES as your email receiver, you must create at least one active receipt rule set in which you have specified the sns topic(to route messages to an endpoint), s3 bucket(to store messages), lamda function(to process the receiving email) details.
How amazon ses performs email receiving:
Usage:
1. Sending an email
from django_ses_gateway.receiving_mail import sending_mail
sending_mail(subject, email_template_name, context, from_email, to_email)
Here we are sending a from_mail as <unique-identifier>@yourdomain.com. Here unique identifier will be used to process the reply to this mail.
2. Receiving an email
from django_ses_gateway.receiving_mail import sns_notification
subject, from_mail, to_mail, hash_code, mail_content = sns_notification(request.body)
Using the unique identifier(hash_code), we can easily process or store the incoming messages.
It will process your message content, will return the email subject, from mail, to email(abc@yourdomain.com), hashcode(abc) or unique-identifier, mail content.
You can view the complete documentation here. http://django-ses-gateway.readthedocs.io/en/latest/
Github Repository: https://github.com/MicroPyramid/django-ses-gateway