update email test in the driver to be able to send the config in the body (#8453)

Signed-off-by: cpanato <ctadeu@gmail.com>
Этот коммит содержится в:
Carlos Tadeu Panato Junior
2018-03-13 16:42:56 +01:00
коммит произвёл Chris
родитель 8ea26c84e7
Коммит 1b29b50330
2 изменённых файлов: 25 добавлений и 19 удалений

Просмотреть файл

@@ -2098,8 +2098,8 @@ func (c *Client4) GetPing() (string, *Response) {
}
// TestEmail will attempt to connect to the configured SMTP server.
func (c *Client4) TestEmail() (bool, *Response) {
if r, err := c.DoApiPost(c.GetTestEmailRoute(), ""); err != nil {
func (c *Client4) TestEmail(config *Config) (bool, *Response) {
if r, err := c.DoApiPost(c.GetTestEmailRoute(), config.ToJson()); err != nil {
return false, BuildErrorResponse(r, err)
} else {
defer closeBody(r)