Hello all does any one had success with gmail smtp servers ? smtp.gmail.com to send emails from c++ code ? i know its using secure layer but i have no idea how to implement such one .
A:
This is what i used, It was for linux though, It should Technically work on windows
The Tutorials are there and straigt forwards
Here is a copy and paste from the site showing Ports and SMTP Server. Credit goes to john wiggins
jwsmtp::mailer mail(to.c_str( ),
from.c_str( ),
subject.c_str( ),
mailmessage.c_str( ),
smtpserver.c_str( ),
jwsmtp::mailer::SMTP_PORT,
false);
To Authenticate
mail.username("loginname");
mail.password("secret");
mail.authtype(mailer::PLAIN);
Currently only LOGIN and PLAIN authentication are supported, LOGIN by default, to set to PLAIN call the authtype function
Shahmir Javaid
2009-08-04 08:48:25
i need c++ lib/code
2009-08-04 10:33:07
sorry it is c++
2009-08-04 11:42:04
ok i saw the source , in source it does not support authentication but in the web site its written that it does ...
2009-08-04 13:46:42
Look at answer again
Shahmir Javaid
2009-08-04 22:06:17
i downloaded old version of the lib , thanks
2009-08-05 06:25:53
now i figure i need STARTTLS ( ssl )_ support that this lib does not supprt , is there any solution ?
2009-08-05 08:07:10
Try emailing the guy who wrote the lib.. he might be able to help you out on that. Or request an addition :D. It will be nice for all of us
Shahmir Javaid
2009-08-07 13:37:56
+1
A:
Your ISP could be blocking the secure SMTP port.
You could try to the same in Thunderbird and verify that the port is open first.
Andrew Russell
2009-08-04 08:55:21
thanks. that's noteworthy point. I don't see any reason for them to block, though.
Viet
2009-11-26 09:15:36