Coder Social home page Coder Social logo

amazon-ses-php-script's Introduction

AMAZON-SES-SMTP-PHP-SCRIPT

SEND EMAILS THROUGH AMAZON SES SMTP

STEP 1 : Download the script file index.php.

STEP 2 : Download the AWS PHP SDK (You can refer this documentation : https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/getting-started_installation.html )

Once you have downloaded the Script file and the SDK move that files to the server where you are hosting the project in my case I am locally hosting and using XAMPP.

ses

STEP 3 : In the script file you have to add the credentials (Remember don't share the credentials with any one.")

image

Fields you have to edit are:

Line No. 29. You have to mention the Host as per the AWS Zone which you are using.

SMTP Region list.

image

Line No. 42 and 45 where you have to enter the credentials. That is username and password. In my case i have randomly added XYZXYZ.

Now how to obtain this username and password...?

Please refer the documentation given below

https://docs.aws.amazon.com/ses/latest/dg/smtp-credentials.html

From the Documentation you have to follow this particular part

image

STEP 4 : Generating Credentials. That is username and password. (Remember don't share the credentials with any one.")

4.1 : Head on to "https://console.aws.amazon.com/ses/"

image

4.2 : Scroll down a bit and in Simple Mail Transfer Protocol (SMTP) settings container, choose Create SMTP Credentials.

image

4.3 : Create User for SMTP, you can use the default value that is provided in this field. When you finish, choose Create in the bottom-right corner.

image

4.4 : Expand Show User SMTP Security Credentials - your SMTP credentials are shown on the screen.

Download these credentials by choosing Download Credentials or copy them and store them in a safe place, because you can't view or save your credentials after you close this dialog box.

image

Once you have these credentials Add then in your script Follow Step 3.

STEP 5 : Now when you will run the script in localhost XAMPP. It will give an error that.

"Email Address not verified". So sender and recipient email address must be verified.

image

5.1 : The email address that we are adding in line 48 and 51 that is for sender and recipient must be verified

image

5.2 : How to verify the Email Address. Head on to "https://console.aws.amazon.com/ses/"

5.3 : Click on Verified Identities option in the left corner.

image

5.4 : Click on Create Identity. Select Email Address option. After that enter Email Address and Click on Create Identity in bottom Right Corner.

image

5.5 : After that you will receive a confirmation mail on the email accept that and then you are good to go.

STEP 6 : Now when you will run the script. The Email will be Triggered Successfully.

image

image

image

Thank You.

amazon-ses-php-script's People

Contributors

prajwals420 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.