Module lettre::transport [−][src]
Sending Messages
This section explains how to manipulate emails you have created.
This mailer contains several different transports for your emails. To be sendable, the
emails have to implement Email
, which is the case for emails created with lettre::builder
.
The following transports are available:
- The
SmtpTransport
uses the SMTP protocol to send the message over the network. It is the preferred way of sending emails. - The
SendmailTransport
uses the sendmail command to send messages. It is an alternative to the SMTP transport. - The
FileTransport
creates a file containing the email content to be sent. It can be used for debugging or if you want to keep all sent emails. - The
StubTransport
is useful for debugging, and only prints the content of the email in the logs.
Modules
file | file-transport The file transport writes the emails to the given directory. The name of the file will be
|
sendmail | sendmail-transport The sendmail transport sends the email using the local sendmail command. |
smtp | smtp-transport The SMTP transport sends emails using the SMTP protocol. |
stub | The stub transport only logs message envelope and drops the content. It can be useful for testing purposes. |
Traits
AsyncTransport | tokio02 or tokio1 or async-std1 Async Transport method for emails |
Transport | Blocking Transport method for emails |