|
|
|
@ -7,13 +7,16 @@
|
|
|
|
|
#include <unistd.h>
|
|
|
|
|
#include <iostream>
|
|
|
|
|
#include <string>
|
|
|
|
|
#include "secrets.hh"
|
|
|
|
|
|
|
|
|
|
using namespace pEp;
|
|
|
|
|
using namespace pEp::Test::Utils;
|
|
|
|
|
using namespace pEp::Mail;
|
|
|
|
|
|
|
|
|
|
std::atomic<bool> echo_received{ false };
|
|
|
|
|
std::string nickname = "bob";
|
|
|
|
|
extern std::string mailaddress;
|
|
|
|
|
extern Login lsend;
|
|
|
|
|
extern Login lrecv;
|
|
|
|
|
|
|
|
|
|
void usage() {}
|
|
|
|
|
|
|
|
|
@ -55,14 +58,16 @@ int main(int argc, char** argv)
|
|
|
|
|
echo_received.store(true);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
pEpTransportMail::ConfigMail cfg{ nickname + ".mail" };
|
|
|
|
|
// Prepare Config
|
|
|
|
|
pEpIdent own_ident = createOwnIdent(mailaddress);
|
|
|
|
|
|
|
|
|
|
pEpTransportMail::ConfigMail cfg{ own_ident.get(), lsend, lrecv };
|
|
|
|
|
mail.configure(cfg);
|
|
|
|
|
mail.startup();
|
|
|
|
|
|
|
|
|
|
// pEp
|
|
|
|
|
Adapter::session.initialize();
|
|
|
|
|
// Create/Load own identity
|
|
|
|
|
pEpIdent own_ident = createOwnIdent(mail.own_address());
|
|
|
|
|
::PEP_STATUS status = ::myself(Adapter::session(), own_ident.get());
|
|
|
|
|
pEp::throw_status(status);
|
|
|
|
|
pEpLog("Own Address [ " + mail.own_address() + " ]");
|
|
|
|
|