Simple C email program ie the user information is sent to so

Simple C++ email program. (i.e the user information is sent to someones real email address)

Solution

SAMPLE Code:

#include <CkMailMan.h>
#include <CkEmail.h>

void EmailSample(void)
{

CkMailMan mail;

  
bool success = mail.UnlockComponent(\"30-day trial\");
if (success != true) {
std::cout << mail.lastErrorText() << \"\ \ \";
return;
}


mail.put_SmtpHost(\"smtp.soft.com\");


mail.put_SmtpUsername(\"myUsername\");
mail.put_SmtpPassword(\"myPassword\");


CkEmail email;

email.put_Subject(\"This is a test\");
email.put_Body(\"This is a test\");
email.put_From(\" Support <support@soft.com>\");
success = email.AddTo(\"Admin\",\"admin@soft.com\");
  
success = mail.SendEmail(email);
if (success != true) {
std::cout << mail.lastErrorText() << \"\ \ \";
return;
}


success = mail.CloseSmtpConnection();
if (success != true) {
std::cout << \"Connection to SMTP server not closed cleanly.\" << \"\ \ \";
}

std::cout << \"Mail Sent!\" << \"\ \ \";

}

Simple C++ email program. (i.e the user information is sent to someones real email address)SolutionSAMPLE Code: #include <CkMailMan.h> #include <CkEmai

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site