Skip to content

darkard2003/easyMail

Repository files navigation

easyMail

Super easy mail server written in go

Installation

go get github.com/darkard2003/easyMail@latest

Usage

Using easyMail is very simple. You will need a email, and a application specific password. In gmail you can generate this password under security and then two factor authentication.

Importing

import "github.com/darkard2003/easyMail"

Creating a mail server

server := easyMail.NewMailServer("email", "password", easyMail.GMAIL)

Creating a mail

mail := easyMail.NewMail(
    "From",
    []string{"To1", "To2", "To3"},
    "Subject",
    "Body",
    false, // Is HTML
)

Attaching a file

err := mail.AddAttachment("path/to/file")

Sending a mail

err := server.SendMail(mail)

About

easy to use Mail Server for go

Resources

License

Stars

Watchers

Forks

Packages

No packages published