|
|
|
@ -137,7 +137,7 @@ namespace pEp {
|
|
|
|
|
|
|
|
|
|
// move to startup()?
|
|
|
|
|
mailio::smtps conn(login_smtp.server, login_smtp.port);
|
|
|
|
|
conn.authenticate(login_smtp.username, login_smtp.passphrase, login_smtp.auth_method);
|
|
|
|
|
conn.authenticate(login_smtp.username, login_smtp.passphrase, login_smtp.auth_method.smtps);
|
|
|
|
|
conn.submit(mmsg);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -159,10 +159,13 @@ namespace pEp {
|
|
|
|
|
// and then populate rx_queue via conn_imap.select()
|
|
|
|
|
// would mean to make conn_imap a member of pEpTransportMail class instead of a local variable.
|
|
|
|
|
mailio::imaps conn_imap(login_imap.server, login_imap.port);
|
|
|
|
|
conn_imap.authenticate(login_imap.username, login_imap.passphrase, login_imap.auth_method);
|
|
|
|
|
conn_imap.authenticate(
|
|
|
|
|
login_imap.username,
|
|
|
|
|
login_imap.passphrase,
|
|
|
|
|
login_imap.auth_method.imaps);
|
|
|
|
|
// get that mail from mailio
|
|
|
|
|
const std::string mailbox = "inbox";
|
|
|
|
|
conn_imap.fetch(&mailbox, message_id, &msg, false);
|
|
|
|
|
conn_imap.fetch(mailbox, message_id, msg, false);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// MIME-Decode is already done by mailio. We just need to translate the mailio-msg struct to a pep-msg struct.
|
|
|
|
@ -180,12 +183,12 @@ namespace pEp {
|
|
|
|
|
&has_possible_pEp_msg);
|
|
|
|
|
throw_status(status);
|
|
|
|
|
|
|
|
|
|
if (msg == nullptr) {
|
|
|
|
|
if (msg_pep == nullptr) {
|
|
|
|
|
rx_queue.pop();
|
|
|
|
|
throw std::runtime_error("recvnext(): invalid message received.");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
msg_pep = msg;
|
|
|
|
|
//msg_pep = msg;
|
|
|
|
|
rx_queue.pop();
|
|
|
|
|
}
|
|
|
|
|
return msg_pep;
|
|
|
|
|