Skip to main content

Oracle Apex - Email Using AWS Simple Email Service (SES)

Reason for writing this article
I had to spend a good amount of time to clear the issue "ORA-29024: Certificate validation failure" after configuring AWS SES SMTP in Oracle Apex. Thought of sharing the steps followed so that it may help someone trying to figure out the same problem. 

Background
AWS SES is a cloud-based email sending service from Amazon. If you are on the AWS platform, then AWS SES may be a good choice for your Apex application.

I found these two well-written blogs that explain the whole process of configuring SMTP in Oracle Apex.

I followed the instructions in their blog except for the process of downloading a root certificate for SES SMTP end-points. 

Most of the article gives you an easy method to obtain the certificate by clicking on the padlock icon in the search bar and then saving the certificates from the browser itself. Unfortunately, the SES endpoints doesn't resolve and hence I couldn't download the same. Here are the steps to get the root certificate for the SES endpoint email-smtp.ap-south-1.amazonaws.com.

Solution

Run below command from a Linux instance
openssl s_client -connect email-smtp.ap-south-1.amazonaws.com:465 -servername email-smtp.ap-south-1.amazonaws.com

Copy the certificate and visit https://whatsmychaincert.com/

Paste the certificate in the text box under "Generate the correct chain".
Check "Include Root Certificate" and click on "Generate Chain"

The certificate will be auto-downloaded. You may import the same in Oracle Wallet.

You are good to send emails using AWS SES, provided you completed other setup described in the other two blogs.




Comments

Popular posts from this blog

Oracle Apex - Upload Files to Amazon S3 Directly From Browser

This article is about uploading files from Oracle Apex to AWS S3. The files are directly uploaded to S3 without using any intermediate storage. The metadata is written to application DB to simplify further access.  Reference:  https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/s3-example-photo-album.html AWS Tasks Complete the prerequisite tasks described in  https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/s3-example-photo-album.html . This includes setting an S3 bucket, Amazon Cognito Identity Pool, Configuring IAM, and configuring CORS.  You will require bucket name, bucket region and pool id to access S3. Credentials are stored in DB and accessed using apex.server process while the user clicks the upload button. Apex Tasks Step#1  Add AWS SDK in your application user interface details. Refer the attachment. Step#2  Create a PL/SQL dynamic region using below given code htp.p('<div> <input type="file" id="fileUploa...

How to set Modal Dialog Title in Oracle APEX? JavaScript

 At times, the same modal dialog page is used to add as well as to edit a record. In such circumstances, a user-friendly title enhances the UX.  Updating non-modal dialog page title For a non-modal dialog, this is pretty straightforward. A substitution string can be used to dynamically set the title. For example, the page title in this scenario is set to Vendor display name. This is achieved by updating the title attribute. However, this approach will not work for modal dialogs. We can use javascript to update the modal dialog title. Updating Modal Dialog Title On page load, use a dynamic action to set the dialog title. .m-dialog-content CSS class is optional. This is used to avoid updating the title of the parent dialog in scenarios where a modal page opens another modal page. Output Edit Add