Sending mail using jwsmtp

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.