Skip to content

smartblock/pkgscens

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

ENS with Go

Go library for Email, Notification, SMS


Installation

$ go get github.com/smartblock/pkgscens@1.0.0

Usage

package main

import (
	"fmt"

	"github.com/smartblock/pkgscens"
)

func main() {
	smtpAuth := pkgscens.SMTPAuth{
		Identity: "",
		Username: "example@gmail.com",
		Password: "your_password",
		Host:     "smtp.gmail.com",
	}

	sendMailInput := pkgscens.SendMailInput{
		Addr:     "smtp.gmail.com:587",
		SMTPAuth: smtpAuth,
		FromName: "Noreply Example",
		FromMail: "example@gmail.com",
		ToMail:   []string{"receipient@gmail.com"},
		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")
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages