Issues with Configuring Email Server

Hi,

I am trying to configure mail server in Appian V7.10 so an email can be sent using office365 account.
While sending emails Appian reads the configurations mentioned in custom.properties (configuarations suggested in forum.appian.com/.../Mail_Server_Setup.html). But we are facing problem while sending mails.

Steps followed:

we configured office365 as mail server, configured this as SMTP host.
we did the setting as mentioned in forum. forum.appian.com/.../Mail_Server_Setup.html
conf.mailhandler.mail.smtp.host=SMTP_HOST:PORT
conf.mailhandler.mail.smtp.auth=true
conf.mailhandler.mail.user=myuser@abc.com
conf.mailhandler.mail.transport.protocol=smtp
password is mentioned in password.properties file.
conf.password.SMTP=mypassword

Notification sender is also configured.
conf.mailhandler.ntf_sndr_addr=myuser@abc.com
conf.mailhandler.ntf_sndr_name=myuser

We tested the connectivity from the appian...

OriginalPostID-167251

OriginalPostID-167251

  Discussion posts and replies are publicly visible

  • There are two issues here:


    1. You cannot send email using Send Email Smart Service
    ---> Error in logs: Caused by: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
    ---> Root cause: SSL handshake
    ---> Suggested solution #1

    Use this value instead of yours and restart JBoss

    conf.mailhandler.mail.transport.protocol=smtp

    ---> Suggested solution #2 if #1 doesn't work

    leave smtps here:

    conf.mailhandler.mail.transport.protocol=smtps

    but make this false and restart JBoss

    conf.mailhandler.mail.smtp.starttls.required=false



    2. The system cannot send email alerts
    ---> Error in logs: Caused by: java.io.IOException: Invalid Http response
    ---> Root cause: This has to do with the settings I mentioned earlier. I still believe they're misconfigured.
    ---> Will investigate this once #1 is resolved
  • We implemented the first step and below is the error details :
    ==========================================================
    07:14:44,206 INFO [stdout] (Appian Work Item - 1 - NotificationsEmail : MailRequest) 2015-09-22 07:14:44,206 [Appian Work Item - 1 - NotificationsEmail : MailRequest] ERROR com.appiancorp.ap2.util.Mail - Could not send mail via smtp.office365.com:587 to user2@xyz.com

    07:14:44,208 ERROR [org.jboss.as.ejb3.invocation] (Appian Work Item - 1 - NotificationsEmail) JBAS014134: EJB Invocation failed on component UnattendedRequestHandlerBean for method public abstract com.appiancorp.process.engine.ContinuationResponse com.appiancorp.ra.workpoller.UnattendedRequestListener.onMessage(com.appiancorp.process.engine.UnattendedRequest): javax.ejb.EJBException: com.appiancorp.process.engine.EmailSendException: Could not send email from user1@xyz.com to user2@xyz.com subject Error in Task: Send E-Mail

    Caused by: com.appiancorp.process.engine.EmailSendException: Could not send email from user1@xyz.com to user2@xyz.com subject Error in Task: Send E-Mail

    Caused by: javax.mail.AuthenticationFailedException: 535 5.7.3 Authentication unsuccessful

    07:14:44,273 INFO [stdout] (default-threads - 49) 2015-09-22 07:14:44,260 [default-threads - 49] ERROR com.appiancorp.ra.workpoller.WorkItemListener - The following exception occurred while attempting to complete work item [(WorkId: 6, WorkType: [AbstractMailRequest: from=user1@xyz.com, to=user2@xyz.com, subject=Error in Task: Send E-Mail], Response: null, ServerName: NotificationsEmail)] - Exception:

    07:14:44,274 INFO [stdout] (default-threads - 49) javax.resource.spi.work.WorkCompletedException: com.appiancorp.process.engine.EmailSendException: Could not send email from user1@xyz.com to user2@xyz.com subject Error in Task: Send E-Mail
    ========================================================

    We specified the password for user1 in passwords.properties under

    =================================================
    ## The password used to connect to the SMTP server configured in
    ## conf.mailhandler.mail.smtp.host in custom.properties
    conf.password.SMTP=<Password for Sender (user 1) to for connecting to the Mail Server >
  • @Eduardo : Please have a look into the above details and let us know the further proceedings.
  • It seems we're making progress, we no longer get the SSL error because we configured Appian not to fail if the mail server doesn't support SSL.

    Now you need to troubleshoot the authentication problem.

    I suggest you verify the syntax for the username and the password. No domain is required at all in the username.

    I also suggest you retry creating the passwords.properties
  • @Eduardo :

    We still getting authentication unsuccessful even after removing the domain name for the user as below :-
    =======================================================================================================

    05:15:16,967 INFO [stdout] (http-/0.0.0.0:8080-1) 2015-09-23 05:15:16,964 [http-/0.0.0.0:8080-1] ERROR com.appiancorp.ap2.util.Mail - Could not send mail via mail.office365.com:587 to user2@xyz.com

    05:15:16,979 INFO [stdout] (http-/0.0.0.0:8080-1) 2015-09-23 05:15:16,974 [http-/0.0.0.0:8080-1] ERROR com.appiancorp.process.runtime.activities.SendEmailActivity - javax.mail.AuthenticationFailedException: 535 5.7.3 Authentication unsuccessful

    =======================================================================================================

    Attaching custom.properties file and passwords.properties files for more details .
  • I've seen this exact same issue before when the format in which you're passing the username is not correct. Since you're removing the values from custom.properties I cannot tell.

    Can you paste here the value of this setting

    conf.mailhandler.mail.user=

    since the password is unknown pasting the user here is not a risk.
  • When I said: Remove the domain I thought you had something like this

    conf.mailhandler.mail.user=ABC.COM\\vamsib

    but since we now fixed the SSL error I suggest something like this

    conf.mailhandler.mail.user=vamsib@.........
  • After mentioning the fully qualified user with domain name , we are getting the below error :
    =================================================================================
    08:06:20,688 INFO [stdout] (http-/0.0.0.0:8080-2) 2015-09-23 08:06:20,687 [http-/0.0.0.0:8080-2] ERROR com.appiancorp.ap2.util.Mail - Could not send mail via mail.office365.com:587 to

    08:06:20,723 INFO [stdout] (http-/0.0.0.0:8080-2) 2015-09-23 08:06:20,713 [http-/0.0.0.0:8080-2] ERROR com.appiancorp.process.runtime.activities.SendEmailActivity - com.sun.mail.smtp.SMTPSendFailedException: 501 5.1.7 Invalid address