ORIONIS API REFERENCE

THE ORIONIS API

Build with clarity.

Explore the building blocks of an async-first Python framework. Every module, class, and method — connected, searchable, and ready to build with.

class documentation

class IMailManager(ABC): (source)

View In Hierarchy

Expose independent composition and centrally configured mail delivery.

Composition methods are synchronous and always return a new operation. Terminal operations are asynchronous and resolve the configured transport only after the message has been prepared.

Method attach Start an independent chain with a deferred attachment.
Method bcc Start an independent chain with hidden recipients.
Method cc Start an independent chain with carbon-copy recipients.
Method extend Register one sync or async factory for a new driver.
Method fromAddress Start an independent chain with exactly one sender.
Async Method html Send literal HTML without template interpretation.
Method mailer Start an independent chain selecting a named mailer.
Async Method raw Send literal plain text without template interpretation.
Method replyTo Start an independent chain with reply destinations.
Async Method send Send a Mailable, an HTML view, or Content through one pipeline.
Method subject Start an independent chain with a literal subject.
Method to Start an independent chain with primary recipients.
Class Variable __slots__ Undocumented
@abstractmethod
def attach(self, attachment: Attachment) -> PendingMail: (source)

Start an independent chain with a deferred attachment.

Parameters
attachment:AttachmentStorage attachment declaration.
Returns
PendingMailA synchronous independent chain.
Raises
MailCompositionExceptionIf the value is not an attachment declaration.
@abstractmethod
def bcc(self, addresses: Recipients, name: str | None = None) -> PendingMail: (source)

Start an independent chain with hidden recipients.

Parameters
addresses:RecipientsSingle mailbox or list/tuple of mailboxes.
name:str | NoneDisplay name for a single string mailbox only.
Returns
PendingMailA synchronous independent chain.
Raises
MailCompositionExceptionIf a mailbox is invalid or combined with an ambiguous name.
@abstractmethod
def cc(self, addresses: Recipients, name: str | None = None) -> PendingMail: (source)

Start an independent chain with carbon-copy recipients.

Parameters
addresses:RecipientsSingle mailbox or list/tuple of mailboxes.
name:str | NoneDisplay name for a single string mailbox only.
Returns
PendingMailA synchronous independent chain.
Raises
MailCompositionExceptionIf a mailbox is invalid or combined with an ambiguous name.
@abstractmethod
def extend(self, driver: str, factory: TransportFactory): (source)

Register one sync or async factory for a new driver.

Parameters
driver:strUnique transport implementation name.
factory:TransportFactoryCallable receiving the application and the normalized configuration and returning an IMailTransport or an awaitable of one.
Returns
NoneRegister lazily without constructing a transport.
Raises
MailConfigurationExceptionIf the name or factory is invalid or the driver already exists.
@abstractmethod
def fromAddress(self, address: str | Address, name: str | None = None) -> PendingMail: (source)

Start an independent chain with exactly one sender.

Parameters
address:str | AddressFrom header and transport sender.
name:str | NoneOptional display name, valid only with a string address.
Returns
PendingMailA synchronous chain without I/O.
Raises
MailCompositionExceptionIf the mailbox is invalid or a name is supplied twice.
@abstractmethod
async def html(self, html: str, callback: MessageCallback | None = None) -> MailResult: (source)

Send literal HTML without template interpretation.

Parameters
html:strLiteral HTML, possibly empty.
callback:MessageCallback | NoneOptional operation-local configurator.
Returns
MailResultTransport outcome.
Raises
MailExceptionIf configuration, preparation, or transport fails.
@abstractmethod
def mailer(self, name: str) -> PendingMail: (source)

Start an independent chain selecting a named mailer.

Parameters
name:strConfiguration name, not a transport driver name.
Returns
PendingMailA synchronous chain with lazy transport resolution.
Raises
MailConfigurationExceptionIf the name is not a non-empty string.
@abstractmethod
async def raw(self, text: str, callback: MessageCallback | None = None) -> MailResult: (source)

Send literal plain text without template interpretation.

Parameters
text:strLiteral text, possibly empty.
callback:MessageCallback | NoneOptional operation-local configurator.
Returns
MailResultTransport outcome.
Raises
MailExceptionIf configuration, preparation, or transport fails.
@abstractmethod
def replyTo(self, addresses: Recipients, name: str | None = None) -> PendingMail: (source)

Start an independent chain with reply destinations.

Parameters
addresses:RecipientsSingle mailbox or list/tuple of mailboxes.
name:str | NoneDisplay name for a single string mailbox only.
Returns
PendingMailA synchronous independent chain.
Raises
MailCompositionExceptionIf a mailbox is invalid or combined with an ambiguous name.
@overload
async def send(self, mailable: Mailable | type[Mailable], /) -> MailResult:
@overload
async def send(self, view: str, /, data: Mapping[str, object] | None = None, callback: MessageCallback | None = None) -> MailResult:
@overload
async def send(self, content: Content, /, *, callback: MessageCallback | None = None) -> MailResult:
@abstractmethod
(source)

Send a Mailable, an HTML view, or Content through one pipeline.

Parameters
value:Mailable | type[Mailable] | str | ContentA Mailable instance or class, an HTML view name, or explicit content.
data:Mapping[str, object] | NoneExplicit view data, allowed only with a string view name.
callback:MessageCallback | NoneSync or async Message configurator, forbidden with a Mailable.
Returns
MailResultConfirmed acceptance, partial acceptance, or file storage.
Raises
MailExceptionIf configuration, preparation, or transport fails.
@abstractmethod
def subject(self, value: str) -> PendingMail: (source)

Start an independent chain with a literal subject.

Parameters
value:strSubject without control characters.
Returns
PendingMailA synchronous independent chain.
Raises
MailCompositionExceptionIf the subject is not text or contains control characters.
@abstractmethod
def to(self, addresses: Recipients, name: str | None = None) -> PendingMail: (source)

Start an independent chain with primary recipients.

Parameters
addresses:RecipientsSingle mailbox or list/tuple of mailboxes.
name:str | NoneDisplay name for a single string mailbox only.
Returns
PendingMailA synchronous independent chain.
Raises
MailCompositionExceptionIf a mailbox is invalid or combined with an ambiguous name.
__slots__: tuple = (source)

Undocumented