我正在使用POCO lib发送电子邮件。它给了我这些错误:
(_UInt16 port = 587;_) UInt16 Was not declared in this scope
(_MailMessage message;_) MailMessage Was not declared in this scope
以下是我的代码的一部分:
#include <Poco/Net/MailMessage.h>
#include <Poco/Net/MailRecipient.h>
#include <Poco/Net/SMTPClientSession.h>
#include <Poco/Net/NetException.h>
MailMessage message;
QString host = "smtp.gmail.com";
UInt16 port = 587;
QString user = "xxxxxxxx";
QString password = "111111111AbCd";
QString to = "xxxxxxxxxxxx";
QString from = "xxxxxxxxxx";
QString subject = "xxxxxxxxxxxxxx";
subject = MailMessage::encodeWord(subject, "UTF-8");
修改
使用Poco::Net::MailMessage
时,我收到以下错误: Click to see the image