Compare commits
No commits in common. "694c4ff93c0bd72c06f21918a8e28b1dbba04851" and "279500db508f7e2254442f7a5278965eb7cbe803" have entirely different histories.
694c4ff93c
...
279500db50
2 changed files with 4 additions and 6 deletions
2
mail.go
2
mail.go
|
@ -2,7 +2,6 @@ package main
|
|||
|
||||
import (
|
||||
"os"
|
||||
"time"
|
||||
|
||||
mail "gopkg.in/mail.v2"
|
||||
)
|
||||
|
@ -34,7 +33,6 @@ func deliverMessage(s *ServerConfig, m *mail.Message) error {
|
|||
if s.Encryption {
|
||||
dialer.StartTLSPolicy = mail.MandatoryStartTLS
|
||||
}
|
||||
dialer.Timeout = 30 * time.Second
|
||||
return dialer.DialAndSend(m)
|
||||
}
|
||||
|
||||
|
|
8
main.go
8
main.go
|
@ -18,7 +18,7 @@ func readFromConsole() string {
|
|||
for counter < 3 {
|
||||
line, err = reader.ReadString('\n')
|
||||
if line == "\n" {
|
||||
counter++
|
||||
counter += 1
|
||||
} else {
|
||||
counter = 0
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ func main() {
|
|||
var err error
|
||||
var configPath, section, serverAddress, user, password, to, cc, bcc, from, subject, text string
|
||||
var encryption, dbg, versionFlag bool
|
||||
var serverPortAux int
|
||||
var serverPort_ int
|
||||
var serverPort int64
|
||||
|
||||
flag.BoolVar(&versionFlag, "version", false, "Prints the version and exits")
|
||||
|
@ -76,7 +76,7 @@ func main() {
|
|||
flag.StringVar(§ion, "section", "default", "Section of the conf to read (defaults to \"default\")")
|
||||
flag.BoolVar(&dbg, "dbg", false, "Enable debugging output")
|
||||
flag.StringVar(&serverAddress, "server-address", "", "The SMTP server address")
|
||||
flag.IntVar(&serverPortAux, "server-port", 0, "The SMTP server")
|
||||
flag.IntVar(&serverPort_, "server-port", 0, "The SMTP server")
|
||||
flag.BoolVar(&encryption, "force-ssl", false, "Force the use of ssl (defalut: false)")
|
||||
flag.StringVar(&user, "user", "", "The user to authenticate with to the server")
|
||||
flag.StringVar(&password, "password", "", "The password to authenticate with to the server")
|
||||
|
@ -102,7 +102,7 @@ func main() {
|
|||
}
|
||||
}
|
||||
|
||||
serverPort = int64(serverPortAux)
|
||||
serverPort = int64(serverPort_)
|
||||
Debug.F(
|
||||
`
|
||||
---
|
||||
|
|
Loading…
Reference in a new issue