im not sure how to go about this i feel awful asking for code but could i see it i want to learn from it and make my own code.I want one that sends an email that says test or gets user input.
You're better off starting with basic network programming using sockets, then worrying about its applications. Have you actually done any before, or are you just jumping to email? If not, get a networking library. SFML and Boost have their own networking sections, or you could just use some platform specific library like WinSock. A quick Google search on any of these will yield useful results.