asphalt.mailer.component

class asphalt.mailer.component.MailerComponent(backend, resource_name='default', **mailer_args)

Bases: Component

Creates a Mailer resource.

Parameters
  • backend (str) – entry point name of the mailer backend class

  • resource_name (str) – name of the mailer resource to be published

  • mailer_args (Any) – keyword arguments passed to the mailer backend class

coroutine start(self, ctx)

Perform any necessary tasks to start the services provided by this component.

In this method, components typically use the context to:

It is advisable for Components to first add all the resources they can to the context before requesting any from it. This will speed up the dependency resolution and prevent deadlocks.

Parameters

ctx (Context) – the containing context for this component

Return type

None