Skip to content

Commit b0512fc

Browse files
committed
implemented dotkernel/dot-mail 5.0
Signed-off-by: MarioRadu <[email protected]>
1 parent 922ae5a commit b0512fc

File tree

2 files changed

+46
-58
lines changed

2 files changed

+46
-58
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"dotkernel/dot-flashmessenger": "^3.4.2",
3939
"dotkernel/dot-geoip": "^3.6.0",
4040
"dotkernel/dot-helpers": "^3.4.2",
41-
"dotkernel/dot-mail": "^4.1.1",
41+
"dotkernel/dot-mail": "^5.1.0",
4242
"dotkernel/dot-navigation": "^3.4.2",
4343
"dotkernel/dot-rbac-guard": "^3.4.2",
4444
"dotkernel/dot-session": "^5.6.0",

config/autoload/mail.local.php.dist

Lines changed: 45 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -4,47 +4,38 @@ declare(strict_types=1);
44

55
return [
66
/**
7-
* Dk mail module configuration
8-
* Note that many of these options can be set programmatically too,
9-
* when sending mail messages actually that is what you'll usually do,
10-
* these configs provide just default and options that remain the same for all mails
7+
* Dotkernel mail module configuration
8+
* Note that many of these options can be set programmatically too, when sending mail messages actually that is
9+
* what you'll usually do, these configs provide just defaults and options that remain the same for all mails
1110
*/
1211
'dot_mail' => [
13-
// the key is the mail service name, this is the default one, which does not extend any configuration
12+
//the key is the mail service name, this is the default one, which does not extend any configuration
1413
'default' => [
15-
// tells which other mail service configuration to extend
16-
'extends' => null,
17-
/**
18-
* the mail transport to use
19-
* can be any class implementing Laminas\Mail\Transport\TransportInterface
20-
*
21-
* for standard mail transports, you can use these aliases
22-
* - sendmail => Laminas\Mail\Transport\Sendmail
23-
* - smtp => Laminas\Mail\Transport\Smtp
24-
* - file => Laminas\Mail\Transport\File
25-
* - in_memory => Laminas\Mail\Transport\InMemory
26-
*
27-
* defaults to sendmail
28-
**/
29-
'transport' => Laminas\Mail\Transport\Sendmail::class,
30-
// Uncomment the below line if you want to save a copy of all sent emails to a certain IMAP folder
31-
// Valid only if the Transport is SMTP
32-
// 'save_sent_message_folder' => ['INBOX.Sent'],
33-
// message configuration
14+
//message configuration
3415
'message_options' => [
35-
'from' => '',
36-
'from_name' => 'Dotkernel',
37-
'reply_to' => '',
16+
//from email address of the email
17+
'from' => '',
18+
//from name to be displayed instead of from address
19+
'from_name' => '',
20+
//reply-to email address of the email
21+
'reply_to' => '',
22+
//replyTo name to be displayed instead of the address
3823
'reply_to_name' => '',
39-
'to' => [],
40-
'cc' => [],
41-
'bcc' => [],
42-
'subject' => '',
43-
'body' => [
24+
//destination email address as string or a list of email addresses
25+
'to' => [],
26+
//copy destination addresses
27+
'cc' => [],
28+
//hidden copy destination addresses
29+
'bcc' => [],
30+
//email subject
31+
'subject' => '',
32+
//body options - content can be plain text, HTML
33+
'body' => [
4434
'content' => '',
4535
'charset' => 'utf-8',
4636
],
47-
'attachments' => [
37+
//attachments config
38+
'attachments' => [
4839
'files' => [],
4940
'dir' => [
5041
'iterate' => false,
@@ -53,40 +44,37 @@ return [
5344
],
5445
],
5546
],
56-
// options that will be used only if Laminas\Mail\Transport\Smtp adapter is used
47+
/**
48+
* the mail transport to use can be any class implementing
49+
* Symfony\Component\Mailer\Transport\TransportInterface
50+
*
51+
* for standard mail transports, you can use these aliases:
52+
* - sendmail => Symfony\Component\Mailer\Transport\SendmailTransport
53+
* - esmtp => Symfony\Component\Mailer\Transport\Smtp\EsmtpTransport
54+
*
55+
* defaults to sendmail
56+
**/
57+
'transport' => 'sendmail',
58+
//options that will be used only if esmtp adapter is used
5759
'smtp_options' => [
58-
'host' => '',
60+
//hostname or IP address of the mail server
61+
'host' => '',
62+
//port of the mail server - 587 or 465 for secure connections
5963
'port' => 587,
60-
'connection_class' => 'login',
6164
'connection_config' => [
65+
//the smtp authentication identity
6266
'username' => '',
67+
//the smtp authentication credential
6368
'password' => '',
64-
'ssl' => 'ssl',
69+
//to disable auto_tls set tls key to false
70+
//it's not recommended to disable TLS while connecting to an SMTP server
71+
'tls' => null,
6572
],
6673
],
67-
// file options that will be used only if the adapter is Laminas\Mail\Transport\File
68-
// 'file_options' => [
69-
// 'path' => 'data/mail/output',
70-
// //a callable that will get the Laminas\Mail\Transport\File object as an argument
71-
// //and should return the filename if null is used, and empty callable will be used
72-
// 'callback' => null,
73-
// ],
74-
// listeners to register with the mail service, for mail events
75-
'event_listeners' => [
76-
// [
77-
// 'type' => 'service or class name',
78-
// 'priority' => 1,
79-
// ],
80-
],
8174
],
82-
// option to log the SENT emails
75+
// option to log the SENT emails
8376
'log' => [
8477
'sent' => getcwd() . '/log/mail/sent.log',
8578
],
86-
87-
/**
88-
* You can define other mail services here, with the same structure as the default block
89-
* you can even extend from the default block, and overwrite only the differences
90-
*/
9179
],
9280
];

0 commit comments

Comments
 (0)