cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Sending Windchill notification with SMTP server using TLS

Level 1

Sending Windchill notification with SMTP server using TLS

There' are a few discussions on this already but I was not able to get things working after following them so hoping someone can point me in the right direction.

I want to configure Windchill to use an SMTP server that uses TLS.  I wasn't successful in getting this to work and don't have access to the SMTP server so I switched to trying to use gmail SMTP since it looks like others have gotten this to work in the past. 

I have:

1) Enabled IMAP in the gmail account

2) Enabled less secure access in the gmail account

3) Exported a certificate for smtp.gmail.com and imported it into the JRE keystore using keytool.

4) Emailed my corporate account from the gmail account to make sure it doesn't get caught as spam

5) Set the following Windchill properties:

  • wt.mail.from=<gmail address>
  • wt.notify.notificationSenderEmail=<gmail address>
  • wt.mail.mailhost=smtp.gmail.com:587
  • wt.mail.properties=$(wt.home)$(dir.sep)mail.properties
  • wt.mail.smtp.starttls.enable=true
  • wt.mail.starttls.enable=true  (I'm pretty sure the line above is the correct property but saw it called out this way a few times so set this as well just in case)
  • wt.mail.smtp.starttls.required=true
  • wt.mail.smtp.ssl.trust=smtp.gmail.com
  • wt.mail.smtp.username=<-> - this is stored in mail.properties file
  • wt.mail.smtp.password=<gmail password> - this is stored in mail.properties file

6) Tried to send email from Windchill.  The email stays in the queue and never gets sent.

I turned on the verbosity in Windchill.  In the method server log it appears to connect but not using TLS (my IP XXXX out for security) :

2016-04-14 16:41:57,589 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - 250-smtp.gmail.com at your service, [XXXXXX]

2016-04-14 16:41:57,589 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - 250-SIZE 35882577

2016-04-14 16:41:57,590 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - 250-8BITMIME

2016-04-14 16:41:57,590 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - 250-STARTTLS

2016-04-14 16:41:57,590 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - 250-ENHANCEDSTATUSCODES

2016-04-14 16:41:57,590 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - 250-PIPELINING

2016-04-14 16:41:57,590 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - 250-CHUNKING

2016-04-14 16:41:57,590 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - 250 SMTPUTF8

2016-04-14 16:41:57,590 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - DEBUG SMTP: Found extension "SIZE", arg "35882577"

2016-04-14 16:41:57,591 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - DEBUG SMTP: Found extension "8BITMIME", arg ""

2016-04-14 16:41:57,591 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - DEBUG SMTP: Found extension "STARTTLS", arg ""

2016-04-14 16:41:57,591 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""

2016-04-14 16:41:57,591 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - DEBUG SMTP: Found extension "PIPELINING", arg ""

2016-04-14 16:41:57,591 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - DEBUG SMTP: Found extension "CHUNKING", arg ""

2016-04-14 16:41:57,591 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - DEBUG SMTP: Found extension "SMTPUTF8", arg ""

2016-04-14 16:41:57,633 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - DEBUG SMTP: use8bit false

2016-04-14 16:41:57,633 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - MAIL FROM:<adawkins@fitbit.com>

2016-04-14 16:41:57,647 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - 530 5.7.0 Must issue a STARTTLS command first. d12sm60264283pfj.85 - gsmtp

2016-04-14 16:41:57,647 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - DEBUG SMTP: got response code 530, with response: 530 5.7.0 Must issue a STARTTLS command first. d12sm60264283pfj.85 - gsmtp

Any suggestions for what I'm missing highly appreciated!

Abby

4 REPLIES 4

Re: Sending Windchill notification with SMTP server using TLS

I am using google apps email with test system, here are my settings.

wt.mail.png

I have enabled wt.mail.verboseTransport verbose and here is the  snippet from the logs.

2016-04-14 22:02:53,392 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - DEBUG SMTP: useEhlo true, useAuth true

2016-04-14 22:02:53,392 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - DEBUG SMTP: trying to connect to host "smtp.gmail.com", port 587, isSSL false

2016-04-14 22:02:53,526 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - 220 smtp.gmail.com ESMTP 43sm19562986qgh.28 - gsmtp

