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.

Download_Stunnel.JPG

3.  A series of sub-steps now follows: A, B, C, D –


    [ A ]  Installing StunnelRun the .exe file, and the installation of Stunnel begins.


Installing_Stunnel.JPG


   [ B ] Configure Stunnel – after it is installed, edit the stunnel.conf file and this is how you will open stunnel.conf file as highlighted.

Edit_Stunnel_Conf.JPG

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.

Install_Stunnel_Service.JPG

  It then gives you a confirmation when you see the below pop-up:

Service_Installed.JPG

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

Start_Service.JPG

It pops up with the confirmation of the service and once it says started, you are done with the stunnel part here.

Service_Started.JPG

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

Configure_BOBJ.JPG

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 Pandalai ]


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: [xxxxxx@xxxx.com]]

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



To report this post you need to login first.

9 Comments

You must be Logged on to comment or reply to a post.

  1. Arvind Pandalai

    Good Job Rahul. Expecting more of such blogs in SCN. Its different and new. Realy good stuff.

    You have mentioned about SAP Notes available for this. Could you also update them.

    (0) 
    1. Rahul Verma Post author

      Hi Arvind,

      Thank you and am glad you found it good – I’ll try as much possible to post subjects which are of Interest.   The errors are of variety in nature and to include each of those is difficult.  What I mentioned is about SAP Notes being available for errors etc. while scheduling to an email destination and not stunnel in specific.

      Even then, there are my streamlined areas to look for, while troubleshooting:

      1. At the Stunnel level :   Here, the output.log file of stunnel will help in determining the cause in case of misconfiguration.

      2. When Stunnel talks to Gmail :  The SMTP and the port number of the Gmail is to be confirmed here.

      3. When Stunnel talks to the BOBJ Server :   Since the BOBJ Server and Stunnel can be installed on different location – the network is a big factor.

      4. When BOBJ talks to your Gmail Account :   What you configure in the Job Server of BOBJ, like password, authentication type, recipients valid email address, verifying whether the recipients inbox is full – are the scope of work to look for.

      Basically, at minimum level – you need to make sure you that you’ve considered the above factors.  I will try to update the relevant SAP Notes – as I get time – which may be of help.

      Thank you,  Rahul

      (0) 
  2. Moritz Hödel

    Hi Rahul,

    Nice guide, very clearly described, but where is the need for using gmail instead of a company-owned, internally managed SMTP server?

    Don’t you have one at VW?!

    I think this is critical in terms of information disclosure…especially when dealing with a company like Google..

    Krgds
    Moritz

    (0) 
    1. Denis Konovalov

      a lot of businesses use gmail as their corporate email service.
      with level of IT personel a lot of big businesses employ now – it might be more secure and reliable 😉

      (0) 
      1. Moritz Hödel

        In my opinion, giving away such sensitive information like BI reports to another company in general, is never a good idea.

        But I think the mindset about that is totally different in the US to the one we have in Germany.

        And besides that: Why do my comments have to be approved by Mods since some minutes?

        Aren’t critical comments allowed in SCN??

        (I tried to ask you this in a private message, but unforunately I can’t send any to you…)

        (0) 
        1. Denis Konovalov

          so, you’re against cloud then ? 😉

          as on moderation of your comments — soemthing is weird with this thread, my comments also require moderation here. SCN glitch or something.

          (0) 
    2. Rahul Verma Post author

      Hi Moritz,

      Thank you – you found my stuff nice – I used my work email in the “To” field – only for an example here.  As Denis rightly said, there are other businesses which use Google’s Enterprise or Business Solution [ Gmail for work – Get custom email and more – Google ] and this is why they need this.  It is obviously secured and reliable and businesses have been using it.

      Thank you,  Rahul

      (0) 

Comments are closed.