Skip to content

Latest commit

 

History

History
56 lines (43 loc) · 910 Bytes

README.md

File metadata and controls

56 lines (43 loc) · 910 Bytes

ENS with Go

Go library for Email, Notification, SMS


Installation

$ go get github.com/smartblock/[email protected]

Usage

package main

import (
	"fmt"

	"github.com/smartblock/pkgscens"
)

func main() {
	smtpAuth := pkgscens.SMTPAuth{
		Identity: "",
		Username: "[email protected]",
		Password: "your_password",
		Host:     "smtp.gmail.com",
	}

	sendMailInput := pkgscens.SendMailInput{
		Addr:     "smtp.gmail.com:587",
		SMTPAuth: smtpAuth,
		FromName: "Noreply Example",
		FromMail: "[email protected]",
		ToMail:   []string{"[email protected]"},
		ToName:   []string{"ReceipientName"},
    Subject:  "First Test Email",
    //HTML or TEXT
		MsgType:  "HTML",
		Message:  "<h1>My First Message</h1>",
	}

	err := pkgscens.SendMail(sendMailInput)

	if err != nil {
    //Error Return
		fmt.Println(err)
	}

  //Send Success
	fmt.Println("send success")
}