Poco::OSP::Mail

class MailDeliveryServiceImpl

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

 more...

Types

Ptr

typedef Poco::AutoPtr < MailDeliveryServiceImpl > Ptr;

SMTPClientSessionPtr

typedef Poco::SharedPtr < Poco::Net::SMTPClientSession > SMTPClientSessionPtr;

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();