File tree Expand file tree Collapse file tree 3 files changed +28
-1
lines changed
Expand file tree Collapse file tree 3 files changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,17 @@ export default {
77
88 default: ' smtp'
99
10+
11+ # --------------------------------------------------------------------------
12+ # Mailer Error Handling
13+ # --------------------------------------------------------------------------
14+ #
15+ # This option controls whether or not Formidable will ignore errors when
16+ # sending email. Typically you should set this value to false so that any
17+ # errors will be shown in the console.
18+
19+ ignore_errors: false
20+
1021 # --------------------------------------------------------------------------
1122 # Mailer Configuration
1223 # --------------------------------------------------------------------------
Original file line number Diff line number Diff line change @@ -9,6 +9,17 @@ export default {
99
1010 default : 'smtp' ,
1111
12+ /**
13+ * --------------------------------------------------------------------------
14+ * Mailer Error Handling
15+ * --------------------------------------------------------------------------
16+ *
17+ * This option controls whether or not Formidable will ignore errors when
18+ * sending email. Typically you should set this value to false so that any
19+ * errors will be shown in the console.
20+ */
21+ ignore_errors : false ,
22+
1223 /**
1324 * --------------------------------------------------------------------------
1425 * Mailer Configuration
Original file line number Diff line number Diff line change @@ -103,7 +103,12 @@ export class Mail
103103 config .onComplete (response ) if config .onComplete
104104 )
105105 else
106- await self .transport! .sendMail (mail )
106+ if settings .config .ignore_errors && settings .config .ignore_errors === true
107+ self .transport! .sendMail (mail ).catch (do (reason )
108+ console .warm (reason )
109+ )
110+ else
111+ await self .transport! .sendMail (mail )
107112
108113 def attach attachment \object[]|object = []
109114 if Array .isArray (attachment )
You can’t perform that action at this time.
0 commit comments