Unless you are using the .NET framework you'll need an additional library of functions. Here's a free one
. I haven't tried it, so I can't recommend it personally, but you can find others via Google (try "C++ email").
Personally I would use the .NET framework which makes this sort of thing a breeze.