[![Build Status](https://api.travis-ci.org/kolypto/py-mailem.png?branch=master)](https://travis-ci.org/kolypto/py-mailem)

{% macro argspec(args) -%}
{% for a in args %}{% if a.doc %}* `{{ a.name }}`: {{ a.doc }}{% endif %}
{% endfor %}
{%- endmacro %}

{% macro clsdoc(cls) -%}
```python
{{ cls.signature|wordwrap(40)|indent(1+cls.name|length) }}
```

{{ cls.doc }}

{{ argspec(cls.args) }}
{%- endmacro %}

{% macro fdoc(func) -%}
```python
{{ func.signature|wordwrap(40)|indent(1+func.name|length) }}
```

{{ func.doc }}

{{ argspec(func.args) }}
{%if func.ret %}Returns: `{{ func.ret.type }}` {{ func.ret.doc }}{% endif %}
{%- endmacro %}

Mail'Em
=======

{{ mailem.doc }}



Table of Contents
=================

* <a href="#sending-messages">Sending Messages</a>
    * <a href="#message">Message</a>
        * <a href="#attachment">Attachment</a>
        * <a href="#imageattachment">ImageAttachment</a>
    * <a href="#postman">Postman</a>
        * <a href="#postmanconnect">Postman.connect</a>
        * <a href="#postmanloopback">Postman.loopback</a>
    * <a href="#connection">Connection</a>
        * <a href="#smtpconnection">SMTPConnection</a>
        * <a href="#loopbackconnection">LoopbackConnection</a>
* <a href="#templating">Templating</a>
    * <a href="#template">Template</a>
        * <a href="#templateset_renderer">Template.set_renderer</a>
        * <a href="#templatecall">Template.call</a>
        * <a href="#templatefrom_directory">Template.from_directory</a> 

Sending Messages
================

{{ Message.qualname }}
----------------------
{{ clsdoc(Message) }}

### {{ Attachment.qualname }}
{{ clsdoc(Attachment) }}

### {{ ImageAttachment.qualname }}
{{ clsdoc(ImageAttachment) }}

{{ Postman.cls.qualname }}
----------------------
{{ clsdoc(Postman.cls) }}

### {{ Postman.attrs.connect.qualname }}
{{ fdoc(Postman.attrs.connect) }}

### {{ Postman.attrs.loopback.qualname }}
{{ fdoc(Postman.attrs.loopback) }}

Connection
----------

{{ connection.doc }}

### {{ SMTPConnection.qualname }}
{{ clsdoc(SMTPConnection) }}

### {{ LoopbackConnection.qualname }}
{{ clsdoc(LoopbackConnection) }}



Templating
==========

Template
--------
{{ clsdoc(Template.cls) }}

### {{ Template.attrs.set_renderer.qualname }}
{{ fdoc(Template.attrs.set_renderer) }}

### {{ Template.attrs.defaults.qualname }}
{{ fdoc(Template.attrs.defaults) }}

### {{ Template.attrs.__call__.qualname }}
{{ fdoc(Template.attrs.__call__) }}

### {{ Template.attrs.from_directory.qualname }}
{{ fdoc(Template.attrs.from_directory) }}

TemplateRegistry
----------------

{{ clsdoc(TemplateRegistry.cls) }}

### {{ TemplateRegistry.attrs.add.qualname }}
{{ fdoc(TemplateRegistry.attrs.add) }}

### {{ TemplateRegistry.attrs.set_renderer.qualname }}
{{ fdoc(TemplateRegistry.attrs.set_renderer) }}

### {{ TemplateRegistry.attrs.defaults.qualname }}
{{ fdoc(TemplateRegistry.attrs.defaults) }}

### {{ TemplateRegistry.attrs['get'].qualname }}
{{ fdoc(TemplateRegistry.attrs['get']) }}

### {{ TemplateRegistry.attrs.from_directory.qualname }}
{{ fdoc(TemplateRegistry.attrs.from_directory) }}
