I'm currently a CS student, I'd argue that 2/3 of my class -- of not more! -- would need way more than two hours to accomplish the same 10 lines of code.
There exists a type of CS student that doesn't really seem to enjoy programming all that much -- if at all. They do the minimum required to nail that passing grade, and then never type another line until the next assignment. Thus, when they actually need to pull on some of those tools (like sending some mail), they aren't there.
Not that this guy is one of those, but I'm just saying, they exist, and in alarming numbers.