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.
STEP 3 : In the script file you have to add the credentials (Remember don't share the credentials with any one.")
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.
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
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/"
4.2 : Scroll down a bit and in Simple Mail Transfer Protocol (SMTP) settings container, choose Create SMTP Credentials.
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.
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.
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.
5.1 : The email address that we are adding in line 48 and 51 that is for sender and recipient must be verified
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.
5.4 : Click on Create Identity. Select Email Address option. After that enter Email Address and Click on Create Identity in bottom Right Corner.
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.
Thank You.