Gmail launched in 2004.
The Patriot act was signed in to law in October 2001.
Bill Binney blew the whistle on illegal NSA mass data collection of email, web browsing, and cell phone records in 2002.
Hard to pinpoint when smartphones became mainstream, though as a point of reference the iPhone was launched in 2007.
So clearly the NSA was trying to do dragnet surveillance of the internet well before gmail or the widespread use of smartphones.
A quote from the Bill Binney wikipedia page: "Binney has also been publicly critical of the NSA for spying on U.S. citizens, saying of its expanded surveillance after the September 11, 2001 attacks that 'it's better than anything that the KGB, the Stasi, or the Gestapo and SS ever had'"
https://en.wikipedia.org/wiki/Gmail
https://en.wikipedia.org/wiki/Patriot_Act
https://en.wikipedia.org/wiki/William_Binney_(intelligence_o...