refactor: project structure
This commit is contained in:
39
internal/smtpclient/smtpclient.go
Normal file
39
internal/smtpclient/smtpclient.go
Normal file
@@ -0,0 +1,39 @@
|
||||
package smtpclient
|
||||
|
||||
import (
|
||||
"crypto/tls"
|
||||
"io"
|
||||
"net/smtp"
|
||||
)
|
||||
|
||||
type SMTPClient struct {
|
||||
client smtp.Client
|
||||
}
|
||||
|
||||
func (c *SMTPClient) Auth(a smtp.Auth) error {
|
||||
return c.client.Auth(a)
|
||||
}
|
||||
|
||||
func (c *SMTPClient) Close() error {
|
||||
return c.client.Close()
|
||||
}
|
||||
|
||||
func (c *SMTPClient) Data() (io.WriteCloser, error) {
|
||||
return c.client.Data()
|
||||
}
|
||||
|
||||
func (c *SMTPClient) Mail(from string) error {
|
||||
return c.client.Mail(from)
|
||||
}
|
||||
|
||||
func (c *SMTPClient) Quit() error {
|
||||
return c.client.Quit()
|
||||
}
|
||||
|
||||
func (c *SMTPClient) Rcpt(to string) error {
|
||||
return c.client.Rcpt(to)
|
||||
}
|
||||
|
||||
func (c *SMTPClient) StartTLS(config *tls.Config) error {
|
||||
return c.client.StartTLS(config)
|
||||
}
|
||||
Reference in New Issue
Block a user