Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/martenframework/marten-smtp-emailing
An SMTP emailing backend for the Marten web framework.
https://github.com/martenframework/marten-smtp-emailing
crystal email emailing framework marten smtp web
Last synced: about 1 month ago
JSON representation
An SMTP emailing backend for the Marten web framework.
- Host: GitHub
- URL: https://github.com/martenframework/marten-smtp-emailing
- Owner: martenframework
- License: mit
- Created: 2022-12-04T22:04:00.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-11T21:28:50.000Z (6 months ago)
- Last Synced: 2024-07-12T00:14:04.089Z (6 months ago)
- Topics: crystal, email, emailing, framework, marten, smtp, web
- Language: Crystal
- Homepage:
- Size: 43.9 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Marten SMTP Emailing
[![CI](https://github.com/martenframework/marten-smtp-emailing/workflows/Specs/badge.svg)](https://github.com/martenframework/marten-smtp-emailing/actions)
[![CI](https://github.com/martenframework/marten-smtp-emailing/workflows/QA/badge.svg)](https://github.com/martenframework/marten-smtp-emailing/actions)**Marten SMTP Emailing** provides an SMTP backend that can be used with Marten web framework's [emailing system](https://martenframework.com/docs/emailing).
## Installation
Simply add the following entry to your project's `shard.yml`:
```yaml
dependencies:
marten_smtp_emailing:
github: martenframework/marten-smtp-emailing
```And run `shards install` afterward.
## Configuration
First, add the following requirement to your project's `src/project.cr` file:
```crystal
require "marten_smtp_emailing"
```You can then configure your project to use the SMTP backend by setting the corresponding configuration option as follows:
```crystal
Marten.configure do |config|
config.emailing.backend = MartenSMTPEmailing::Backend.new
end
```By default, the backend will attempt to deliver emails to an SMTP server running on localhost and listening on the standard SMTP port (25). If you need to, you can change these backend properties at initialization time:
```crystal
Marten.configure do |config|
config.emailing.backend = MartenSMTPEmailing::Backend.new(
host: "localhost",
port: 25,
helo_domain: "localhost",
use_tls: true,
username: nil,
password: nil
)
end
```## Authors
Morgan Aubert ([@ellmetha](https://github.com/ellmetha)) and
[contributors](https://github.com/martenframework/marten-smtp-emailing/contributors).## License
MIT. See ``LICENSE`` for more details.