2

I am a beginner is TIBCO.I want to send email using tibco mail activity.Following are my configuration of send mail activity

host: smtp.gmail.com:587 selected the authenticate check box then in username field entered my gmail username and in password entered my gmail password.

and in the input tab provided the valid to address,subject and body.When I run then I get the following error

BW-MAIL-100019 Job-10000 Error in [Sender.process/Send Mail] Error sending mail message. Cause: com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.0 Must issue a STARTTLS command first. nx12sm74930440pab.6 - gsmtp

I have also checked by changing the host like this smtp.gmail.com:25 but still the same error.Can any body please tell me what wrong am I doing?

rocking
  • 4,729
  • 9
  • 30
  • 45
  • 587 is SMTP/TLS port. 465 is SMTP/SSL port. Have you tried using this port? Also, make sure the Send Mail activity's Trusted Certificates Folder points to a folder containing the whole Gmail certificate chain. – Nicolas Heitz May 27 '14 at 21:31
  • @NicolasHeitz yes I have tried with 465 port also but it did not work.You said *Also, make sure the Send Mail activity's Trusted Certificates Folder points to a folder containing the whole Gmail certificate chain.* can you tell me how to do this?You can post as answer and I will upvote – rocking May 28 '14 at 08:18
  • @NicolasHeitz I have tried your way but its not working.Please what do now?Can you send me a project to send email using gmail? – rocking May 31 '14 at 10:48
  • For some reason, I wasn't able to make it work with SSL (it would require further investigations) but it worked fine with TLS. I will edit my original answer with the resolution details. – Nicolas Heitz Jun 09 '14 at 19:54
  • @NicolasHeitz i did as you suggested now i get error `BW-MAIL-100019 Job-18000 Error in [Sender.process/Send Mail] Error sending mail message. Cause: com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.0 Must issue a STARTTLS command first. it4sm70296408pbc.39 - gsmtp` – rocking Jun 10 '14 at 16:18
  • That must be because your version of BW does not support SSL. Try adding the following properties in the TRA of your application (or in designer.tra if you are testing from Designer, then restart Designer): java.property.mail.smtp.starttls.enable=true and java.property.mail.smtp.starttls.required=true. But I doubt this will work. If it doesn't, you are left with 2 options: 1) Upgrade BW to 5.10 (or later) or 2) Use custom Java code in your BW process (there's a great and working example here: http://www.mkyong.com/java/javamail-api-sending-email-via-gmail-smtp-example). – Nicolas Heitz Jun 10 '14 at 17:19
  • @NicolasHeitz you said *Try adding the following properties in the TRA of your application* can you please tell me how to do this? – rocking Jun 10 '14 at 18:07
  • I'm assuming you are testing from Designer? If so, add the 2 property lines into `\designer\5.x\bin\designer.tra` then restart Designer and test again. – Nicolas Heitz Jun 10 '14 at 18:49
  • @NicolasHeitz Is designer.tra is used for adding any java related properties ? – rocking Jun 11 '14 at 06:14
  • In short, designer.tra and bwengine.tra are used for BW engine configuration. You can use them to add Java and BW properties, among others. But this is another topic that we should cover in a dedicated question. – Nicolas Heitz Jun 11 '14 at 07:37
  • @NicolasHeitz Thanks for helping.The way you said worked.Hope you will help me in future if I face any problems – rocking Jun 11 '14 at 15:25
  • Glad to hear that! Just to be sure, you only added the 2 lines to designer.tra to make it work? Please confirm and I will update my original answer with this tip for those who use a BW version older than 5.10. – Nicolas Heitz Jun 11 '14 at 16:04
  • I believe similar questions have already been asked (e.g. http://stackoverflow.com/questions/23569242/how-tibco-is-useful-to-organizations-and-why-it-is-used), but if not, feel free to create a new question so that this thread remains focused on your original post. – Nicolas Heitz Jun 11 '14 at 17:34
  • @NicolasHeitz ohh yes and that question has been asked by me.If possible please answer in that question too.I promise I will upvote there also – rocking Jun 11 '14 at 17:59
  • @NicolasHeitz I have awarded 50 bounty to your answer,Thanks again – rocking Jun 13 '14 at 15:51
  • @NicolasHeitz can you please answer this question http://stackoverflow.com/questions/24925787/why-do-we-use-tibco-mapper-activity – rocking Jul 24 '14 at 05:32

1 Answers1

1

Follow these instructions to use the Send Mail activity over TLS (port 587):

  1. First, retrieve the full certificate chain of the SMTP server. To do so, download an OpenSSL client (e.g. GnuWin32's implementation if you are on Windows), then type:

    openssl s_client -showcerts -connect smtp.gmail.com:587 -starttls smtp
    

    A list of PEM-formatted certs should show up. Copy each of them in a separate file (or all of them in a single file) with extension .cert and add those files to any folder in your BW project. Please note that the root CA certificate is missing from the chain; you can download it here and add it to the certs folder. You can also use an external folder if you want the certs to be managed outside your project by using the BW_GLOBAL_TRUSTED_CA_STORE global variable (see BW documentation).

  2. On the Send Mail activity, set the Host field to smtp.gmail.com:587.

  3. If using BW 5.8 or below, add the following Java properties to the TRA of your application:

    java.property.mail.smtp.starttls.enable=true
    java.property.mail.smtp.starttls.required=true
    

    If using BW 5.10 or above, check the SSL box and make the Trusted Certificates Folder point to your certs folder.

  4. Check the Authenticate box and set the User Name (xxxx@gmail.com) and Password fields with your Google credentials.

Nicolas Heitz
  • 664
  • 5
  • 10
  • you said to check ssl box.Where will get the ssl checkbox?I do not have ssl checkbox in configuration tab of send mail activity.I have name,description,host,authenticate,username and password fields in the configuration tab of send mail activity exactly like this tutorial http://tibcoguide.com/how-to-send-email-from-tibco-using-send-mail-activity/ – rocking Jun 10 '14 at 16:46
  • The SSL checkbox is available since BW 5.10. Which version are you using? – Nicolas Heitz Jun 10 '14 at 17:05
  • my bw version is 5.8.0 – rocking Jun 10 '14 at 17:16