https://github.com/rafaelsouzaribeiro/send-email
Sending email with hotmail
https://github.com/rafaelsouzaribeiro/send-email
email golang outlook sendmail
Last synced: over 1 year ago
JSON representation
Sending email with hotmail
- Host: GitHub
- URL: https://github.com/rafaelsouzaribeiro/send-email
- Owner: rafaelsouzaribeiro
- Created: 2024-05-21T18:16:26.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-21T21:09:15.000Z (about 2 years ago)
- Last Synced: 2024-05-22T19:49:17.030Z (about 2 years ago)
- Topics: email, golang, outlook, sendmail
- Language: Go
- Homepage:
- Size: 1.95 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
How to use?
```go
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{"rafaelribeirosouza86@hotmail.com"}, msg)
if err != nil {
panic(err)
}
fmt.Println("Email successfully sent!")
```