mirror of
https://github.com/jhillyerd/inbucket.git
synced 2025-12-18 01:57:02 +00:00
@@ -4,12 +4,20 @@ Change Log
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
This project adheres to [Semantic Versioning](http://semver.org/).
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
||||||
|
|
||||||
|
|
||||||
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- SMTP TLS support (thanks kingforaday.)
|
||||||
|
|
||||||
|
|
||||||
## [v2.0.0] - 2018-05-05
|
## [v2.0.0] - 2018-05-05
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- Corrected docs for INBUCKET_STORAGE_PARAMS (thanks evilmrburns.)
|
- Corrected docs for INBUCKET_STORAGE_PARAMS (thanks evilmrburns.)
|
||||||
- Disabled color log output on Windows, doesn't work there.
|
- Disabled color log output on Windows, doesn't work there.
|
||||||
|
|
||||||
|
|
||||||
## [v2.0.0-rc1] - 2018-04-07
|
## [v2.0.0-rc1] - 2018-04-07
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
@@ -402,7 +402,7 @@ func (s *Session) mailHandler(cmd string, arg string) {
|
|||||||
// DATA
|
// DATA
|
||||||
func (s *Session) dataHandler() {
|
func (s *Session) dataHandler() {
|
||||||
s.send("354 Start mail input; end with <CRLF>.<CRLF>")
|
s.send("354 Start mail input; end with <CRLF>.<CRLF>")
|
||||||
msgBuf, err := s.readByteLine()
|
msgBuf, err := s.readDataBlock()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if netErr, ok := err.(net.Error); ok {
|
if netErr, ok := err.(net.Error); ok {
|
||||||
if netErr.Timeout() {
|
if netErr.Timeout() {
|
||||||
@@ -471,8 +471,8 @@ func (s *Session) send(msg string) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// readByteLine reads a line of input, returns byte slice.
|
// readDataBlock reads message DATA until `.` using the textproto pkg.
|
||||||
func (s *Session) readByteLine() ([]byte, error) {
|
func (s *Session) readDataBlock() ([]byte, error) {
|
||||||
if err := s.conn.SetReadDeadline(s.nextDeadline()); err != nil {
|
if err := s.conn.SetReadDeadline(s.nextDeadline()); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -486,7 +486,7 @@ func (s *Session) readByteLine() ([]byte, error) {
|
|||||||
return b, err
|
return b, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reads a line of input
|
// readLine reads a line of input respecting deadlines.
|
||||||
func (s *Session) readLine() (line string, err error) {
|
func (s *Session) readLine() (line string, err error) {
|
||||||
if err = s.conn.SetReadDeadline(s.nextDeadline()); err != nil {
|
if err = s.conn.SetReadDeadline(s.nextDeadline()); err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
|
|||||||
Reference in New Issue
Block a user