We still have a quite huge number of audience who are unaware on how we configure Gmail on SAP BusinessObjects Platform. This guide will cover steps in detail and explain with screenshots & appropriate reasoning - so that it becomes easy to know on how we do it.
Map Gmail SMTP on SAP BusinessObjects BI 4.x
How do you do this
All possible through a quick tool called Stunnel ( Secured Tunnel - the literal meaning ) that runs as a service on any machine that will redirect a request to a defined location and handle the SSL wrapping. What Stunnel basically does is that it turns any insecure TCP port into a secure encrypted port using OpenSSL package; it's like a small secure VPN that runs on specific port.
You install a small SMTP server (Stunnel) locally and use that to send out email from any version of SAP BusinessObjects Crystal Server, Edge or Platform. Stunnel is highly configurable, runs as a service, requires 5 minutes to install, uses minimum resource, and requires no administration once setup.
Let's start the practical:
- Pre-Installation Must Know
- Download Locations - of Stunnel
- Now you go through a series of sub-steps i.e. A, B, C, D that includes the following: - (only 5 mins. time spent here)
[A] Installing Stunnel
[B] Configuring Stunnel
[C] Service Install
[D] Service Start
4. Configure BOBJ servers with Gmail SMTP - You are done then, be ready to go.
1. Pre-Installation Must Know
- Install the stunnel on the machine where you want to host this as service, this can be the same server/machine as your Crystal Server, SAP BusinessObjects Edge or Platform.
- If you wish to install stunnel on a different machine ( lets call this now stunnel server ) then as long as the BO server communicates with the stunnel server, the installation preference of this stunnel over any machine really doesn't matter.
- Stunnel can also be installed on Unix Platform; however, in this presentation I have used Windows.
2. Download Locations
- https://www.stunnel.org/downloads.html
- http://mirrors.zerg.biz/stunnel/
- ftp://ftp.nluug.nl/pub/networking/stunnel
- ftp://ftp.stunnel.org/stunnel/
- http://mirror.bit.nl/stunnel/
Download the stunnel - screenshots for your reference - Let's download it and save it to your desktop.
3. A series of sub-steps now follows:A, B, C, D -
[ A ] Installing Stunnel - Run the .exe file, and the installation of Stunnel begins.
[ B ]Configure Stunnel - after it is installed, edit the stunnel.conf file and this is how you will open stunnel.conf file as highlighted.
Once you open the stunnel.conf file, you'll find parameters and there are some parameters that you need to make some changes/update on - this is really a configuration or making stunnel talk to Gmail. Some parameters are prefixed by the semicolon as a comment.
There are only three important parameters that require changes on, they are as follows:
;This below parameter number 1 that is [ssmtp] is the main one, for acting as Gmail - it has two values accept and connect: in the accept you should never put localhost or 127.0.0.1 also make sure that is accompanied by any free available port number - its a socket now, and you will keep connect value exactly as its shown - as that's the SMTP of Gmail.
[ssmtp]
accept = <Insert the static ip address or the FQDN of the machine where you have stunnel installed colon and the free port number>
connect = smtp.gmail.com:465
;This below parameter number 2 will simply help in creating log, in desired location or default location unless specified. You simply un-comment it.
output = stunnel.log
;The below paramter number 3, is a default certificate that is provided only for testing by stunnel - you should get your own though. You simply un-comment it.
cert = stunnel.pem
You are done with configuration of Stunnel now !
[ C ] Service Install - Its an option to enable the service so you install the service as highlighted.
It then gives you a confirmation when you see the below pop-up:
[ D ] Service Start - Once the service is installed (it literally means service is enabled ) the next step then is starting the service and below is how its done.
It pops up with the confirmation of the service and once it says started, you are done with the stunnel part here.
4. Configure the SAP BusinessObjects Servers.
Lets begin with configuring BOBJ servers with what you have set in the stunnel.conf file; you will now need the ip address and the port number that you specified in the stunnel.conf file. You can configure ANY Job server in the SAP BusinessObjects Platform, Edge or Crystal Server - but yes, it should be relevant to your business workflow.
Let's take an example; let's pick Adaptive Job Server in BI4.x -
- In CMC, go to Server and then we go to Properties of the Adaptive Job Server and click Destination.
- Under Destination, pull the drop down and select Email then Add
- Under Domain Name specify value as gmail.com
- Under Host specify the ip address of the machine which has Stunnel installed.
- Under Port specify the free available port number that you have already set in the stunnel.conf file.
- Let Authentication be set as Login
- User Name should obviously be your Gmail Account User Name. In my case its my Gmail user id
- Password its self-explanatory and needless to explain its your password.
- From should contain the same user id as your Gmail account as that's all what we want after what we have done so far - to be able to send email as if it was sent from the Gmail Account.
- To, CC is any valid email address of your intended audience.
- Subject is self-explanatory
- Message is self-explanatory
- Click Save and Closeand Restart this Job Server for the changes to get effect.
You can configure ANY Job server. Please click and refer this below screenshot as this will explain you everything what is necessary while configuring it on BOBJ servers.
With this example, I can now schedule a webi report and use my gmail id to send emails with reports etc. to a specific email destination.
Note I have used Stunnel version 4.36 here as that's what I personally prefer - that was released around 2011, and between late 2011 - early 2012 I used stunnel for the first time and made Gmail work on SAP BusinessObjects and it works on BI4.x as well. The latest release of stunnel comes with an additional parameter called [gmail-smtp] so you can use this [gmail-smtp] parameter directly instead of [ssmtp] (please refer step 3, section B of this blog)
Additionally, while installing the latest Stunnel version 5.01, it will ask you 4-5 self-explanatory questions to create a self-signed certificate, and as soon as you are done answering with it, you hit enter and the installation will complete. Once it is installed, you configure the similar way as described in step 3 and onwards. Stunnel version 5.01 also addresses Heartbleed security bug so I recommend you to go ahead with Stunnel version 5.01 if you are concerned regarding the recent buzz - the Heart-bleed issue.
In case you face any errors while configuring or making stunnel work - you may be required to troubleshoot in the areas of network, port number availability, ip address, firewall, validity of recipient's email address, and verifying whether the inbox of recipient is full such that it cannot accept anymore emails. Stunnel is a 3rd party-tool so getting any help on this with SAP is less likely but there are few SAP Note's available which may help in case of any errors while scheduling to an email destination.