Skip to Main Content

How to configure GMAIL with Oracle Apex using stunnel (application express) 5.0.3

egudai-OracleApr 10 2016 — edited Apr 10 2016

0down votefavorite

Hello All,

writing down as is it helps someone :-)

This was enabled by me on both linux & windows. no SMTP is required.

I am in the middle of project, so don't have much time for editing ....feel free to take care.

Background :

  • Apex 5.0.3 is installed with Oracle XE 11.2 installed on Centos (linux) 6.x
  • SMTP is not required to be enabled on centos. We will use gmail one directly.
  • Solution is based on windows one published by : HÃ…VARD KRISTIANSEN at :
  • Will use stunnel to communicate with gmail directly.
  • I am not going to go over Apex / Oracle XE installation.
Installation (written out of my head) :

1.Install stunnel as root :

yum install stunnel -y

2.create a conf file for stunnel using nano or vi (to install nano : yum install nano -y )

nano /etc/stunnel/stunnel.conf

3.Enter the following to new stunnel.conf created:

; Use it for client mode

client = yes


accept  = 1925

connect =

4.restart stunnel using whatever method, e.g kill -9 and start using the following command :


5.Log in to apex as admin : http://yourhost:port/ords/apex_admin

Go to : Manage instance -> instance settings.

6.Put the following settings :

SMTP Host Address : (or your local)

SMTP Host Port : 1925 (as u can see in stunnel.conf above).

SMTP Authentication Username : your gmail username : etai.guday (WITHOUT

SMTP Authentication Password : gmail password


Default Email From Address : (including

7.Due to gmail restrictions YOU MUST enable : to use the above method (with relevant gmail account)

  1. Enable Oracle DB ACL by using example bellow

9 . should work :-) didn't have time to test it further or refer to security issues etc

Post Details
Added on Apr 10 2016
1 comment