Email service settings does not work

Hello guys,

I enabled the email service via : Email | Appsmith

My email service has two nodes that one for recieving(imap..com:993) and the other for sending(smtp..com:465).

But it doesn’t work whatever use recieving node(imap..com:993) or sending node(smtp..com:465) that always show tip with “You haven’t setup any email service yet. Please configure your email service to receive a reset link”.

I get the error log of “org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.MessagingException: Got bad greeting from SMTP host: smtp.***.com, port: 465, response: [EOF]” when I use sending node.

The following code are my env varialbes:

  • name: APPSMITH_MAIL_ENABLED
    value: “true”
  • name: APPSMITH_MAIL_FROM
    value: ***
  • name: APPSMITH_REPLY_TO
    value: ***
  • name: APPSMITH_MAIL_HOST
    value: smtp.***.com
  • name: APPSMITH_MAIL_PORT
    value: “465”
  • name: APPSMITH_MAIL_SMTP_TLS_ENABLED
    value: “true”
  • name: APPSMITH_MAIL_SMTP_AUTH
    value: “true”
  • name: APPSMITH_MAIL_USERNAME
    value: ***
  • name: APPSMITH_MAIL_PASSWORD
    value: ***

Anyone has an idea with it?
Thanks in advances.

Can you try the port 587 once?

The port is correct.
Because I set all of the recieving service (imap..com:993) and the sending service (smtp. .com:465) that it worked on my email client.
My issue is in Appsmith it only has one service to set.

Please share some more logs, to investigate the issue. You can grab the logs by running docker logs -f appsmith.
Or you could follow the steps from this guide on how to get the logs

I did it again but not get any errors and only tip with "You haven’t setup any email service yet. Please configure your email service to receive a reset link”.
I will show you the logs when some errors happending.

