PromucFlow_constructor/app/server/appsmith-plugins
Nilansh Bansal 0eb5939cc9
fix: fixed smtp code to add starttls disabled if credentials are not provided (#40005)
## Background
[This PR](https://github.com/appsmithorg/appsmith/pull/37319) updated
the SMTP datasource in Appsmith to support configurations without
requiring a username and password. However, it inadvertently enforced
the `mail.smtp.starttls.enable` property even when credentials were not
provided. This led to an issue where STARTTLS was unnecessarily
enforced, causing problems for users configuring SMTP without
authentication, as detailed in [this
issue](https://github.com/appsmithorg/appsmith/issues/39965).


## Description
This PR resolves the issue by ensuring that the starttls and auth
properties are only set when a username and password are provided. This
change allows the SMTP datasource to function correctly without
authentication, aligning with user expectations and preventing
unnecessary STARTTLS enforcement.

Fixes #39965 

## Automation

/ok-to-test tags="@tag.Datasource"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/14192755822>
> Commit: 7334f48a5678490cb1468b4f6460546e7496a3cc
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=14192755822&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Datasource`
> Spec:
> <hr>Tue, 01 Apr 2025 10:42:30 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Bug Fixes**
- Improved the email configuration experience by ensuring that security
settings for authentication and encrypted connections are applied only
when valid credentials are provided, resulting in more reliable behavior
for both authenticated and non-authenticated email server setups.
- Enhanced validation in tests to confirm that session properties
reflect the correct settings based on authentication presence.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-01 16:49:14 +05:30
..
amazons3Plugin chore: Remove style from editor and setting config (#38756) 2025-01-23 13:29:03 +05:30
anthropicPlugin chore: Remove style from editor and setting config (#38756) 2025-01-23 13:29:03 +05:30
appsmithAiPlugin fix: rename the header from organizationId to tenantId (#39385) 2025-02-21 05:27:20 +05:30
arangoDBPlugin chore: Query Editor full width option (#37138) 2024-10-31 15:20:48 +05:30
awsLambdaPlugin fix: logger-not-working-in-plugins (#36231) 2024-09-17 10:47:58 +01:00
databricksPlugin chore: bump com.databricks:databricks-jdbc from 2.6.36 to 2.6.40 in /app/server/appsmith-plugins/databricksPlugin (#38245) 2025-02-10 13:49:57 +05:30
dynamoPlugin fix: connection pool config added for dynamoDB to avoid stale connections (#38940) 2025-02-25 22:03:11 +05:30
elasticSearchPlugin fix: logger-not-working-in-plugins (#36231) 2024-09-17 10:47:58 +01:00
firestorePlugin chore: Remove style from editor and setting config (#38756) 2025-01-23 13:29:03 +05:30
googleAiPlugin chore: Remove style from editor and setting config (#38756) 2025-01-23 13:29:03 +05:30
googleSheetsPlugin chore: added plugin tags (#39955) 2025-03-27 23:14:45 +05:30
graphqlPlugin chore: added plugin tags (#39955) 2025-03-27 23:14:45 +05:30
jsPlugin chore: Applied Spotless formatter (#25173) 2023-07-07 00:43:11 +05:30
mongoPlugin chore: added plugin tags (#39955) 2025-03-27 23:14:45 +05:30
mssqlPlugin chore: added plugin tags (#39955) 2025-03-27 23:14:45 +05:30
mysqlPlugin chore: added plugin tags (#39955) 2025-03-27 23:14:45 +05:30
openAiPlugin fix: Bugfix for validation of system messages in open ai vision command. (#39462) 2025-02-27 11:42:27 +05:30
oraclePlugin chore: Remove style from editor and setting config (#38756) 2025-01-23 13:29:03 +05:30
postgresPlugin chore: added plugin tags (#39955) 2025-03-27 23:14:45 +05:30
redisPlugin chore: Query Editor full width option (#37138) 2024-10-31 15:20:48 +05:30
redshiftPlugin chore: add spotless for sql files for postgres (#37016) 2024-11-09 11:21:30 +05:30
restApiPlugin chore: added plugin tags (#39955) 2025-03-27 23:14:45 +05:30
saasPlugin fix: logger-not-working-in-plugins (#36231) 2024-09-17 10:47:58 +01:00
smtpPlugin fix: fixed smtp code to add starttls disabled if credentials are not provided (#40005) 2025-04-01 16:49:14 +05:30
snowflakePlugin chore: bump net.snowflake:snowflake-jdbc from 3.20.0 to 3.22.0 in /app/server/appsmith-plugins/snowflakePlugin (#38998) 2025-02-10 13:06:04 +05:30
pom.xml chore: added comment to avoid merge conflicts (#38211) 2024-12-17 20:21:28 +05:30