-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SMTP email to the user ID #35
Comments
Tested code to be integrated with project filesimport smtplib, random, string
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
toaddrs = input("Enter your email ID: ")
fromaddr = '[email protected]'
x = ''.join(random.choices(string.ascii_letters + string.digits, k=12))
message = MIMEMultipart("alternative")
message["Subject"] = "Forgot Password | MedFixture"
message["From"] = fromaddr
message["To"] = toaddrs
html = """\
<html>
<body>
<h1>Hi! Seems like you forgot you password. </h1>
<p>Your verification code is <b>"""+ x +"""</b></p>
</body>
</html>
"""
part1 = MIMEText(html, "html")
message.attach(part1)
username = fromaddr
password = 'paswd'
try:
server = smtplib.SMTP('smtp.gmail.com:587')
server.ehlo()
server.starttls()
server.login(username,password)
server.sendmail(fromaddr, toaddrs, message.as_string())
except Exception as e:
print(e)
finally:
server.quit()
in_code = input("Enter the verification code: ")
if in_code == x:
print("Verification successful")
else:
print("Enter correct verification code") |
Gmail doesn't render |
This issue is an extension of issue #26 addressing password recovery system using email verification. |
* Added Travis CI config file * Configured files for Travis build tests * Changed Travis config for build test * Added PIL install to Travis * Update README.md * Update README.md * Update README.md * Create pythonapp.yml * Delete pythonapp.yml * Update README.md * Linking windows to the master file * Minor UI Adjustments * Added dropdown menu to form & UI changes * Minor UI adjustments * Change in UX and window resize * Minor change to window * Added new delete window * Linked delete.py to the master.py * Update README.md * Update README.md * Added the screenshots for documentation * Fixed minor UI issue * Binding submit button to return key * Replaced SS after minor UI changes * Replaced SS after minor UI fixing * Deleting old SS * Added new screenshots * Update README.md * Update the documentation * Update README.md Added about the project and features to the documentation * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Set theme jekyll-theme-hacker * Enable download buttons * Add jemoji plugin for inline emojis * Added code for #35 * Delete SMTP-test.py * New test code #35 * Added CSS with HTML email * Update the email * Delete SMTP-test.py * Added HTML code for email * Added password recovery using reg email ID * Update DB schema * Added new screenshots * Minor bug fix and button disabling added
Add new user registration to the application and forget password system
The text was updated successfully, but these errors were encountered: