Mailer integration with guillotina
Project description
guillotina_mailer
Configuration
config.json can include mailer section:
"applications": ["guillotina_mailer"], "mailer": { "default_sender": "foo@bar.com", "endpoints": { "default": { "type": "smtp", "host": "localhost", "port": 25 } } }
Printing mailer
For development/debugging, you can use a console print mailer:
"applications": ["guillotina_mailer"], "mailer": { "default_sender": "foo@bar.com", "endpoints": { "default": { "type": "smtp", "host": "localhost", "port": 25 } }, "utility": "guillotina_mailer.utility.PrintingMailerUtility" }
Sending mail
POST http://localhost:8080/zodb/container/@mailer:
{ "sender": "foo@bar.com", "recipient": "john@doe.com", "subject": "Some subject", "text": "Hello" }
Permissions
guillotina_mailer defines a permission mailer.SendMail which, by default, only the guillotina.ContainerAdmin role is assigned.
Using the mailer in code
You can also directly use the mailer in your code:
from guillotina.component import queryUtility from guillotina_mailer.interfaces import IMailer mailer = queryUtility(IMailer) await mailer.send(recipient='john@doe.com', subject='This is my subject', text='Body of email')
1.0.1 (2017-04-10)
remove dependencies on repoze.sendmail and transaction [vangheem]
Test mailer did not provide correct signature [vangheem]
1.0.0 (2017-04-04)
Initial release moved from guillotina_mailer
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file guillotina_mailer-1.0.1.tar.gz
.
File metadata
- Download URL: guillotina_mailer-1.0.1.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8eec74fb5f006a713321f4eeb487f34a676b64b6330ffbcac107a4db98b16866 |
|
MD5 | a78f6ee1b08a98b570d544d0e5abcc81 |
|
BLAKE2b-256 | 0f37666462a18e12bc6cf41ad00d99c9b3b7ae53060ffa0fb773061884b94610 |
File details
Details for the file guillotina_mailer-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: guillotina_mailer-1.0.1-py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d5a4ce223a9aac1a059ce2a70d818f7f8c7c83b9ce5396b8b3402ba3be308f9 |
|
MD5 | b5cb570bc0320047497dade40098400a |
|
BLAKE2b-256 | 78a0b8b336290fdfc062ae0c847263626b1ee9d2d413d69995a64b6f6c9c7d28 |