Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
Showing results for 
Search instead for 
Did you mean: 

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:

  1. Pre-Installation Must Know
  2. Download Locations - of Stunnel
  3. 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

     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 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.


accept   =  <Insert the static ip address or the FQDN of the machine where you have stunnel installed colon and the free port number>

connect =

;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  -

  1. In CMC, go to Server and then we go to Properties of the Adaptive Job Server and click Destination.
  2. Under Destination, pull the drop down and select Email then Add
  3. Under Domain Name specify value as
  4. Under Host specify the ip address of the machine which has Stunnel installed.
  5. Under Port specify the free available port number that you have already set in the stunnel.conf file.
  6. Let Authentication be set as Login
  7. User Name should obviously be your Gmail Account User Name.  In my case its my Gmail user id
  8. Password its self-explanatory and needless to explain its your password.
  9. 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.
  10. To, CC is any valid email address of your intended audience.
  11. Subject is self-explanatory
  12. Message is self-explanatory
  13. Click Save and Close and 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.02,  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.02 also addresses Heartbleed security bug so I recommend you to go ahead with Stunnel version 5.02 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.

[ Errors could be variety in nature but below are the SAP Notes that may help in case you run out of any of the following errors, as requested by arvind.pandalai2 ]

1844532 - "Error Initializing SMTP server. Return code: TCP receive failed" while scheduling a Crystal Report to email destination.

1719119 - Error initializing SMTP server Return code: [SMTP 501 -Syntax error in parameters or arguments.]. Reason]:[CrystalEnterprise.Smtp]

1385938 - Server error while sending reports to SMTP location from InfoView using "Send to" option

1410233 - Error "address error. CrystalEnterprise.Smtp: (452)" while scheduling reports to SMTP destination

1474685 - "write error. [Error sending mail message to SMTP server. Return code: [].]: [CrystalEnterprise.Smtp]" when scheduling large report to email as attachment

1544085 - Error: "login error. [CrystalEnterprise.Smtp]: [SMTP Server does not support [login} authentication protocol. Return Code: [SMTEP 530 - Authentication required.].]

1770074 - Getting error: SMTP 440: mailbox Unavailable while scheduling report to email destination

1694875 - Error: "write error. [Error sending mail message to SMTP server. Return code: [].]: [CrystalEnterprise.Smtp]" when scheduling large reports to e-mail destination in BusinessObjects XI 3.1

1789210 - [CrystalEnterprise.Smtp]: [Error sending address(es) to SMTP server. Return code: [SMTP 550 - Requested action not taken: mailbox unavailable.]. Reason: []]

1770074 - Getting error: SMTP 440: mailbox Unavailable while scheduling report to email destination

1774601 - Error sending address to SMTP server Return Code SMTP 504 Command parameter not implemented when Sending Publication

1343231 - Schedule to SMTP fails

Labels in this area