Skip to content

rafaelsouzaribeiro/send-email

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

How to use?

loginauth "github.com/rafaelsouzaribeiro/send-email/pkg/login-auth"

auth := loginauth.LoginAuth("email", "password")
	subject := "Subject: Test Email from Go\n"
	body := "This is a test email message from Go.\n"
	msg := []byte(subject + "\n" + body)

	err := smtp.SendMail("smtp-mail.outlook.com:25", auth, "fromemail", []string{"[email protected]"}, msg)

	if err != nil {
		panic(err)
	}

	fmt.Println("Email successfully sent!")

About

Sending email with hotmail

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages