Using GMAIL As SMTP Server in PeopleSoft

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 33

Using GMAIL as SMTP Server in PeopleSoft

In this post we will see, how can we use gmail as SMTP Server in PeopleSoft.
Login to your gmail account.

Click on My Account

Click on Sign In and Security


Turn it On

Go back to you mails and on the browser url click on the Green icon.
These snapshots are from chrome browser.
If your chrome version is 56 then –
Press Ctrl + Shift + I

Click on Security
NOTE: If earlier than version 56 then, Click on the green icon → Connection → Certificate Information
Click on View Certificate
Now, we will export the intermediate certificate.
Navigate to PeopleTools → Security → Security Objects → Digital Certificates
Add a New Row
Click on the Refresh button
Click on Add Root link for the newly added row.

Paste the contents for georoot.cer


Click OK
Now, add one more row

Click on the Import link and paste the contents of GoogleInternetAutority.cer into it.
Click OK
Now, encrypt the password of the gmail account using pscipher.bat
Open command prompt and navigate to <PS_CFG_HOME>/webserv/<Domain Name>/piabin

Note down the encrypted password.


Open the app server configuration file and make the following changes under [SMTP Settings]
[SMTP Settings]
;=========================================================================
; Settings for SMTP mail
; Allow Dynamic Changes under [Domain Settings] has no effect on these controls
;=========================================================================

; Dynamic change allowed for SMTPServer


;Start - Modified by Deepak Ray 12/02/2017
;SMTPServer=
SMTPServer=smtp.gmail.com
;End - Modified by Deepak Ray 12/02/2017

; Dynamic change allowed for SMTPPort


SMTPPort=25

; Dynamic change allowed for SMTPServer1


SMTPServer1=

; Dynamic change allowed for SMTPPort1


SMTPPort1=0

; Dynamic change allowed for SMTPSender


SMTPSender=PeopleSoft@peoplesoft.com

; Dynamic change allowed for SMTPBlackberryReplyTo


SMTPBlackberryReplyTo=

; Dynamic change allowed for SMTPSourceMachine


SMTPSourceMachine=
; Dynamic change allowed for SMTPCharacterSet
SMTPCharacterSet=UTF-8

; Dynamic change allowed for SMTPEncodingDLL


SMTPEncodingDLL=
SMTPGuaranteed=0
SMTPTrace=0
SMTPSendTime=0

;Start - Added by Deepak Ray 12/02/2017


SMTPUserName=deepakpeoplesofttests@gmail.com
SMTPUserPassword=<Enter encrypted password here>
;End - Added by Deepak Ray 12/02/1017

;Start - Modified by Deepak Ray 12/02/2017


;SMTPUseSSL=N
SMTPUseSSL=Y
;End - Modified by Deepak Ray 12/02/2017

SMTPSSLPort=465
SMTPClientCertAlias=

SMTPUseSSL1=N
SMTPSSLPort1=465
SMTPClientCertAlias1=

Now, Test the settings


Open any page in PeopleSoft application having “Notify” button
Example – PeopleTools → Workflow → Notifications → Notification Templates
Click on Apply button and check your mailbox

You can now make the same changes to process scheduler config file to send mails from batch processes.
Using Gmail as SMTP server for PeopleSoft
A lot of us developers use local PeopleSoft sandboxes for (self)training and R&D. One of the biggest issues we
usually encounter on local sandboxes is the lack of a SMTP server for testing workflow mail. Until today I used
PostcastServer as SMTP server, but this did not actually send the mail to the mail address, but catches the
mail generated from PeopleSoft locally.

Today I got triggered by a question on OTN Forum on which setting you need to set to use Gmail as SMTP
server. Surprisingly there was a document on My Oracle Support that explained just that E-WF: JavaMail
Exception: javax.mail.AuthenticationFailedException, Error Using Gmail SMTP Server [ID 1436910.1]

Although the document on My Oracle Support is a very highly detailed document, it missed a few key pointers
and I think this information is something the community will be very grateful for.