Here is my error log file in Appsmith server:

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/server.jar!/BOOT-INF/lib/logback-classic-1.2.11.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/server.jar!/BOOT-INF/lib/slf4j-reload4j-1.7.36.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
[2023-01-04 10:14:33,220]  - Starting ServerApplication vv1.8.11 using Java 11.0.10 on brick-bi-server-0 with PID 1 (/server.jar started by root in /)
[2023-01-04 10:14:33,224]  - Running with Spring Boot v2.6.5, Spring v5.3.17
[2023-01-04 10:14:33,225]  - No active profile set, falling back to 1 default profile: "default"
[2023-01-04 10:14:35,123]  - Multiple Spring Data modules found, entering strict repository configuration mode!
[2023-01-04 10:14:35,123]  - Bootstrapping Spring Data Reactive MongoDB repositories in DEFAULT mode.
[2023-01-04 10:14:35,557]  - Finished Spring Data repository scanning in 427 ms. Found 55 Reactive MongoDB repository interfaces.
[2023-01-04 10:14:36,644]  - Multiple Spring Data modules found, entering strict repository configuration mode!
[2023-01-04 10:14:36,645]  - Bootstrapping Spring Data Redis repositories in DEFAULT mode.
[2023-01-04 10:14:36,725]  - Spring Data Redis - Could not safely identify store assignment for repository candidate interface com.appsmith.server.repositories.ApplicationRepository. If you want this repository to be a Redis repository, consider annotating your entities with one of these annotations: org.springframework.data.redis.core.RedisHash (preferred), or consider extending one of the following types with your repository: org.springframework.data.keyvalue.repository.KeyValueRepository.
[2023-01-04 10:14:36,745]  - Spring Data Redis - Could not safely identify store assignment for repository candidate interface com.appsmith.server.repositories.PermissionGroupRepository. If you want this repository to be a Redis repository, consider annotating your entities with one of these annotations: org.springframework.data.redis.core.RedisHash (preferred), or consider extending one of the following types with your repository: org.springframework.data.keyvalue.repository.KeyValueRepository.
[2023-01-04 10:14:36,745]  - Spring Data Redis - Could not safely identify store assignment for repository candidate interface com.appsmith.server.repositories.PasswordResetTokenRepository. If you want this repository to be a Redis repository, consider annotating your entities with one of these annotations: org.springframework.data.redis.core.RedisHash (preferred), or consider extending one of the following types with your repository: org.springframework.data.keyvalue.repository.KeyValueRepository.
[2023-01-04 10:14:36,745]  - Spring Data Redis - Could not safely identify store assignment for repository candidate interface com.appsmith.server.repositories.GitDeployKeysRepository. If you want this repository to be a Redis repository, consider annotating your entities with one of these annotations: org.springframework.data.redis.core.RedisHash (preferred), or consider extending one of the following types with your repository: org.springframework.data.keyvalue.repository.KeyValueRepository.
[2023-01-04 10:14:36,746]  - Spring Data Redis - Could not safely identify store assignment for repository candidate interface com.appsmith.server.repositories.ProviderRepository. If you want this repository to be a Redis repository, consider annotating your entities with one of these annotations: org.springframework.data.redis.core.RedisHash (preferred), or consider extending one of the following types with your repository: org.springframework.data.keyvalue.repository.KeyValueRepository.
[2023-01-04 10:14:36,746]  - Spring Data Redis - Could not safely identify store assignment for repository candidate interface com.appsmith.server.repositories.ConfigRepository. If you want this repository to be a Redis repository, consider annotating your entities with one of these annotations: org.springframework.data.redis.core.RedisHash (preferred), or consider extending one of the following types with your repository: org.springframework.data.keyvalue.repository.KeyValueRepository.
[2023-01-04 10:14:36,746]  - Spring Data Redis - Could not safely identify store assignment for repository candidate interface com.appsmith.server.repositories.UserDataRepository. If you want this repository to be a Redis repository, consider annotating your entities with one of these annotations: org.springframework.data.redis.core.RedisHash (preferred), or consider extending one of the following types with your repository: org.springframework.data.keyvalue.repository.KeyValueRepository.
[2023-01-04 10:14:36,746]  - Finished Spring Data repository scanning in 92 ms. Found 0 Redis repository interfaces.
[2023-01-04 10:14:37,268]  - Bean 'org.springframework.security.config.annotation.method.configuration.ReactiveMethodSecurityConfiguration' of type [org.springframework.security.config.annotation.method.configuration.ReactiveMethodSecurityConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
[2023-01-04 10:14:39,380]  - Cluster created with settings {hosts=[116.*.*.135:27017], mode=SINGLE, requiredClusterType=UNKNOWN, serverSelectionTimeout='30000 ms'}
[2023-01-04 10:14:39,690]  - Opened connection [connectionId{localValue:2, serverValue:299}] to 116.*.*.135:27017
[2023-01-04 10:14:39,690]  - Opened connection [connectionId{localValue:1, serverValue:298}] to 116.*.*.135:27017
[2023-01-04 10:14:39,691]  - Monitor thread successfully connected to server with description ServerDescription{address=116.*.*.135:27017, type=STANDALONE, state=CONNECTED, ok=true, minWireVersion=0, maxWireVersion=9, maxDocumentSize=16777216, logicalSessionTimeoutMinutes=30, roundTripTimeNanos=105419466}
[2023-01-04 10:14:42,362]  - Enabled plugins: []
[2023-01-04 10:14:42,364]  - Disabled plugins: []
[2023-01-04 10:14:42,371]  - PF4J version 3.5.0 in 'deployment' mode
[2023-01-04 10:14:42,582]  - Plugin 'postgres-plugin@1.0-SNAPSHOT' resolved
[2023-01-04 10:14:42,582]  - Plugin 'saas-plugin@1.0-SNAPSHOT' resolved
[2023-01-04 10:14:42,582]  - Plugin 'snowflake-plugin@1.0-SNAPSHOT' resolved
[2023-01-04 10:14:42,582]  - Plugin 'elasticsearch-plugin@1.0-SNAPSHOT' resolved
[2023-01-04 10:14:42,583]  - Plugin 'redshift-plugin@1.0-SNAPSHOT' resolved
[2023-01-04 10:14:42,583]  - Plugin 'mssql-plugin@1.0-SNAPSHOT' resolved
[2023-01-04 10:14:42,583]  - Plugin 'google-sheets-plugin@1.0-SNAPSHOT' resolved
[2023-01-04 10:14:42,583]  - Plugin 'mongo-plugin@1.0-SNAPSHOT' resolved
[2023-01-04 10:14:42,583]  - Plugin 'graphql-plugin@1.0-SNAPSHOT' resolved
[2023-01-04 10:14:42,583]  - Plugin 'js-plugin@1.0-SNAPSHOT' resolved
[2023-01-04 10:14:42,583]  - Plugin 'smtp-plugin@1.0-SNAPSHOT' resolved
[2023-01-04 10:14:42,583]  - Plugin 'amazons3-plugin@1.0-SNAPSHOT' resolved
[2023-01-04 10:14:42,583]  - Plugin 'mysql-plugin@1.0-SNAPSHOT' resolved
[2023-01-04 10:14:42,583]  - Plugin 'dynamo-plugin@1.0-SNAPSHOT' resolved
[2023-01-04 10:14:42,583]  - Plugin 'arangodb-plugin@1.0-SNAPSHOT' resolved
[2023-01-04 10:14:42,583]  - Plugin 'restapi-plugin@1.0-SNAPSHOT' resolved
[2023-01-04 10:14:42,583]  - Plugin 'redis-plugin@1.0-SNAPSHOT' resolved
[2023-01-04 10:14:42,583]  - Plugin 'firestore-plugin@1.0-SNAPSHOT' resolved
[2023-01-04 10:14:42,583]  - Start plugin 'postgres-plugin@1.0-SNAPSHOT'
[2023-01-04 10:14:42,588]  - Start plugin 'saas-plugin@1.0-SNAPSHOT'
[2023-01-04 10:14:42,589]  - Start plugin 'snowflake-plugin@1.0-SNAPSHOT'
[2023-01-04 10:14:42,596]  - Start plugin 'elasticsearch-plugin@1.0-SNAPSHOT'
[2023-01-04 10:14:42,597]  - Start plugin 'redshift-plugin@1.0-SNAPSHOT'
[2023-01-04 10:14:42,598]  - Start plugin 'mssql-plugin@1.0-SNAPSHOT'
[2023-01-04 10:14:42,600]  - Start plugin 'google-sheets-plugin@1.0-SNAPSHOT'
[2023-01-04 10:14:42,656]  - Start plugin 'mongo-plugin@1.0-SNAPSHOT'
[2023-01-04 10:14:42,659]  - Start plugin 'graphql-plugin@1.0-SNAPSHOT'
[2023-01-04 10:14:42,660]  - Start plugin 'js-plugin@1.0-SNAPSHOT'
[2023-01-04 10:14:42,661]  - Start plugin 'smtp-plugin@1.0-SNAPSHOT'
[2023-01-04 10:14:42,662]  - Start plugin 'amazons3-plugin@1.0-SNAPSHOT'
[2023-01-04 10:14:42,664]  - Start plugin 'mysql-plugin@1.0-SNAPSHOT'
[2023-01-04 10:14:42,667]  - Start plugin 'dynamo-plugin@1.0-SNAPSHOT'
[2023-01-04 10:14:42,671]  - Start plugin 'arangodb-plugin@1.0-SNAPSHOT'
[2023-01-04 10:14:42,672]  - Start plugin 'restapi-plugin@1.0-SNAPSHOT'
[2023-01-04 10:14:42,673]  - Start plugin 'redis-plugin@1.0-SNAPSHOT'
[2023-01-04 10:14:42,673]  - Start plugin 'firestore-plugin@1.0-SNAPSHOT'
[2023-01-04 10:14:45,601]  - Cluster created with settings {hosts=[116.*.*.135:27017], mode=SINGLE, requiredClusterType=UNKNOWN, serverSelectionTimeout='30000 ms'}
[2023-01-04 10:14:45,689]  - Opened connection [connectionId{localValue:3, serverValue:300}] to 116.*.*.135:27017
[2023-01-04 10:14:57,261]  - Mongock releasing the lock
[2023-01-04 10:14:57,295]  - Mongock released the lock
[2023-01-04 10:14:57,296]  - Mongock has finished
[2023-01-04 10:14:59,543]  - Exposing 1 endpoint(s) beneath base path '/actuator'
[2023-01-04 10:15:02,058]  - Netty started on port 8080
[2023-01-04 10:15:02,092]  - Started ServerApplication in 31.11 seconds (JVM running for 31.664)
[2023-01-04 10:15:02,117]  - Triggering registration of this instance...
[2023-01-04 10:15:02,119]  - Performing RTS health check of this instance...
[2023-01-04 10:15:02,303]  - Opened connection [connectionId{localValue:6, serverValue:303}] to 116.*.*.135:27017
[2023-01-04 10:15:02,448]  - RTS health check failed with error: 
finishConnect(..) failed: Connection refused: /127.0.0.1:8091; nested exception is io.netty.channel.AbstractChannel$AnnotatedConnectException: finishConnect(..) failed: Connection refused: /127.0.0.1:8091
[2023-01-04 10:15:02,448]  - finishConnect(..) failed: Connection refused: /127.0.0.1:8091; nested exception is io.netty.channel.AbstractChannel$AnnotatedConnectException: finishConnect(..) failed: Connection refused: /127.0.0.1:8091

 █████╗ ██████╗ ██████╗ ███████╗███╗   ███╗██╗████████╗██╗  ██╗    ██╗███████╗    ██████╗ ██╗   ██╗███╗   ██╗███╗   ██╗██╗███╗   ██╗ ██████╗ ██╗
██╔══██╗██╔══██╗██╔══██╗██╔════╝████╗ ████║██║╚══██╔══╝██║  ██║    ██║██╔════╝    ██╔══██╗██║   ██║████╗  ██║████╗  ██║██║████╗  ██║██╔════╝ ██║
███████║██████╔╝██████╔╝███████╗██╔████╔██║██║   ██║   ███████║    ██║███████╗    ██████╔╝██║   ██║██╔██╗ ██║██╔██╗ ██║██║██╔██╗ ██║██║  ███╗██║
██╔══██║██╔═══╝ ██╔═══╝ ╚════██║██║╚██╔╝██║██║   ██║   ██╔══██║    ██║╚════██║    ██╔══██╗██║   ██║██║╚██╗██║██║╚██╗██║██║██║╚██╗██║██║   ██║╚═╝
██║  ██║██║     ██║     ███████║██║ ╚═╝ ██║██║   ██║   ██║  ██║    ██║███████║    ██║  ██║╚██████╔╝██║ ╚████║██║ ╚████║██║██║ ╚████║╚██████╔╝██╗
╚═╝  ╚═╝╚═╝     ╚═╝     ╚══════╝╚═╝     ╚═╝╚═╝   ╚═╝   ╚═╝  ╚═╝    ╚═╝╚══════╝    ╚═╝  ╚═╝ ╚═════╝ ╚═╝  ╚═══╝╚═╝  ╚═══╝╚═╝╚═╝  ╚═══╝ ╚═════╝ ╚═╝

Please open http://localhost:<port> in your browser to experience Appsmith!

[2023-01-04 10:15:19,834]  - Opened connection [connectionId{localValue:8, serverValue:304}] to 116.*.*.135:27017
[2023-01-04 10:15:19,834]  - Opened connection [connectionId{localValue:7, serverValue:305}] to 116.*.*.135:27017
[2023-01-05 06:50:48,326] userEmail=anonymousUser, sessionId=718eb896-6ec3-40ca-a562-7e7c74d856fa, thread=nioEventLoopGroup-3-9, requestId=99c68805ccd4361dd1aad336a028ef31 - Password reset Token: e65ee23c-feb4-45fd-8434-ad65f036a661 for email: *@*.com
[2023-01-05 06:50:48,339] userEmail=anonymousUser, sessionId=718eb896-6ec3-40ca-a562-7e7c74d856fa, thread=nioEventLoopGroup-3-9, requestId=99c68805ccd4361dd1aad336a028ef31 - Password reset url for email: *@*.com: https://host.domain/user/resetPassword?token=1c1ad29589fdbb335c33e03917bba2398c181d6eaacce70cfaef0582558acd9f60beb41f1f73fe8549456eb7bc8678a2657e9b0d338361b5323386cfcae4e87b689564bf1dbece6b4f3efb0bfc184e92
[2023-01-05 06:50:48,375]  - Got request to send email to: *@*.com with subject: Appsmith Password Reset
[2023-01-05 06:50:48,384]  - Going to send email to *@*.com with subject Appsmith Password Reset
[2023-01-05 06:52:48,477]  - Unable to send email. Cause: 
org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.MessagingException: Got bad greeting from SMTP host: smtp.*.*.com, port: 465, response: [EOF]. Failed messages: javax.mail.MessagingException: Got bad greeting from SMTP host: smtp.*.*.com, port: 465, response: [EOF]
	at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:448)
	at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:361)
	at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:356)
	at com.appsmith.server.notifications.EmailSender.sendMailSync(EmailSender.java:107)
	at com.appsmith.server.notifications.EmailSender.lambda$sendMail$1(EmailSender.java:62)
	at reactor.core.publisher.FluxPeekFuseable$PeekFuseableSubscriber.onNext(FluxPeekFuseable.java:196)
	at com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onNext(MDCConfig.java:53)
	at reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onNext(FluxHide.java:137)
	at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1816)
	at reactor.core.publisher.MonoCallable.subscribe(MonoCallable.java:62)
	at reactor.core.publisher.Mono.subscribe(Mono.java:4400)
	at reactor.core.publisher.MonoSubscribeOn$SubscribeOnSubscriber.run(MonoSubscribeOn.java:126)
	at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:84)
	at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:37)
	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)
