diff --git a/proxy/email/email_service.go b/proxy/email/email_service.go index 6f6fea9..137afc3 100644 --- a/proxy/email/email_service.go +++ b/proxy/email/email_service.go @@ -11,19 +11,31 @@ import ( const ( FROM = "geek@loafle.com" - SERVERNAME = "smtp.worksmobile.com:465" + SERVER_NAME = "smtp.worksmobile.com:465" ) type EmailService struct { + userUrl string `json:"userUrl"` +} +func NewEmailService() *EmailService{ + e := &EmailService{} + return e +} + +func (e *EmailService) CheckEmail(url string) bool { + + + + return false } func EmailSendForAuth(email string) (error){ - to := mail.Address{"",email} - from := mail.Address{"", FROM} + to := mail.Address{"Park Byung Eun",email} + from := mail.Address{"Overflow", FROM} subj := "This is the Test Email" - body := "This is an Example Email\n with two lines" + body := "This is an Example Email\n with two lines \n http://localhost:8080/v1/overflow/services" // Setup headers headers := make(map[string]string) @@ -39,7 +51,7 @@ func EmailSendForAuth(email string) (error){ } message += "\r\n" + body - host, _, _ := net.SplitHostPort(SERVERNAME) + host, _, _ := net.SplitHostPort(SERVER_NAME) auth := smtp.PlainAuth("",FROM, "@loafle@5795", host) // TLS config @@ -48,7 +60,7 @@ func EmailSendForAuth(email string) (error){ ServerName: host, } - conn, err := tls.Dial("tcp", SERVERNAME, tlsconfig) + conn, err := tls.Dial("tcp", SERVER_NAME, tlsconfig) if err != nil { log.Panic(err) }