The procedure to set Gmail as an SMTP server is divided in two steps:


 Import Gmail SSL certificate in PeopleSoft
 Configure application server and process scheduler
For this post I will be using PeopleSoft on Virtualbox based on the OVM templates.

First I created a new Gmail account ovm.peoplesoft@gmail.com with password ovmwelc0me (password


changed after writing this post). Once the gmail account is created, sign in.

Click on the lock, go to tab Connection and click on link Certificate information.
On the certificate window select the root certificate and click on View Certificate.

Go to tab Details and click on Copy to File.

The Certificate export wizard will be launched.


Click on next.

Choose Base-64 encoded X.509 (.CER) option and click Next.


Save the certificate to for example c:tempgoeroot.cer and click on Next.

Click on Finish and the root certificate is save locally. Back on the Certificate screen select Google Internet
Authority and click on View Certificate.
Walk through the same steps as the root certificate and save the certificate with a different name.

Now log on to PeopleSoft and navigate to PeopleTools > Security > Security Objects > Digital Certificates and
add a new row with Type Root CA, Alias Equifax Secure CA and Issuer Alias Equifax Secure CA.
Click on Add Root.

Now open georoot.cer in notepad and copy the entire content.

Click on OK and back on the Digital Certificates page add another row with Type Remote,
Alias GoogleInternetAuthority, Issuer Alias Equifax Secure CA.

Click on import.

Now open GoogleInternetAuthority.cer in notepad and copy the entire content.

Click on Ok to save the certificate.

Now we are ready importing the certificates in PeopleSoft and can start configuring the application server and
process scheduler.
What the MOS document does not say, but is stated in PeopleBooks, is that the SMTP server configuration for
the user password in the psappsrv.cfg needs to be encrypted with PSCipher. So before changing the
configuration, we first need to encrypt the Gmail password. Log on the PIA-Batch vm with root and issue the
following commands:

[root@hcmpt91 ~]# su -l psadm2


[psadm2@hcmpt91 ~]$ cd $PS_CFG_HOME
[psadm2@hcmpt91 HCM]$ cd webserv
[psadm2@hcmpt91 webserv]$ cd peoplesoft
[psadm2@hcmpt91 peoplesoft]$ cd piabin
[psadm2@hcmpt91 piabin]$ ./PSCipher.sh ovmwelc0me

********************WARNING******************************************************

Hard limit value of the file descriptors on this system is set to 1024
In order to run the server process with 4096 file descriptors,
increase the hard limit on the system equal or higher than the number
MAX_FILE_DESCRIPTORS in setenv.sh

*********************************************************************************

Encrypted text: {V1.1}g3sOb5a44/RluB4AZlXHVw==

Copy the encrypted password and open psappsrv.cfg by issuing the following commands.

[psadm2@hcmpt91 ~]$ cd $PS_CFG_HOME


[psadm2@hcmpt91 HCM]$ cd appserv
[psadm2@hcmpt91 appserv]$ cd APPDOM
[psadm2@hcmpt91 APPDOM]$ vi psappsrv.cfg

Change the following settings:

SMTPServer=smtp.gmail.com
SMTPUserName=ovm.peoplesoft@gmail.com
SMTPUserPassword={V1.1}g3sOb5a44/RluB4AZlXHVw==
SMTPUseSSL=Y
SMTPSSLPort=465

No need to bounce the application server after this, since these settings are dynamically set. Change the same
settings for the process scheduler configuration file.

Now let's test if it works.

An easy way to test mail from PeopleSoft is to use the Component Notify button, which for example can be
found on the Web Profile page.
Click on the Notify button and on the next page, let's try to send a mail to our own Gmail account.

Hit Ok and check your Gmail.


By the way, if you want to use PeopleSoft workflow with the OVM templates, do not forget to check the
following check boxes, which are not enabled by default.

All credits to Oracle and MOS for describing this. This will be a great add-on to complete the OVM templates to
a full demo environment.

I think it goes without saying that you should only use this for your local sandboxes and not for Production
systems.

You might also like