smtp 0.1.0
Synchronous SMTP library for D language
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
SMTP library for D - v0.0.9
Native SMTP client implementation in D language. Get at: Dub registry
Tested with:
gdc-4.8
dmd-2.065.0
on Ubuntu 13.10dmd-2.065.0
on OS X 10.9.2
Features
SmtpClient
class that implements SMTP client (mostly low-level functions)MailSender
class that implements simplified APIGMailSender
is aMailSender
predefined to use GMail's smtp gatewaySmtpMessage
class that implements SMTP message fields storageSSL/TLS
encryption support (viaOpenSSL
). Next encryption methods implemented:
SSLv2
SSLv23
SSLv3
TLSv1
- Authentication support which includes the next methods:
PLAIN
TODO
- More authentication methods.
- More Dedicated clients for popular mail providers, additional API simplification.
- Thread-safety.
- High-level client.
- Unit-tests suite.
- Asynchronous version (based on fibers?)
Installation
You can use smtp
library for D via dub
package manager.
For this, follow the next steps:
- Download dub from DLang site (if you still don't have it installed).
- Create your project (or use
dub.json
from your existing one). - Add
smtp
as a dependency:{ "dependencies": { "smtp": ">=0.0.3", } }
- Use dub to build smtp library:
without SSL/TLS support
$ dub
or with SSL/TLS support:
$ dub -c ssl
To chose right smtp building configuration for your project use
subConfigurations
setting in your project'sdub.json
:{ "subConfigurations": { "smtp": "no-ssl" } }
Available configurations are:
no-ssl
by defaultssl
to build withOpenSSL
support
Usage
You can find low-level API usage example projects in examples
folder:
lowlevel Shows the simplest chain of routines to send e-mail message via unencrypted channel.
lowlevel-tls Shows the simplest chain of routines to send e-mail message via encrypted channel.
You can enter folder examples/<example-project-name>
and perform $ dub
in order
to run and test example.
If you're a Linux
or OS X
user, you can use standard sendmail
utility
to get SMTP server up and running on your local host. For that just open
new terminal tab or window and type sendmail
.
If you want to test encrypted client, you can use smtp.gmail.com:587
along
with TLSv1
encryption method.
Here's an example of high-level SmtpClient
API usage for sending sample email
either using open or encrypted channel.
- Registered by Rostyslav Dzinko
- 0.1.0 released 9 years ago
- SSPkrolik/smtp
- sspkrolik.github.io/smtp
- MIT
- Copyright © 2014, Rostyslav Dzinko
- Authors:
- Dependencies:
- none
- Versions:
-
0.3.0 2015-Jul-17 0.2.1 2015-Jul-15 0.2.0 2014-Apr-22 0.1.1 2014-Apr-12 0.1.0 2014-Apr-12 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
2 downloads this month
-
11255 downloads total
-
- Score:
- 1.2
- Short URL:
- smtp.dub.pm