MCPcopy Create free account
hub / github.com/MailCore/mailcore2 / testAsyncSMTP

Function testAsyncSMTP

tests/test-all.cpp:332–353  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

330};
331
332static void testAsyncSMTP(mailcore::Data * data)
333{
334 mailcore::SMTPAsyncSession * smtp;
335 TestSMTPCallback * callback = new TestSMTPCallback();
336
337 smtp = new mailcore::SMTPAsyncSession();
338
339 smtp->setHostname(MCSTR("smtp.gmail.com"));
340 smtp->setPort(25);
341 smtp->setUsername(email);
342 smtp->setPassword(password);
343 smtp->setConnectionType(mailcore::ConnectionTypeStartTLS);
344
345 mailcore::SMTPOperation * op = smtp->sendMessageOperation(data);
346 op->setSmtpCallback(callback);
347 op->setCallback(callback);
348 op->start();
349
350 mainLoop();
351
352 //smtp->release();
353}
354
355static void testAsyncSendMessageFromFileViaSMTP(mailcore::Data * data)
356{

Callers

nothing calls this directly

Calls 10

mainLoopFunction · 0.85
setSmtpCallbackMethod · 0.80
setHostnameMethod · 0.45
setPortMethod · 0.45
setUsernameMethod · 0.45
setPasswordMethod · 0.45
setConnectionTypeMethod · 0.45
sendMessageOperationMethod · 0.45
setCallbackMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected