Built a tool to auto-reply to emails. Now I reply to spam faster than real people.
Built a tool to auto reply to emails. Now I reply to spam faster than real people. Was getting 30 cold emails a day minimum. Recruiters, sales pitches, people asking if I want to buy their course. ...

Source: DEV Community
Built a tool to auto reply to emails. Now I reply to spam faster than real people. Was getting 30 cold emails a day minimum. Recruiters, sales pitches, people asking if I want to buy their course. Started replying manually with "not interested" but that ate 20 minutes every morning. Thought hey I can automate this. Version 1 was embarrassingly simple Wrote a Python script that checked my Gmail every 5 minutes and sent "Thanks but not interested" to anything with keywords like "opportunity" or "partnership" in the subject. import imaplib import smtplib from email.mime.text import MIMEText imap = imaplib.IMAP4_SSL('imap.gmail.com') imap.login('[email protected]', 'password') imap.select('INBOX') status, messages = imap.search(None, 'UNSEEN SUBJECT "opportunity"') for num in messages[0].split(): msg = MIMEText('Thanks but not interested') msg['Subject'] = 'Re: ...' smtp = smtplib.SMTP('smtp.gmail.com', 587) smtp.sendmail('[email protected]', sender, msg.as_string()) Ran for 2 days. Then I auto