Merge branch 'master' into develop

This commit is contained in:
Glenn Y. Rolland 2020-12-05 18:27:44 +01:00
commit 6b130888f3
3 changed files with 17 additions and 6 deletions

View file

@ -1,4 +1,4 @@
# Musala Push
# <img src="doc/logo-title-paths.svg" width="50%" style="display: block; margin: 0 auto;" alt="Musala" />
<!-- ![Build](https://github.com/glenux/musala-push/workflows/build/badge.svg?branch=master) -->
<!-- [![Gem Version](https://badge.fury.io/rb/musala-push.svg)](https://rubygems.org/gems/musala-push) -->
@ -7,6 +7,10 @@
Every morning, get the content of your favorite kanban board by email, WhatsApp or SMS.
Note: _musala_ means _work, occupation_ [in Lingala](https://dic.lingala.be/fr/mosala)
## Roadmap
Task sources:
* :heavy_check_mark: __Trello__
@ -22,6 +26,13 @@ Delivery via:
* :x: SMS
Delivery via:
* :heavy_check_mark: __E-mail__
* :x: Whatsapp
* :x: SMS
## Installation
### With go
@ -105,9 +116,8 @@ Then run the program:
## Credits
Author & Maintainer: [Glenn Y. ROLLAND](https://github.com/glenux)
Contributors: none yet ;)
* [Glenn Y. ROLLAND](https://github.com/glenux) - author & maintainer:
* You? Fork the project and become a contributor!
Got questions? Need help? Tweet at [@glenux](https://twitter.com/glenux)

View file

@ -19,6 +19,7 @@ var (
ALLOWED_SECURITY_TYPES = []string{"none", "tls", "starttls"}
)
// Config
type Config struct {
EmailFrom string `mapstructure:"email-from"`
EmailTo []string `mapstructure:"email-to"`

View file

@ -42,7 +42,7 @@ func main() {
fmt.Printf("d: exporting content of %s\n", trelloBoard.Name)
trelloMarkdown := trelloBoard.ExportToMarkdown()
trelloHtml := trelloBoard.ExportToHtml()
trelloHTML := trelloBoard.ExportToHtml()
config.EmailSubject = fmt.Sprintf("Daily mail for %s", trelloBoard.Name)
// Create email enveloppe
@ -54,7 +54,7 @@ func main() {
email.SetHeader("From", config.EmailFrom)
email.SetHeader("Subject", config.EmailSubject)
email.SetBody("text/plain", trelloMarkdown)
email.AddAlternative("text/html", trelloHtml)
email.AddAlternative("text/html", trelloHTML)
// Connect and send email
var transport *mail.Dialer