{"id":22443,"library":"temp-mails","title":"temp-mails","description":"A basic wrapper around various temp mail sites (mail.tm, guerrillamail, etc.) providing a unified API. Current version 2.2.0, requires Python >=3.8. Active development with regular releases.","status":"active","version":"2.2.0","language":"python","source_language":"en","source_url":"https://github.com/bertigert/temp-mails","tags":["temp-mail","email","disposable","wrapper"],"install":[{"cmd":"pip install temp-mails","lang":"bash","label":"Install via pip"}],"dependencies":[],"imports":[{"note":"Wrong package name; correct is 'tempmail' not 'temp_mails'.","wrong":"from temp_mails import Mail","symbol":"Mail","correct":"from tempmail import Mail"},{"note":"Direct import of address class.","symbol":"MailTMAddress","correct":"from tempmail import MailTMAddress"}],"quickstart":{"code":"from tempmail import Mail\n\nmail = Mail()\nprint(mail.address)\n\n# Wait for email\nemail = mail.wait_for_email(timeout=30)\nif email:\n    print(email.subject)","lang":"python","description":"Create a temporary email, display address, and wait for an incoming email."},"warnings":[{"fix":"Use 'from tempmail import ...'.","message":"The package name on PyPI is 'temp-mails' but the import uses 'tempmail'. Many users mistakenly import 'temp_mails' or 'temp-mails'.","severity":"gotcha","affected_versions":"all"},{"fix":"Update code to use new API: from tempmail import Mail; mail = Mail(); mail.wait_for_email()","message":"In version 2.x, the API changed significantly from 1.x. The main class is now 'Mail' instead of 'TempMail', and methods like 'wait_for_email' replaced 'get_inbox'.","severity":"breaking","affected_versions":"2.0+"},{"fix":"Use mail.wait_for_email(timeout=30) instead of no timeout.","message":"The 'wait_for_email' method can hang indefinitely if timeout not set. Always provide a timeout parameter.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Change import to: from tempmail import Mail","cause":"Import path is 'tempmail', not 'temp_mails'.","error":"ModuleNotFoundError: No module named 'temp_mails'"},{"fix":"Use: from tempmail import Mail","cause":"Class renamed from TempMail to Mail in v2.","error":"ImportError: cannot import name 'TempMail' from 'tempmail'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}