Installing a mailer package and setting up a mail channel
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"go-udemy-web-1/internal/models"
|
||||
"html/template"
|
||||
"log"
|
||||
|
||||
@ -15,4 +16,5 @@ type AppConfig struct {
|
||||
InfoLog *log.Logger
|
||||
ErrorLog *log.Logger
|
||||
Session *scs.SessionManager
|
||||
MailChan chan models.MailData
|
||||
}
|
||||
|
@ -1,6 +1,8 @@
|
||||
package models
|
||||
|
||||
import "time"
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// User is the user model
|
||||
type User struct {
|
||||
@ -58,3 +60,11 @@ type RoomRestriction struct {
|
||||
ReservationID int
|
||||
RestrictionID int
|
||||
}
|
||||
|
||||
// MailData holds an email message
|
||||
type MailData struct {
|
||||
To string
|
||||
From string
|
||||
Subject string
|
||||
Content string
|
||||
}
|
||||
|
Reference in New Issue
Block a user