First enable Gmail to work with POP clients


Here's how to enable POP in Gmail:

  1. Sign in to Gmail.
  2. Click the gear in the top right .
  3. Select Settings.
  4. Click Forwarding and POP/IMAP.
  5. Select Enable POP for all mail or Enable POP for mail that arrives from now on.
  6. Choose what to do with your messages after your POP client or device receives them.
  7. Click Save Changes.

Although the radio button next to your selected option may not stay selected, Gmail displays the status next to 'POP Status:.' When you enable POP, your settings display 'POP Status: POP is enabled.'

If your POP settings are turned off, the status will indicate that POP is disabled.


UPDATE
You need to login to your gmail account and set the Allow less secured Apps to ON




Configure your EmailService

G-mail SMTP uses port 465 and uses authentication with SSL




NOTE

If you created a G-mail Account for this application only


Make sure you configure your G-Mail account on a PC somewhere .


If you never use the account for over a year, it will get deleted by G-mail





To test the account

Right click on the Email in the account manager and select send




Fill in the From and To

Add subject and a small message


Depending on the poll rate setting, it can take a few minutes to send the first message from the Queue


Look for any error messages in the Application Director to monitor communication errors from the SMTP Host.


The debug flag can be set in the EmailModule in order to do a more detail examination of the process

Open the property sheet of the OutgoingAccount, and set the Debug to True


Don't Forget to turn it off ! ..







IMPORTANT NOTE possible ERROR


NOTE 1

In the alarm service 

Make sure your account name is a different one than the one in the reply To

No logical explanation, but if you use the same, it will not work !




NOTE 2

When using a JENE controller like PC3000, PC6000 or any of the edge series, endure you are using email.jar version 3.8.111.1  ( file available below) 

Older version of this jar will not work, and will produce an error like below

Login to the email account works, but no email is sent


DEBUG SMTP: Attempt to authenticate using mechanisms: LOGIN PLAIN DIGEST-MD5 NTLM

DEBUG SMTP: AUTH LOGIN command trace suppressed

DEBUG SMTP: AUTH LOGIN succeeded

java.lang.NoSuchMethodException: com.tridium.email.EmailUtil$CustomMimeMessage.setDataHandler(javax.activation.DataHandler)

at java.lang.Class.getMethod(Class.java:1786)

at com.tridium.email.EmailUtil.getSetDataHandlerMethod(EmailUtil.java:303)

at com.tridium.email.EmailUtil.setDataHandler(EmailUtil.java:279)

at com.tridium.email.EmailUtil.toMessage(EmailUtil.java:194)

at javax.baja.email.BOutgoingAccount.dequeueMemory(BOutgoingAccount.java:1061)

at javax.baja.email.BOutgoingAccount.pollQueue(BOutgoingAccount.java:775)

at javax.baja.email.BOutgoingAccount.poll(BOutgoingAccount.java:715)

at javax.baja.email.BEmailAccount.doPoll(BEmailAccount.java:614)

at javax.baja.email.BEmailAccount.access$0(BEmailAccount.java:38)

at javax.baja.email.BEmailAccount$Poller.run(BEmailAccount.java:664)

ERROR [16:59:33 08-Jan-18 EST][email] BOutgoingAccount could not dequeue in-memory email: com.tridium.email.EmailUtil$CustomMimeMessage.setDataHandler(javax.activation.DataHandler)

java.lang.NoSuchMethodException: com.tridium.email.EmailUtil$CustomMimeMessage.setDataHandler(javax.activation.DataHandler)

at java.lang.Class.getMethod(Class.java:1786)

at com.tridium.email.EmailUtil.getSetDataHandlerMethod(EmailUtil.java:303)

at com.tridium.email.EmailUtil.setDataHandler(EmailUtil.java:279)

at com.tridium.email.EmailUtil.toMessage(EmailUtil.java:194)

at javax.baja.email.BOutgoingAccount.dequeueMemory(BOutgoingAccount.java:1061)

at javax.baja.email.BOutgoingAccount.pollQueue(BOutgoingAccount.java:775)

at javax.baja.email.BOutgoingAccount.poll(BOutgoingAccount.java:715)

at javax.baja.email.BEmailAccount.doPoll(BEmailAccount.java:614)

at javax.baja.email.BEmailAccount.access$0(BEmailAccount.java:38)

at javax.baja.email.BEmailAccount$Poller.run(BEmailAccount.java:664)

QUIT

221 2.0.0 closing connection 86sm7484439iok.45 - gsmtp