Skip to content

Commit 143a460

Browse files
committed
ad
1 parent d3d1a56 commit 143a460

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

test.php

+29-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,31 @@
11
<?php
22

3-
require_once 'vendor/autoload.php';
3+
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+
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

Comments
 (0)