## Transport


A transport is the object a backend opens, and the only code that communicates with a mail service.


Usage

``` python
Transport()
```


A third-party backend writes a transport and nothing else. Both methods take positional-only arguments, so `submit(self, sub)` still matches.


## Methods

| Name | Description |
|----|----|
| [close()](#close) | Close the link. [Connection.close](Connection.md#epistole.Connection.close) suppresses any error this raises. |
| [submit()](#submit) | Submit `submission` to the mail service. |

------------------------------------------------------------------------


#### close()


Close the link. [Connection.close](Connection.md#epistole.Connection.close) suppresses any error this raises.


Usage

``` python
close()
```


------------------------------------------------------------------------


#### submit()


Submit `submission` to the mail service.


Usage

``` python
submit(submission)
```


Map a native failure onto one [EpistoleError](exceptions.EpistoleError.md#epistole.exceptions.EpistoleError) subclass, and raise it with `from` and with `backend` unset. Before writing anything, raise [RejectedError](exceptions.RejectedError.md#epistole.exceptions.RejectedError) with no `__cause__` for a message this transport cannot carry. Never raise [RecipientsRefusedError](exceptions.RecipientsRefusedError.md#epistole.exceptions.RecipientsRefusedError) or build a [SendResult](SendResult.md#epistole.SendResult), because [Connection.send](Connection.md#epistole.Connection.send) does both. See ADR-0004 and ADR-0015.


##### Returns


`Each refused recipient's refusal, keyed by addr-spec. It is empty when the service refused none.`
