email-sender/internal/smtpclient/smtpclient.go

40 lines
642 B
Go

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)
}