File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed
Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,22 @@ public function __construct($mail = null)
1515 $ this ->mail = $ mail ;
1616 }
1717
18+ /**
19+ * Connect to your mail server
20+ *
21+ * @param array $connection Connection details
22+ */
23+ public function connect ($ connection )
24+ {
25+ Mailer::connect ($ connection );
26+ }
27+
28+ /**
29+ * Create a new mail instance
30+ *
31+ * @param mixed $mail
32+ * @return static
33+ */
1834 public static function create ($ mail )
1935 {
2036 return new static ($ mail );
@@ -41,7 +57,7 @@ public function getMail()
4157
4258 /**
4359 * Add attachments to your mail from your file system
44- *
60+ *
4561 * @throws Exception
4662 * @return Mail
4763 */
Original file line number Diff line number Diff line change @@ -77,6 +77,14 @@ public static function connect($connection)
7777 } else {
7878 static ::$ mailer ->SMTPSecure = $ connection ['security ' ];
7979 }
80+
81+ if (isset ($ connection ['defaults ' ])) {
82+ static ::$ config ['defaults ' ] = $ connection ['defaults ' ];
83+ }
84+
85+ if (isset ($ connection ['debug ' ])) {
86+ static ::$ config ['debug ' ] = $ connection ['debug ' ];
87+ }
8088 }
8189
8290 public static function config ($ config = [])
You can’t perform that action at this time.
0 commit comments