Reference Section 13:
Account Activation – Decode User PK & Activate the User | Expire Link
I am not receiving an account verification email.
```
```
urls.py
```
```
account_verification_mail.html
```
Hi Ejaz Ali Inayat,
Your email is not being sent to the user because there is a mistake in your code. You forgot to add the following line:
The send()
function is responsible for sending emails. If you don't use it, your email will not be sent. So, after this code:
Make sure to add:
I hope this resolves your issue. If you face any other issues, feel free to ask.

@mohaiminul-Islam Sir, I am now receiving the following error:
self.connection.starttls(keyfile=self.ssl_keyfile, certfile=self.ssl_certfile)
TypeError: SMTP.starttls() got an unexpected keyword argument 'keyfile'
Hi Ejaz Ali Inayat ,
Your issue is related to SMTP configuration. The SMTP service is encountering an unexpected argument named 'keyfile.' Please ensure that your SMTP settings are correct.
If you're still facing issues, please share:
- A screenshot of your SMTP configuration code.
- A screenshot of the error message.
- And your project's updated Git repository.
This will help in diagnosing and resolving the problem more effectively.

@mohaiminul-islam I have attached two screenshots and also updated the git repository.
A screenshot of your SMTP configuration code.
A screenshot of the error message.
updated Git repository.
https://github.com/webextolcollege/greatkart-djangoproject.git
Hi Ejaz Ali Inayat,
I have run your code on my system and replaced your SMTP configuration with mine. The code works properly. I suggest you create a new app password from your Google account, add it, and check again. It should work since it is working on my system. If you still face the issue after following these steps, let me know, and we will try to help you further.

@mohaiminul-islam Sir, on my system the issue remain the same "TypeError at /accounts/register/
SMTP.starttls() got an unexpected keyword argument 'keyfile'"
The same issue you're facing after providing the correct SMTP credentials could be another reason.However, I noticed in your earlier comment that you're using:
- Python 3.12.4
- Django 3.1
Django 3.1 is not officially compatible with Python 3.12. To resolve this, please upgrade your Django version and update your related packages. After doing so, test your project again.
To upgrade Django, run the following command:
Please let me know the results after following these steps.

Hi Ejaz Ali Inayat , This error occurs because SMTP server authentication is failing. You are using a Google App Password to send an email via Google's SMTP server, but the credentials are incorrect. This is the only reason for the error shown in the screenshot you provided.
Please check your credentials, and if the issue persists, try using a different email account. Verify the details and let me know if you need further assistance.
If you’re still facing the issue, please share your project zip file, including requirements.txt
and the database dump.
Follow these steps to generate the required files:
1. Create requirements.txt
Activate your virtual environment:
Then, generate the requirements.txt
file by running:
2. Create a Database Dump
Run the following command in your terminal to export your database:
3. Zip Your Project
Once you've generated requirements.txt
and backup.json
, zip your entire project folder along with these files.
After completing these steps, send us the zipped file . We will review it and try to fix your issue.

@mohaiminul-islam Sir, both files regarding SMTP server authentication are failing and are attached

Ejaz Ali Inayat , Please also attach the ZIP file of your whole project.

@mohaiminul-islam Sir, I have attached the zip file of project for your kind cooperation
Sir, I have shared the link to a zip file of my project. Now Sir, I need your kind cooperation
Why is your SMTP configuration password empty? I just tested your project using my credentials, and it is working properly.
Please share your Google App Password with us so we can identify the actual error. If you have concerns about sharing your current account credentials, you can use a different account and provide those credentials instead.
If you prefer not to share them publicly, please send them via email to mohaiminul.islam@appzoneit.com.
We will try to resolve your issue as soon as possible.