go fmt
This commit is contained in:
parent
d75306d489
commit
3701881461
|
@ -1,18 +1,18 @@
|
|||
package email
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net"
|
||||
"net/smtp"
|
||||
"crypto/tls"
|
||||
"log"
|
||||
"net/mail"
|
||||
"strings"
|
||||
"github.com/google/uuid"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"git.loafle.net/overflow/commons_go/model/timestamp"
|
||||
"git.loafle.net/overflow/overflow_proxy_service/proxy"
|
||||
"git.loafle.net/overflow/overflow_proxy_service/proxy/member"
|
||||
"git.loafle.net/overflow/commons_go/model/timestamp"
|
||||
"github.com/google/uuid"
|
||||
"log"
|
||||
"net"
|
||||
"net/mail"
|
||||
"net/smtp"
|
||||
"strings"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -36,7 +36,6 @@ type Email struct {
|
|||
ConfirmDate timestamp.Timestamp `json:"confirmDate,omitempty"`
|
||||
SmtpServer string `json:"_"`
|
||||
BodyMsg string `json:"_"`
|
||||
|
||||
}
|
||||
|
||||
func NewEmail(member member.Member, subject string) *Email {
|
||||
|
@ -54,22 +53,19 @@ func NewEmail(member member.Member, subject string) *Email {
|
|||
}
|
||||
|
||||
type EmailService struct {
|
||||
|
||||
}
|
||||
|
||||
func NewEmailService() *EmailService {
|
||||
return &EmailService{}
|
||||
}
|
||||
|
||||
|
||||
|
||||
func (es *EmailService) checkError(err error) {
|
||||
if err != nil {
|
||||
log.Panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
func (es *EmailService) getSendMailMessage(e *Email) (string) {
|
||||
func (es *EmailService) getSendMailMessage(e *Email) string {
|
||||
to := mail.Address{"Park Byung Eun", e.Member.Email}
|
||||
from := mail.Address{"Overflow", e.From}
|
||||
//body := "This is an Example Email\n with two lines \n http://localhost:8080/v1/overflow/services"
|
||||
|
@ -99,8 +95,7 @@ func (es *EmailService) generationAuthToken(e *Email) string {
|
|||
return tempToken
|
||||
}
|
||||
|
||||
|
||||
func (es *EmailService)SendEmailForAuth(e *Email) (error){
|
||||
func (es *EmailService) SendEmailForAuth(e *Email) error {
|
||||
to := mail.Address{"Park Byung Eun", e.Member.Email}
|
||||
from := mail.Address{"Overflow", e.From}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user