Poco::OSP::Mail

class MailDeliveryService

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

Description

The MailDeliveryService is used to send emails from OSP applications.

The default implementation of this service sets up a Poco::Net::SMTPClientSession, configures it from settings in the application configuration file, logs into the mail server and delivers a message.

Inheritance

Direct Base Classes: Poco::OSP::Service

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

Known Derived Classes: MailDeliveryServiceImpl

Member Summary

Member Functions: isA, sendMessage, type

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

Types Aliases

Ptr

using Ptr = Poco::AutoPtr < MailDeliveryService >;

Member Functions

isA virtual

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

sendMessage virtual

virtual MailDeliveryHandle::Ptr sendMessage(
    MailMessagePtr pMessage
) = 0;

Sends the given mail message to its recipient, using the configured SMTP server.

Note that depending on the implementation of the service, sending the email may be done asynchronously. The returned MailDeliveryHandle object can be used to monitor the progress of sending the mail message.

type virtual

const std::type_info & type() const;

Variables

SERVICE_NAME static

static const std::string SERVICE_NAME;