Thursday, August 7, 2014

Using GMail's SMTP and IMAP servers in Oracle Notification Mailer (Workflow Mailer )

Hi All ...
Here the step by step guide how to use Gmail account  with Oracle Workflow mailer.
Tested it in couple of customer sites and it working perfect...

GMail offers free, reliable, popular SMTP and IMAP services, because of which many people are interested to use it. GMail can be used when there are no in-house SMTP/IMAP servers for testing or debugging purposes. This blog explains how to install GMail SSL certificate in Concurrent Tier, testing the connection using a standalone program, running Mailer diagnostics and configuring GMail IMAP and SMTP servers for Workflow Notification Mailer Inbound and Outbound connections.

GMail servers configuration

SMTP server 

Host Name
SSL Port 465
TLS/SSL required Yes
User Name Your full email address (including or
Password Your gmail password

 IMAP server

 SSL Port993 
TLS/SSL Required Yes 
 User Name Your full email address (including or
 PasswordYour gmail password

GMail SSL Certificate Installation

The following is the procedure to install the GMail SSL certificate
  • Copy the below GMail SSL certificate in to a file eg: gmail.cer
    -----END CERTIFICATE-----
    • Install the SSL certificate into the default JRE location or any other location using below command
    • Installing into a dfeault JRE location in EBS instance
            # keytool -import -trustcacerts -keystore $AF_JRE_TOP/lib/security/cacerts  -storepass changeit -alias gmail-lnx_chainnedcert -file gmail.cer
    • Install into a custom location
            # keytool -import -trustcacerts -keystore <customLocation>  -storepass changeit -alias gmail-lnx_chainnedcert -file gmail.cer
           <customLocation> -- directory in instance where the certificate need to be installed
    • After running the above command you can see the following response
            Trust this certificate? [no]:  yes
            Certificate was added to keystore 

    Running Mailer Command Line Diagnostics

    • Run Mailer command line diagnostics from conccurrent tier where Mailer is running, to check the IMAP connection using the below command
    $AFJVAPRG -classpath $AF_CLASSPATH -Dprotocol=imap -Ddbcfile=$FND_SECURE/$TWO_TASK.dbc -Dport=993 -Dssl=Y -Dtruststore=$AF_JRE_TOP/lib/security/cacerts -Daccount=<gmail username> -Dpassword=<password> -Dconnect_timeout=120 -Ddebug=Y -Dlogfile=GmailImapTest.log -DdebugMailSession=Y
    • Run Mailer command line diagnostics from concurrent tier where Mailer is running, to check the SMTP connection using the below command  
     $AFJVAPRG -classpath $AF_CLASSPATH -Dprotocol=smtp -Ddbcfile=$FND_SECURE/$TWO_TASK.dbc -Dport=465 -Dssl=Y -Dtruststore=$AF_JRE_TOP/lib/security/cacerts -Daccount=<gmail username> -Dpassword=<password> -Dconnect_timeout=120 -Ddebug=Y -Dlogfile=GmailSmtpTest.log -DdebugMailSession=Y 

    Standalone program to verify the IMAP connection

    Run the below standalone program from the concurrent tier node where Mailer is running to verify the connection with GMail IMAP server. It connects to the GMail IMAP server with the given GMail user name and password and lists all the folders that exist in that account. If the GMail IMAP server is not working for the  Mailer check whether the PROCESSED and DISCARD folders exist for the GMail account, if not create manually by logging into GMail account.
    Sample program to test GMail IMAP connection
     The standalone program can be run as below
     $java GmailIMAPTest GMailUsername GMailUserPassword           

    Standalone program to verify the SMTP connection

    Run the below standalone program from the concurrent tier node where Mailer is running to verify the connection with GMail SMTP server. It connects to the GMail SMTP server by authenticating with the given user name and password  and sends a test email message to the give recipient user email address.
    Sample program to test GMail SMTP connection
    The standalone program can be run as below 
     $java GmailSMTPTest GMailUsername GMailPassword recipientEmailAddress   


    • As is an external domain, the Mailer concurrent tier should allow the connection with GMail server
    • Please keep in mind when using it for corporate facilities, that the e-mail data would be stored outside the corporate network
    Good Luck ...


    1. If you are looking to buy bitcoins online, PAXFUL is the best source for bitcoins as it allows buying bitcoins by 100's of different payment methods, such as MoneyGram, Western Union, PayPal, Credit Card and even converting your gift cards for bitcoins.

    2. Are you tired of looking for bitcoin faucets?
      Triple your claimed satoshis with this advanced BITCOIN FAUCET ROTATOR.

    3. BlueHost is ultimately the best website hosting company for any hosting plans you might require.

    4. Thanks and Regards. Oracle Apps R12 Training Videos at affordable cost. please check


    5. It is really helpful article please read it too my blog IMAP Gmail is not responding.

    6. This is realy a Nice blog post read on of my blogs It is really helpful article please read it too my blog IMAP Gmail is Responding. you can visits our websites or toll free no +1-866-558-4555. solve your problem fastly.

    7. There is nothing that can be done for fixing Gmail server issue the user can only wait as the server issue will only subside by itself, also the Gmail service should be well updated along with the browser, if needed then to know more and for more help, the user should get connected with the team of trained and certified Gmail experts lines are open for help and support all the time.
      Gmail Help Number UK

    8. Very interesting blog to read and to share, thanks for sharing such a good blog. Oracle EBS Test Automation Tools