Skip to content

This script is designed to send products to customers via email upon purchase via paypal. It receives the notification from paypal and send the corresponding email with attachment

Notifications You must be signed in to change notification settings

daniloarruda13/send-automatic-email-with-attachment-using-AWS-Lambda

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

title author date output
Sending automatic emails with attachment using Python, AWS-Lambda and S3
Danilo Arruda
May, 2023
html_document word_document pdf_document
toc toc_depth df_print warning
true
3
paged
false
toc toc_depth
true
3
includes toc toc_depth toc_href
in_header
header.tex
true
3
true

Overview

This script is designed to automatically send an email if specific criteria are met. In the case of the example, the script searches for emails from Paypal notifying that a customer bought a virtual product and then it sends email to the customer with the product attached.

Installation

In order to implement and run the script, the user must enable Gmail API and properly set up the AWS services: S3, Lambda, and Cloud Watch. In general, setting up the services are straight forward. The workflow is as follows:

  1. Enable Gmail API;

  2. Make an AWS account;

  3. Create a S3 bucket with the files to be sent as attachment and the Python script

    1. Authorize Lambda to access the bucket (setting up IAM role - HERE)
  4. Make a Lambda function by importing the Python script directly from S3 (click upload from)

  5. Schedule the script to run at the desired frequency using CloudWatch

In addition, make sure to properly edit the script including the info about your API and specific bucket.

About

This script is designed to send products to customers via email upon purchase via paypal. It receives the notification from paypal and send the corresponding email with attachment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages