Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session holds data for each connected SMTP connection
func NewSession ¶
NewSession creates a fresh session with a generated UUID and timestamp
func (*Session) Data ¶
Data is called on the DATA SMTP command. It generally contains the "message" but also any other informational headers such as the mailer client and subject. This is seen as the "finished" command for each session, so it triggers the HTTP post, though technically Reset and Logout wil be called afterwards.
func (*Session) Logout ¶
Logout is called when a connection is terminated. It will log whether the current session did or not make a post request.
func (*Session) Rcpt ¶
Rcpt is called on the RCPT SMTP command, it stores the to address. It may be called multiple times in one session.
func (*Session) Reset ¶
func (s *Session) Reset()
Reset is called on the RSET SMTP command, or after a successful DATA command It will log whether the current session did or not make a post request.
func (*Session) TemplateData ¶
func (s *Session) TemplateData() *dispatch.TemplateData