Skip to content

Conversation

@Harshbansal8705
Copy link
Contributor

@Harshbansal8705 Harshbansal8705 commented Nov 21, 2025

Description

Refactor the SMTP credentials to support SMTP hosts other than Gmail, like AWS SES.

Type of change

  • New feature (non-breaking change which adds functionality)

@dhanvithnayak
Copy link
Collaborator

Thanks for the PRs
Have you tested these changes?

@Harshbansal8705
Copy link
Contributor Author

Harshbansal8705 commented Nov 23, 2025

Yes, I've setup MFTP with AWS SES with these changes only, and it's working fine.

Copy link
Member

@proffapt proffapt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't change previous variables, only configure the variable which you are adding now

@Harshbansal8705 Harshbansal8705 force-pushed the feat/email-smtp-refactor branch from 927fd9c to 19df025 Compare November 24, 2025 08:01
@Harshbansal8705
Copy link
Contributor Author

Harshbansal8705 commented Nov 24, 2025

Got it! I've updated it.

Comment on lines 49 to +52
FROM_EMAIL = "[email protected]" # Notification Sender Email-id
FROM_EMAIL_PASS = "**********" # App password for the above email-id
# SMTP Credentials
SMTP_HOST = "smtp.gmail.com"
FROM_EMAIL_USER = "xxxxxxxxxxxxxxxxxxxx" # Same as FROM_EMAIL in case of Gmail SMTP
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep a single env instead of duplicated ones.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FROM_EMAIL_USER is same as FROM_EMAIL in case of Gmail SMTP only. For AWS SES, we have a different SMTP Username, which is why I've kept it different.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can remove one of them as it is redundant

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

user provides the smtp host and for any host they will need to give username and password

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants