@@ -39,7 +39,7 @@ func SendMail(sender string, recipients []string, subject string, message string
39
39
sc ,err := srv .Dial ()
40
40
defer sc .Close ()
41
41
if err != nil {
42
- log .Fatalf ("Error while sending mail: %s" , err )
42
+ log .Printf ("Error while sending mail: %s" , err )
43
43
return
44
44
}
45
45
sc .Send (sender , recipients , m )
@@ -49,7 +49,7 @@ func SendMail(sender string, recipients []string, subject string, message string
49
49
func SendConfirmation (userConfirmation string , userUsername string , userEmail string , followMod string ) {
50
50
buffer ,err := ioutil .ReadFile ("emails/confirm-account" )
51
51
if err != nil {
52
- log .Fatalf ("Error while reading Email Template confirm-account: %s" , err )
52
+ log .Printf ("Error while reading Email Template confirm-account: %s" , err )
53
53
return
54
54
}
55
55
confirmation := userConfirmation
@@ -66,7 +66,7 @@ func SendConfirmation(userConfirmation string, userUsername string, userEmail st
66
66
t := template .Must (template .New ("email" ).Parse (text ))
67
67
buf := & bytes.Buffer {}
68
68
if err := t .Execute (buf , data ); err != nil {
69
- log .Fatalf ("Error while parsing Email Template confirm-account: %s" , err )
69
+ log .Printf ("Error while parsing Email Template confirm-account: %s" , err )
70
70
return
71
71
}
72
72
s := buf .String ()
@@ -76,7 +76,7 @@ func SendConfirmation(userConfirmation string, userUsername string, userEmail st
76
76
func SendReset (userUsername string , userPasswordReset string , userEmail string ) {
77
77
buffer ,err := ioutil .ReadFile ("emails/password-reset" )
78
78
if err != nil {
79
- log .Fatalf ("Error while reading Email Template password-reset: %s" , err )
79
+ log .Printf ("Error while reading Email Template password-reset: %s" , err )
80
80
return
81
81
}
82
82
data := map [string ]interface {}{
@@ -89,7 +89,7 @@ func SendReset(userUsername string, userPasswordReset string, userEmail string)
89
89
t := template .Must (template .New ("email" ).Parse (text ))
90
90
buf := & bytes.Buffer {}
91
91
if err := t .Execute (buf , data ); err != nil {
92
- log .Fatalf ("Error while parsing Email Template password-reset: %s" , err )
92
+ log .Printf ("Error while parsing Email Template password-reset: %s" , err )
93
93
return
94
94
}
95
95
s := buf .String ()
0 commit comments