Configuing Appian 7.10 with GMAIL ( smtp.gmail.com ) : ====================

Configuing Appian 7.10 with GMAIL ( smtp.gmail.com ) :
========================================================================
Getting authentication failure while Appian trying to connect to GMAIL.

06:37:31,340 INFO [stdout] (Appian Work Item - 1 - ProcessExec00 : UnattendedJavaActivityRequest) 2015-09-30 06:37:31,339 [Appian Work Item - 1 - ProcessExec00 : UnattendedJavaActivityRequest] ERROR com.appiancorp.ap2.util.Mail - Could not send mail via smtp.gmail.com:587 to venusaikumar@gmail.com

06:37:31,361 INFO [stdout] (Appian Work Item - 1 - ProcessExec00 : UnattendedJavaActivityRequest) 2015-09-30 06:37:31,353 [Appian Work Item - 1 - ProcessExec00 : UnattendedJavaActivityRequest] ERROR com.appiancorp.process.runtime.activities.SendEmailActivity - javax.mail.AuthenticationFailedException: 534-5.7.14 <accounts.google.com/ContinueSignIn
============================================================...

mail.txt

OriginalPostID-170217

OriginalPostID-170217

  Discussion posts and replies are publicly visible

  • ...============

    Attaching server.log and sending email section for more details .
  • Is 2-step verification enabled for your account? You may need to use an application-specific password in the passwords.properties instead of your regular gmail password.

    See - support.google.com/.../78754
  • There is no 2 step verification to my account . Account will be opened after just specifying the username and password.
  • Abhi is quite right - follow the instructions at the link he has provided. the logs clearly show the following:

    Caused by: javax.mail.AuthenticationFailedException: <accounts.google.com/ContinueSignIn
    UN-DoUKRXGLoeYLJc4C7LNgC0dkL3w95BgmgkY4JAEn03qphsRyu_SzHifEGn2of54U6Zn
    afO_n4cNiwihmmeQaXu7prasLTbEQLJ4FXFAS84nIGswR5LR_BF4Gh0zKym_6TnADtI3jz
    QSsRqf3qwUEOmLdYPMedR39kWFJbmpIzw2Kbl0rByjq81cYH2c3D0ZN8ACT51aNc6qJm7C
    AS7A7Qq8JH5CIDWKsorEI6rWQn34> Please log in via your web browser and
    then try again.
    Learn more at
    support.google.com/.../78754
  • Thanks Abhi & Philib

    After applying 2 step verification for the user , we were able to send the mails from Appian.

    Now we are trying to start a process by receiving a mail and we provided the details in ejb-jar.xml and in passwords.properties and we are getting the following message in logs :

    Attaching ejb-jar.xml file for more details .
    ===================================================================
    06:04:52,824 INFO [stdout] (Appian MailActivation - 1) DEBUG: Providers Listed By Protocol: {imaps=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc], imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], smtps=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc], pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc], pop3s=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun Microsystems, Inc], smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]}

    06:04:52,825 INFO [stdout] (Appian MailActivation - 1) DEBUG: successfully loaded resource: /META-INF/javamail.default.address.map

    06:04:52,827 INFO [stdout] (Appian MailActivation - 1) DEBUG: setDebug: JavaMail version 1.4.5.redhat-2

    06:04:52,828 INFO [stdout] (Appian MailActivation - 1) DEBUG: getProvider() returning javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc]

    06:04:52,843 INFO [stdout] (Appian MailActivation - 1) DEBUG: mail.imap.fetchsize: 16384

    06:04:52,845 INFO [stdout] (Appian MailActivation - 1) DEBUG: mail.imap.statuscachetimeout: 1000

    06:04:52,845 INFO [stdout] (Appian MailActivation - 1) DEBUG: mail.imap.appendbuffersize: -1

    06:04:52,846 INFO [stdout] (Appian MailActivation - 1) DEBUG: mail.imap.minidletime: 10

    06:04:52,847 INFO [stdout] (Appian MailActivation - 1) DEBUG: enable STARTTLS

    06:04:52,851 INFO [stdout] (Appian MailActivation - 1) DEBUG: trying to connect to host "smtp.gmail.com", port 143, isSSL false


    receive.txt

  • Now we specified the port in ejb-jar.xml file and now we can see the connection established with the mail server smtp.gmail.com with port 587

    We created a process model to verify the Inbound mails( To Start a process by Email) and public events enabled, processmodel UUID is mentioned in Email Body.

    Attaching ejb-jar.xml file details for more information .

    From the log we get the details as follows :-
    ==========================================
    09:46:56,779 INFO [stdout] (Appian MailActivation - 1) DEBUG: Providers Listed By Protocol: {imaps=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc], imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], smtps=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc], pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc], pop3s=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun Microsystems, Inc], smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]}

    09:46:56,782 INFO [stdout] (Appian MailActivation - 1) DEBUG: successfully loaded resource: /META-INF/javamail.default.address.map

    09:46:56,786 INFO [stdout] (Appian MailActivation - 1) DEBUG: setDebug: JavaMail version 1.4.5.redhat-2

    09:46:56,787 INFO [stdout] (Appian MailActivation - 1) DEBUG: getProvider() returning javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc]

    09:46:56,789 INFO [stdout] (Appian MailActivation - 1) DEBUG: mail.imap.fetchsize: 16384

    09:46:56,790 INFO [stdout] (Appian MailActivation - 1) DEBUG: mail.imap.statuscachetimeout: 1000

    09:46:56,791 INFO [stdout] (Appian MailActivation - 1) DEBUG: mail.imap.appendbuffersize: -1

    09:46:56,792 INFO [stdout] (Appian MailActivation - 1) DEBUG: mail.imap.minidletime: 10

    09:46:56,793 INFO [stdout] (Appian MailActivation - 1) DEBUG: enable STARTTLS

    09:46:56,794 INFO [stdout] (Appian MailActivation - 1) DEBUG: trying to connect to host "smtp.gmail.com", port 587, isSSL false

    09:46:57,226 INFO [stdout] (Appian MailActivation - 1) 220 smtp.gmail.com ESMTP pk2sm5568644pbb.21 - gsmtp

    ejb-jar.xml