Skip to content

Commit

Permalink
update repo readme
Browse files Browse the repository at this point in the history
  • Loading branch information
DESKTOP-LKF81KV\Mak Moinee committed Jun 4, 2023
1 parent 9f22c39 commit bc234ab
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- Stair Case (Hacker Rank Solution) - prints a staircase of size n.
- Concurrency Package - useable interface for any concurrent calls.
- Goserve Package - build http service to start your API with the support of injecting certs and reading config from settings.yaml
- Email - send email by using our prebuilt function, no need to code manually for email just instantiate the package and pass the required paramaters and it should work

## Installation
- `go get github.com/MakMoinee/go-mith`
Expand Down Expand Up @@ -117,3 +118,31 @@ func main() {
}
}
```


## email package

```go
package main

import (
"log"

"github.com/MakMoinee/go-mith/pkg/email"
)

func main() {
emailService := email.NewEmailService(587, "emailHost", "emailAddress", "emailAppPass")

isEmailSent, err := emailService.SendEmail("receiverEmail", "emailSubject", "emailMessage")
if err != nil {
log.Fatalf("Error sending email: %s", err)
}

if isEmailSent {
log.Println("Email Send Successfully")
} else {
log.Println("Failed to send email")
}
}
```

0 comments on commit bc234ab

Please sign in to comment.