Poco::OSP::Mail

class MailDeliveryServiceImpl

File Information

Library: OSP/Mail
Package: Mail
Header: Poco/OSP/Mail/MailDeliveryServiceImpl.h

Description

The default implementation of the MailDeliveryService.

This implementation uses a Poco::Net::SMTPClientSession to deliver the emails. Emails are managed through a queue and sending is done in batches.

Inheritance

Direct Base Classes: MailDeliveryService, Poco::Runnable

All Base Classes: MailDeliveryService, Poco::OSP::Service, Poco::RefCountedObject, Poco::Runnable

Member Summary

Member Functions: closeSMTPClientSession, createSMTPClientSession, generateMID, isA, run, sendMessage, type

Inherited Functions: duplicate, isA, referenceCount, release, run, sendMessage, type

Nested Classes

struct Configuration

 

Types Aliases

Ptr

using Ptr = Poco::AutoPtr < MailDeliveryServiceImpl >;

SMTPClientSessionPtr

using SMTPClientSessionPtr = Poco::SharedPtr < Poco::Net::SMTPClientSession >;

Constructors

MailDeliveryServiceImpl

MailDeliveryServiceImpl(
    const Configuration & config,
    Poco::Logger & logger
);

Creates the MailDeliveryServiceImpl using the given configuration and logger.

Destructor

~MailDeliveryServiceImpl virtual

~MailDeliveryServiceImpl();

Destroys the MailDeliveryServiceImpl.

Member Functions

isA virtual

bool isA(
    const std::type_info & otherType
) const;

sendMessage virtual

MailDeliveryHandle::Ptr sendMessage(
    MailMessagePtr pMessage
);

type virtual

const std::type_info & type() const;

closeSMTPClientSession protected

void closeSMTPClientSession();

createSMTPClientSession protected virtual

virtual SMTPClientSessionPtr createSMTPClientSession(
    const Configuration & config
);

generateMID protected

std::string generateMID(
    const std::string & clientHost
) const;

run protected virtual

void run();

Securely control IoT edge devices from anywhere   Connect a Device