func (s *SMTPWriter) Init(jsonconfig string) error {
	return json.Unmarshal([]byte(jsonconfig), s)
}
Init smtp writer with json config.
config like:
{
"username":"example@gmail.com",
"password:"password",
"host":"smtp.gmail.com:465",
"subject":"email title",
"fromAddress":"from@example.com",
"sendTos":["email1","email2"],
"level":LevelError
}
package logs
import (
	"crypto/tls"
	"encoding/json"
	"fmt"
	"net"
	"net/smtp"
	"strings"
	"time"
)
type SMTPWriter struct {
	Username           string   `json:"username"`
	Password           string   `json:"password"`
	Host               string   `json:"host"`
	Subject            string   `json:"subject"`
	FromAddress        string   `json:"fromAddress"`
	RecipientAddresses []string `json:"sendTos"`
	Level              int      `json:"level"`
}
func newSMTPWriter() Logger {
	return &SMTPWriter{Level: LevelTrace}
}