25 int main(
int argc,
char *argv[]){
38 mail->
header_add(
"Subject",
"Test email (SMTPMail)");
39 mail->
mail(
"Email sent using CPP SMTPMail class");
43 errx(1,
"Failed to send email: %s\n", sme.
what());
void auth(enum smtp_authentication_method auth_method, const char *const user, const char *const pass)
void address_add(enum smtp_address_type type, const char *const email, const char *const name)
void open(const char *const server, const char *const port, enum smtp_connection_security connection_security, enum smtp_flag flags, const char *const cafile)
virtual const char *const what()
int main(int argc, char *argv[])
void mail(const char *const body)
SMTPMail class wrapper for smtp-client library.
void header_add(const char *const key, const char *const value)