2016-04-14 22:02:53,526 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - DEBUG SMTP: connected to host "smtp.gmail.com", port: 587

2016-04-14 22:02:53,526 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator -

2016-04-14 22:02:53,527 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - EHLO tbwcapp08.domain.local

2016-04-14 22:02:53,575 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - 250-smtp.gmail.com at your service, [73.253.247.146]

2016-04-14 22:02:53,575 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - 250-SIZE 35882577

2016-04-14 22:02:53,575 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - 250-8BITMIME

2016-04-14 22:02:53,576 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - 250-STARTTLS

2016-04-14 22:02:53,576 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - 250-ENHANCEDSTATUSCODES

2016-04-14 22:02:53,576 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - 250-PIPELINING

2016-04-14 22:02:53,576 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - 250-CHUNKING

2016-04-14 22:02:53,576 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - 250 SMTPUTF8

2016-04-14 22:02:53,576 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - DEBUG SMTP: Found extension "SIZE", arg "35882577"

2016-04-14 22:02:53,576 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - DEBUG SMTP: Found extension "8BITMIME", arg ""

2016-04-14 22:02:53,577 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - DEBUG SMTP: Found extension "STARTTLS", arg ""

2016-04-14 22:02:53,577 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""

2016-04-14 22:02:53,577 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - DEBUG SMTP: Found extension "PIPELINING", arg ""

2016-04-14 22:02:53,577 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - DEBUG SMTP: Found extension "CHUNKING", arg ""

2016-04-14 22:02:53,577 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - DEBUG SMTP: Found extension "SMTPUTF8", arg ""

2016-04-14 22:02:53,577 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - STARTTLS

2016-04-14 22:02:53,616 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - 220 2.0.0 Ready to start TLS

2016-04-14 22:02:53,873 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - EHLO tbwcapp08.domain.local

2016-04-14 22:02:53,912 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - 250-smtp.gmail.com at your service, [73.253.247.146]

2016-04-14 22:02:53,912 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - 250-SIZE 35882577

2016-04-14 22:02:53,912 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - 250-8BITMIME

2016-04-14 22:02:53,912 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - 250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH

2016-04-14 22:02:53,912 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - 250-ENHANCEDSTATUSCODES

2016-04-14 22:02:53,912 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - 250-PIPELINING

2016-04-14 22:02:53,912 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - 250-CHUNKING

2016-04-14 22:02:53,912 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - 250 SMTPUTF8

2016-04-14 22:02:53,913 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - DEBUG SMTP: Found extension "SIZE", arg "35882577"

2016-04-14 22:02:53,913 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - DEBUG SMTP: Found extension "8BITMIME", arg ""

2016-04-14 22:02:53,913 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - DEBUG SMTP: Found extension "AUTH", arg "LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH"

2016-04-14 22:02:53,913 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""

2016-04-14 22:02:53,913 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - DEBUG SMTP: Found extension "PIPELINING", arg ""

2016-04-14 22:02:53,913 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - DEBUG SMTP: Found extension "CHUNKING", arg ""

2016-04-14 22:02:53,913 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - DEBUG SMTP: Found extension "SMTPUTF8", arg ""

2016-04-14 22:02:53,913 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - DEBUG SMTP: Attempt to authenticate using mechanisms: LOGIN PLAIN DIGEST-MD5 NTLM

2016-04-14 22:02:53,913 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - DEBUG SMTP: AUTH LOGIN command trace suppressed

2016-04-14 22:02:54,137 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - DEBUG SMTP: AUTH LOGIN succeeded

2016-04-14 22:02:54,157 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - DEBUG SMTP: use8bit false

2016-04-14 22:02:54,157 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - MAIL FROM:<mail@bineshkumar.me>

2016-04-14 22:02:54,193 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - 250 2.1.0 OK 43sm19562986qgh.28 - gsmtp

2016-04-14 22:02:54,193 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - RCPT TO:<mail@bineshkumar.me>

2016-04-14 22:02:54,229 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - 250 2.1.5 OK 43sm19562986qgh.28 - gsmtp

2016-04-14 22:02:54,229 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - DEBUG SMTP: Verified Addresses

