I fought with this for a long time. I finally stumbled on the solution -
You must go to the Google > My Account > Sign-in and Security page. Scroll down that page and you will see "Connected apps & sites" section. You will find "Allow less secure apps:" - change that to "ON". This Google setting is "OFF" by default.
Then your cam will work with the settings given in the previous post.
It's really nice to see the "[NOTIFICATION]The Result of Server Test of Your IP Camera" in your inbox when you get it all sorted out!
And FWIW, Yahoo! mail does not work with my DCS-2230 cam. I'm thinking it's something related to security settings like above, however I have not been able to get it to work.
I hope this helps someone avoid the pain I went through...