I am new to VC++ and programming.
I have to write code to send a email in VC++.
How do I go about it? Please help!!
Here's how I do it with the ATL classes. I think you need one of the paid versions of VC++ to get ATL. You will need the name of your email server.
CSMTPConnection smtp;
if (!smtp.Connect(m_strEmailServer))
return false;
// start generating the email message; remember to call CoInitialize somewhere in the app before this
CMimeMessage msg;
msg.SetSubject(m_strSubject);
msg.SetSender(m_strSender);
// repeat the following as necessary
msg.AddRecipient(strSingleRecipient);
msg.AddText(m_strBody);
if (!smtp.SendMessage(msg))
return false;
return true;