File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ public static function getInstance($id = 'Joomla', $exceptions = true)
100100 * @since 1.7.0
101101 *
102102 * @throws \RuntimeException if the mail function is disabled
103- * @throws phpmailerException if sending failed and exception throwing is enabled
103+ * @throws phpmailerException if sending failed
104104 */
105105 public function Send ()
106106 {
@@ -133,7 +133,17 @@ public function Send()
133133 */
134134 if (!$ result && $ this ->SMTPAutoTLS )
135135 {
136- throw new \RuntimeException (Text::_ ($ this ->ErrorInfo ), 500 );
136+ $ this ->SMTPAutoTLS = false ;
137+
138+ try
139+ {
140+ $ result = parent ::send ();
141+ }
142+ finally
143+ {
144+ // Reset the value for any future emails
145+ $ this ->SMTPAutoTLS = true ;
146+ }
137147 }
138148
139149 return $ result ;
You can’t perform that action at this time.
0 commit comments