cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
UNIX/Linux Programming
Sending mail using jwsmtp
Sending mail using jwsmtp
Jun 22, 2010 at 10:00am UTC
shiny288
(2)
Hi Guys,
Am using jwsmtp to send the mail. But when i run the application it gives "Authentication Failed" for yahoo id as from address and I get "Start StartTLS command " for gmail id as from address
My sending mail function is as follows
void EmailClient::sendNoAuthentication(string subject, string msg, string address) {
string response;
jwsmtp::mailer mailer(address.c_str(), emailAddress.c_str(), subject.c_str(), msg.c_str(), host.c_str(), jwsmtp::mailer::SMTP_PORT, false);
mailer.authtype(jwsmtp::mailer::PLAIN);
mailer.send();
response = mailer.response();
if(response.find(EMAIL_CLIENT_RESPONSE_OK) == string::npos){
throw EmailClientException(response);
}
}
thanks in advance.
Regards,
shiny288
Topic archived. No new replies allowed.