2016-04-14 22:02:54,229 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - DEBUG SMTP:   mail@bineshkumar.me

2016-04-14 22:02:54,229 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - DATA

2016-04-14 22:02:54,331 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - 354  Go ahead 43sm19562986qgh.28 - gsmtp

2016-04-14 22:02:54,334 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - Date: Fri, 15 Apr 2016 02:02:54 +0000 (GMT)

2016-04-14 22:02:54,334 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - From: mail@bineshkumar.me

2016-04-14 22:02:54,334 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - To: mail@bineshkumar.me

2016-04-14 22:02:54,334 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - Message-ID: <1254670415.0.1460685774157@tbwcapp08.domain.local>

2016-04-14 22:02:54,334 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - Subject: Approve Promotion Request

2016-04-14 22:02:54,334 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - MIME-Version: 1.0

2016-04-14 22:02:54,334 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - Content-Type: text/html; charset="UTF-8"

2016-04-14 22:02:54,334 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - Content-Transfer-Encoding: 7bit

Thank you

Binesh Kumar

Re: Sending Windchill notification with SMTP server using TLS

These look pretty much like what I have but went through and reset them all again without any luck.   Our servers are all in the cloud so we are using SSL. Using openssl: openssl s_client -connect smtp.gmail.com:587 -starttls smtp  I'm able to submit an email without the STARTTLS issue so my guess it's something to do with the java certificate.  I've tried redownloading and reimporting the smtp.google.com certificate into the keystore but still no luck...

Abby

Re: Sending Windchill notification with SMTP server using TLS

Maybe the issue is my version of Windchill?  I'm on 10.2 M020.  I know PTC doesn't support TLS with the SMTP server but since others had gotten it to work, I was hopeful I could figure it out...

Abby

Re: Sending Windchill notification with SMTP server using TLS

I suspect a syntax error in the wt.properties, it is firing the connection without TLS. If I comment my TLS enable line in wt.properties I get the same error as yours. Stating 10.1 TLS is enabled, so you are good.

2016-04-15 20:27:08,972 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - 250 SMTPUTF8

2016-04-15 20:27:08,973 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - DEBUG SMTP: Found extension "SIZE", arg "35882577"

2016-04-15 20:27:08,973 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - DEBUG SMTP: Found extension "8BITMIME", arg ""

2016-04-15 20:27:08,973 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - DEBUG SMTP: Found extension "STARTTLS", arg ""

2016-04-15 20:27:08,973 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""

2016-04-15 20:27:08,973 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - DEBUG SMTP: Found extension "PIPELINING", arg ""

2016-04-15 20:27:08,973 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - DEBUG SMTP: Found extension "CHUNKING", arg ""

2016-04-15 20:27:08,973 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - DEBUG SMTP: Found extension "SMTPUTF8", arg ""

2016-04-15 20:27:09,047 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - DEBUG SMTP: use8bit false

2016-04-15 20:27:09,047 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - MAIL FROM:<mail@bineshkumar.me>

2016-04-15 20:27:09,095 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - 530 5.7.0 Must issue a STARTTLS command first. f139sm9572095qke.43 - gsmtp

2016-04-15 20:27:09,095 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - DEBUG SMTP: got response code 530, with response: 530 5.7.0 Must issue a STARTTLS command first. f139sm9572095qke.43 - gsmtp

2016-04-15 20:27:09,095 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator -

2016-04-15 20:27:09,095 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - RSET

2016-04-15 20:27:09,133 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - 250 2.1.5 Flushed f139sm9572095qke.43 - gsmtp

2016-04-15 20:27:09,135 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - DEBUG SMTP: MessagingException while sending, THROW:

2016-04-15 20:27:09,136 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.0 Must issue a STARTTLS command first. f139sm9572095qke.43 - gsmtp

2016-04-15 20:27:09,136 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator -

2016-04-15 20:27:09,136 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:2203)

2016-04-15 20:27:09,136 INFO  [EMailQueue.SchedulingThread] wt.system.out Administrator - at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:1694)

2016-04-15 20:27:09,136 INFO  [EMailQueue.Sche

I know you would have done that, but scan through wt.properties again wt.mail properties

Thank you

Binesh Kumar