Google’s email service Gmail was hit by a phishing scam last month and millions of accounts were infected by the breach and the company has been increasing Gmail’s security ever since. On Wednesday, the company added new machine learning based security features to shield users from spam and phishing emails

“Machine learning helps Gmail block sneaky spam and phishing messages from showing up in your inbox with over 99.9 percent accuracy. This is huge, given that 50-70 percent of messages that Gmail receives are spam,” Andy Wen, senior product manager, counter abuse technology, Google said in the press release.

While the company hasn’t whether the move has come after last month’s Google Docs’ based attack, it surely seems so.

Read: Google Releases Statement On Phishing Scam, Adds Security To Gmail Android App

The company says that it is implanting a model that selectively delays emails by around 0.05 seconds on average for rigorous phishing analysis and to protect user data. It then uses this data with Google Safe Browsing machine learning tools to find and flag phishy and suspicious URLs, limiting their impact across domains. The system then automatically generates click-time warnings, which prompts to help users keep their accounts safe. It also allows users to report if a website has been flagged wrongly.

The machine learning-based system adapts much quicker than the manual models the company used in the past.

The company has also introduced a new employee-based warning system for enterprises. It warns users if an email has been sent from outside of the company’s domain and from an unfamiliar contact. The feature acts to mainly protect enterprises against forged email and impersonation and incorrectly sent emails.

Such emails are the easiest and most common ways to initiate cyber attacks and cyber scams — the present a formal looking email from Google or other services you might be using and trick you into putting in your information, which gives them access to all your emails and attached apps. The same trick was used in the hack of Democratic National Committee Chairman John Podesta’s emails last year, which led to the leaking of presidential candidate Hillary Clinton’s emails to him.

This is why Google keeps the feature on by default now.

Read: Apple Store Fails To Protect Gmail, Banking Passwords Thanks To Flaw In 'Sandbox' Security

Google also prompts enterprise users if they are sending an email to an email address to someone outside their company domain. It also uses contextual intelligence to avoid displaying unnecessary warnings and also allows the user to ignore the warning, if the email is intended to be sent to such an email address. The feature is on by default if you are using Gmail for enterprise, but you can turn it off by navigating to the admin console control in Gmail Setting > Advanced.

Apart from this, Gmail will now have built-in defenses against ransomware and malware. It will use machine learning to protect users against harmful emails. Google now classifies spam, malware and ransomware by identifying sender signatures and signals to root out prospective threats.