问题描述
您好,所有
任何一个成功与gmail smtp服务器? smtp.gmail.com
从c ++代码发送电子邮件?
i知道它使用安全层,但我不知道如何实现这样的。
Hello alldoes any one had success with gmail smtp servers ? smtp.gmail.comto send emails from c++ code ?i know its using secure layer but i have no idea how to implement such one .
推荐答案
,这是为linux的,但应该技术上在Windows上工作
This is what i used, It was for linux though, It should Technically work on windows
教程在那里,straigt
The Tutorials are there and straigt forwards
这里是从网站复制和粘贴,显示端口和SMTP服务器。 Credit to john wiggins
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);
验证
mail.username("loginname");
mail.password("secret");
mail.authtype(mailer::PLAIN);
目前只支持LOGIN和PLAIN认证,默认登录,
设置为PLAIN调用authtype函数
Currently only LOGIN and PLAIN authentication are supported, LOGIN by default,to set to PLAIN call the authtype function
这篇关于发送电子邮件与gmail smtp(安全层)在c ++的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!