We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d3d1a56 commit 143a460Copy full SHA for 143a460
test.php
@@ -1,3 +1,31 @@
1
<?php
2
3
-require_once 'vendor/autoload.php';
+require_once 'vendor/autoload.php';
4
+
5
+use niklaslu\Mail;
6
7
+$mailConfig = [
8
+ 'host' => '',
9
+ 'username' => '',
10
+ 'password' => '',
11
+ 'post' => '',
12
+ // 'from' =>[
13
+ // 'address' => '',
14
+ // 'name' => ''
15
+ // ],
16
+ 'from' => '',
17
18
+];
19
20
+$mail = new Mail($mailConfig);
21
22
+$to = '[email protected]';
23
+$subject = '测试';
24
+$body = '<h3>测试内容</h3>';
25
+$res = $mail->sent($to, $subject, $body);
26
27
+if (!$res){
28
+ print_r($mail->getError());
29
+}else{
30
+ echo '成功';
31
+}
0 commit comments