Best SMTP-based multi-login contact form for your website – with OTP security and flexible login options!
- Description
- Features
- Installation
- Configuration
- Usage
- Screenshot
- Contributing
- Donation
- Contact
- License
- Copyright
AdvancedContactFormPy is a powerful and user-friendly SMTP-based contact form solution for websites. It allows site visitors to reach the website owner through multiple login options: Google, Discord, or manual email login.
To reduce spam, OTP verification also included in the form. For manual email logins, access can be restricted to specific email domains.
Each submission generates a unique form ID, making it easy to track conversations. The website owner can reply directly via email and has the flexibility to enable or disable any of the login methods as needed.
- SMTP-based email sending
- Multiple authentication methods:
- Google Login
- Discord Login
- Manual email login (with domain restriction option)
- OTP verification for increased security and spam prevention
- Unique contact form ID per submission
- HTML-based emails
- User-friendly interface
- Owner can reply directly from mail
- Enable/disable login methods with environment variables
- Flexible domain restriction for manual email login
-
Clone the repository
git clone https://github.com/abilash-dev/AdvancedContactFormPy.git cd AdvancedContactFormPy -
Set up the
.envfileCopy the below template and fill it with your credentials:
discord_bot_client_id = "" # DISCORD BOT CLIENT ID/BOT ID/DEVELOPER ID discord_bot_client_secret = "" # DISCORD BOT CLIENT SECRET discord_redirect_uri = "<domain/localhost>/callback" # ADD THE REDIRECT URI IN DEVELOPER PORTAL # https://discord.com/developers/applications/1084622004801503344/oauth2 google_client_id = "<client_id>.apps.googleusercontent.com" # COPY PASTE THE CLIENT ID # https://console.cloud.google.com/apis/credentials smtp_server = "smtp.<mail_server>" # SMTP SERVER smtp_port = 587 # SMTP PORT no_reply_mail = "" # MAIL ID TO SEND OTP no_reply_mail_psw = "" # MAIL PASSWORD OF no_reply_mail contact_mail = "" # MAIL ID TO SEND FINAL CONTACT FORM contact_mail_psw = "" # MAIL PASSWORD OF contact_mail app_secret_key = "" # APP SECRET FOR YOUR FLASK WEB APP manual_mail_allowed_domains = [] # FORMAT - ["@gmail.com","@abilash.link"] # Leave empty ([]) to allow all domains manual_mail_enabled = "True" # True/False google_login_enabled = "True" # True/False discord_login_enabled = "True" # True/False # At least one login method must be enabled
Fill all fields and save the file as
.envin the project root. -
Install the dependencies
pip install -r requirements.txt
-
Run the application
python app.py
⚠️ Requires Python 3.11+
All configuration is handled via the .env file as described above.
After running app.py, access your contact form at:
http://<your-domain-or-localhost>/contact
Visitors can contact you via Google, Discord, or manual email login (based on your enabled settings). Each submission is verified via OTP and delivered to your configured contact email.
We welcome and encourage contributions!
If you want to help improve this project:
- Fork the repository.
- Clone your fork.
- Create a new branch for your feature or fix.
- Make your changes and commit.
- Push your branch to your fork.
- Open a Pull Request describing your changes.
Star ⭐ the project if you like it!
If you found this project useful and want to support development, feel free to donate.
- LTC (LTC Network): LVViYLmm2yayhYC82HTLHgiLmFM55CkVsj
- BTC/ETH/SOL (BEP20): 0xdd13b3d0e6ea8760afcbd137a5cc02f5d353c584
- Binance ID: 496966292
Contact Abilash for more payment methods.
- Author: Abilash
- Website: abilash.link
- Email: contact@abilash.link
This project is licensed under the MIT License.
© 2026 abilash-dev
.png)