A basic internet search reveals the following:
- C++ SMTP example
- VMime a C++ Mail library
- libsmtp a C library to send mail via smtp
In short if you have a gmail or yahoo account you can use their SMTP server to send messages using either of the three links above to assist you in using SMTP.