mirror of https://github.com/perkeep/perkeep.git
Merge "website/camweb: do not send mail when no smtp"
This commit is contained in:
commit
b274dc6fc3
|
@ -687,6 +687,9 @@ func runDemoBlobserverLoop() {
|
|||
}
|
||||
|
||||
func sendStartingEmail() {
|
||||
if *smtpServer == "" {
|
||||
return
|
||||
}
|
||||
contentRev, err := exec.Command("docker", "run",
|
||||
"--rm",
|
||||
"-v", "/var/camweb:/var/camweb",
|
||||
|
@ -698,6 +701,7 @@ func sendStartingEmail() {
|
|||
cl, err := smtp.Dial(*smtpServer)
|
||||
if err != nil {
|
||||
log.Printf("Failed to connect to SMTP server: %v", err)
|
||||
return
|
||||
}
|
||||
defer cl.Quit()
|
||||
if err = cl.Mail("noreply@camlistore.org"); err != nil {
|
||||
|
|
Loading…
Reference in New Issue