The most simple way to describe this: Python Email Confirmation Link Scraper.
So the idea is to use this if you want to register an account with a bot and you need to confirm an email without any UI. This is very simple and should maybe only be used if you're a beginner or you just want something simple. There is only one function. Anyway here's how to use it:
The only package you need to install is urlextract.
pip install urlextract
Just download the mailbot.py file and put it in your own project folder. This is a direct link
Import it:
from mailbot import connectAndGetLinks
Use it somewhere
connectAndGetLinks(mailserver, emailuser, emailpassword, refresh interval)
It will return an array of links found in the newest email. It might take a while (so dont worry), but it's the fastest way to do this™.
all_urls = connectAndGetLinks('example.mailserver.com','[email protected]','password123', 5)
confirmation_url = all_urls[6]
print("You need to go to",confirmation_url,"to confirm your account!")
Please contribute and help me make this better. It's a not-so-well documented subject and it took me a while to figure it out how to do it. It's guaranteed to have bugs so be carefull.