1 | <?php |
||||
2 | |||||
3 | namespace Helick\Mail; |
||||
4 | |||||
5 | /** |
||||
6 | * Get the mail host. |
||||
7 | * |
||||
8 | * @return string |
||||
9 | */ |
||||
10 | function host(): string |
||||
11 | { |
||||
12 | return defined('MAIL_HOST') ? MAIL_HOST : ''; |
||||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||||
13 | } |
||||
14 | |||||
15 | /** |
||||
16 | * Get the mail port. |
||||
17 | * |
||||
18 | * @return int |
||||
19 | */ |
||||
20 | function port(): int |
||||
21 | { |
||||
22 | return defined('MAIL_PORT') ? MAIL_PORT : 587; |
||||
0 ignored issues
–
show
|
|||||
23 | } |
||||
24 | |||||
25 | /** |
||||
26 | * Get the mail user. |
||||
27 | * |
||||
28 | * @return string |
||||
29 | */ |
||||
30 | function user(): string |
||||
31 | { |
||||
32 | return defined('MAIL_USER') ? MAIL_USER : ''; |
||||
0 ignored issues
–
show
|
|||||
33 | } |
||||
34 | |||||
35 | /** |
||||
36 | * Get the mail password. |
||||
37 | * |
||||
38 | * @return string |
||||
39 | */ |
||||
40 | function password(): string |
||||
41 | { |
||||
42 | return defined('MAIL_PASSWORD') ? MAIL_PASSWORD : ''; |
||||
0 ignored issues
–
show
|
|||||
43 | } |
||||
44 | |||||
45 | /** |
||||
46 | * Get the mail "From Name" header. |
||||
47 | * |
||||
48 | * @return string |
||||
49 | */ |
||||
50 | function from_name(): string |
||||
51 | { |
||||
52 | return defined('MAIL_FROM_NAME') |
||||
53 | ? MAIL_FROM_NAME |
||||
0 ignored issues
–
show
|
|||||
54 | : get_bloginfo('blogname', 'raw'); |
||||
0 ignored issues
–
show
The function
get_bloginfo was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
55 | } |
||||
56 | |||||
57 | /** |
||||
58 | * Get the mail "From Address" header. |
||||
59 | * |
||||
60 | * @return string |
||||
61 | */ |
||||
62 | function from_address(): string |
||||
63 | { |
||||
64 | return defined('MAIL_FROM_ADDRESS') |
||||
65 | ? MAIL_FROM_ADDRESS |
||||
0 ignored issues
–
show
|
|||||
66 | : get_bloginfo('admin_email', 'raw'); |
||||
0 ignored issues
–
show
The function
get_bloginfo was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
67 | } |
||||
68 |