Caused by: javax.mail.MessagingException: Got bad greeting from SMTP host: smtp.*.*.com, port: 465, response: [EOF]
	at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2198)
	at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:722)
	at javax.mail.Service.connect(Service.java:342)
	at org.springframework.mail.javamail.JavaMailSenderImpl.connectTransport(JavaMailSenderImpl.java:518)
	at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:437)
	... 18 common frames omitted

Thanks, I’ll ask our team to investigate.

OK, thanks. Hope to see you soon.

Hey Frank!

Can you try using TLS and port 587?

I had set the env variable with “APPSMITH_MAIL_SMTP_TLS_ENABLED=true” and the email server enabled TLS.
I confirm that the email server enabled ports on (imap..com:993) and (smtp. .com:465).
The 25 or 587 is the default port.

Frank, could you please let us know which email service are you trying to configure? Is it Gmail?

Of course. Here you are.

Hello guys, is anybody there?

Hi Frank! Sorry for the delays. I have checked with the team, and as of today, we don’t support sending emails using SSL. You will need to use TLS, but it seems your email provider does not have TLS support.
We have created this feature request: [Feature]: Support SSL connections for sending email · Issue #19690 · appsmithorg/appsmith · GitHub
You either need to configure a different email service that supports TLS or wait for this feature to go live.
I apologize for the inconvenience.

I see, thank you so much!