Added a patch to test email notifications
This commit is contained in:
parent
e4a5230f8c
commit
c0adc13e32
23
patches/email-notification/email-notification.go
Normal file
23
patches/email-notification/email-notification.go
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
|
||||||
|
"github.com/animenotifier/arn"
|
||||||
|
"github.com/animenotifier/arn/mailer"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
notification := &arn.Notification{
|
||||||
|
Title: "Boku dake ga Inai Machi",
|
||||||
|
Message: "Episode 16 has been released!",
|
||||||
|
Image: "https://media.notify.moe/images/anime/large/11110.webp",
|
||||||
|
Link: "https://notify.moe/anime/11110",
|
||||||
|
}
|
||||||
|
|
||||||
|
err := mailer.SendEmailNotification("e.urbach@gmail.com", notification)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
fmt.Println(err)
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user