SMTPClient defines a SMTP mail client structure that implements `mailer.Mailer` interface.
| 23 | // SMTPClient defines a SMTP mail client structure that implements |
| 24 | // `mailer.Mailer` interface. |
| 25 | type SMTPClient struct { |
| 26 | onSend *hook.Hook[*SendEvent] |
| 27 | |
| 28 | TLS bool |
| 29 | Port int |
| 30 | Host string |
| 31 | Username string |
| 32 | Password string |
| 33 | |
| 34 | // SMTP auth method to use |
| 35 | // (if not explicitly set, defaults to "PLAIN") |
| 36 | AuthMethod string |
| 37 | |
| 38 | // LocalName is optional domain name used for the EHLO/HELO exchange |
| 39 | // (if not explicitly set, defaults to "localhost"). |
| 40 | // |
| 41 | // This is required only by some SMTP servers, such as Gmail SMTP-relay. |
| 42 | LocalName string |
| 43 | } |
| 44 | |
| 45 | // OnSend implements [mailer.SendInterceptor] interface. |
| 46 | func (c *SMTPClient) OnSend() *hook.Hook[*SendEvent] { |
nothing calls this directly
no outgoing calls
no test coverage detected