Home > Blogs > How to configure Email with SOA with gmail

How to configure Email with SOA with gmail

This Article will teach you how to configure Email configuration when using Email activity in BPEL flow

Pre-requisite :

1.  you should have SOA server running.

2.  Have gmail account.

3.  download OpenSSL for generating certificate

How to do Email configuration with gmail

1 :  Generate the key store and imap and smtp certificate

1.1 open the cmd and go to OpenSSL installation directory home and then bin. for me this location is C:OpenSSL-Win32bin

openssl s_client -connect imap.gmail.com:993 > imap_gmail.cert
– It will generate a file imap_gmail.cert

openssl s_client -connect smtp.gmail.com:465 > smtp_gmail.cert
– It will generate a file smtp_gmail.cert in the same directory

Edit the files and remove everything before or after the following tags(both begin certificate and end certificate should be included)

1.2 open $JAVA_HOME/bin and copy the above two files(you can remove later after performing keytool commands) in the directory and issue a command on cmd prompt

keytool -import -alias imap.gmail.com -keystore demogmailcertstore.jks -file imap_gmail.cert

– It will ask for password twice(if you are making .jks for the first time), make sure you remember this password

keytool -import -alias smtp.gmail.com -keystore demogmailcertstore.jks -file smtp_gmail.cert

– It will ask for password, give the same password which you gave earlier

Above command will generate a file in the same directory as demogmailcertstore.jks

1.3 Edit the %WLS_HOME%uer_projectsdomains<domain_name>binsetDomainEnv.cmd (change .sh for linux) to specify the trust key generated in previous step
search for -Djavax.net.ssl.trustStore text in the file and replace with
-Djavax.net.ssl.trustStore=<path>/demogmailcertstore.jks  -Djavax.net.ssl.trustStorePassword=<password you used while making the .jks file>

1.4 Save and close the file

2. Configure usermessagingdriver-email properties

2.1 Open Enterprise manager(EM) and click on usermessagingdriver-email to load properties









2.2 open Email driver properties












2.3 Modify the properties as :













MailAccessProtocol                           IMAP

ReceiveFolder                                      INBOX

OutgoinMailServer                             smtp.gmail.com

OutgoinMailServerPort                    465

OutgoingMailServerSecurity          SSL

OutgoingUsername                             Any gmail id ex : xxxxx.yyyyyy@gmail.com
(if there are multiple user then use comma seperated values)

OutgoingPassword                             Password for Outgoing Username
(if there are multiple user then use comma seperated values)

IncomingMailServer                         imap.gmail.com

IncomingMailServerPort               993

IncomingMailServerSSL                 select checkbox

IncomningMailIds                             use any valid id (ex sunil.khandodiya@gmail.com)

IncomningUserIds                            use any valid id (ex sunil.khandodiya@gmail.com)
IncomingUserPasswords                Password for incomingUserId

2.4 Apply the changes.


3. Modify the Worklist Notification
















3.1 open worklist notification properties as given below










4 Open Admin Console and modify the keystore for SOA server


5. Restart SOA server and test mail functionality using Email activity

Categories: Blogs
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: