Documentation
¶
Overview ¶
这个文件实现了 SMTP 服务器的功能。 它实现了 Backend 结构,该结构包含一个 Save 方法,该方法用于保存邮件。 它还实现了 NewBackend 方法,该方法用于创建 Backend 实例。 它还实现了 NewSession 方法,该方法用于创建 Session 实例。 Session 结构包含一个 Backend 实例,From、To、RawData 字段,以及 Save 方法。 该方法用于保存邮件。 其他方法实现了 SMTP 服务器的功能。
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
The Backend implements SMTP server methods.
func (*Backend) ListenAndServe ¶
func (bkd *Backend) ListenAndServe(option ...func(*smtp.Server))
func (*Backend) NewBackend ¶
func (*Backend) NewSession ¶
NewSession is called after client greeting (EHLO, HELO).
type SimpleSender ¶
SimpleSender is a simple implementation of the Sender interface.
func (*SimpleSender) Close ¶
func (s *SimpleSender) Close()
func (*SimpleSender) Open ¶
func (s *SimpleSender) Open() error
func (*SimpleSender) Send ¶
func (s *SimpleSender) Send(m msg) error
Click to show internal directories.
Click to hide internal directories.