Categorygithub.com/gflydev/notification

# README

gFly Notification - Mail

Copyright © 2023, gFly
https://www.gFly.dev
All rights reserved.

Usage

Install

go get -u github.com/gflydev/[email protected]
go get -u github.com/gflydev/notification/[email protected]

Quick usage main.go

import (
    notificationMail "github.com/gflydev/notification/mail"
    "github.com/gflydev/notification"
)

notificationMail.AutoRegister()

Notification file

type ResetPassword struct {
}

func (n ResetPassword) ToEmail() notifyMail.Data {
    return notifyMail.Data{
        To:      "[email protected]",
        Subject: "Mail title",
        Body:    "Mail body",
    }
}

resetPassword := ResetPassword{}
if err := notification.Send(resetPassword); err != nil {
    log.Error(err)
}

# Packages

No description provided by the author