· 10 years ago · Aug 01, 2016, 06:33 PM
1<?php
2return [
3 'acmailer_options' => [
4
5 // Default mail service
6 'default' => [
7 /**
8 * Tells which other mail service configuration to extend.
9 * The default service is usually the one that doesn't extend any other configuration, but others extend
10 * from it.
11 * By default, extends value is null.
12 */
13 //'extends' => null,
14
15 /***********
16 * ADAPTER *
17 ***********/
18
19 /**
20 * The mail adapter to be used.
21 * You can define any class implementing Zend\Mail\Transport\TransportInterface,
22 * either the fully qualified class name as string or the instance to be used.
23 *
24 * For standard mail transports, you can use these aliases:
25 * - sendmail => Zend\Mail\Transport\Sendmail
26 * - smtp => Zend\Mail\Transport\Smtp
27 * - file => Zend\Mail\Transport\File
28 * - null => Zend\Mail\Transport\Null (<=ZF2.3) or Zend\Mail\Transport\InMemory (>=ZF2.4)
29 * - in_memory => Zend\Mail\Transport\Null (<=ZF2.3) or Zend\Mail\Transport\InMemory (>=ZF2.4)
30 *
31 * If for some reason you need to use a custom adapter which is complex to be created, you can also define
32 * the name of a service that returns a Zend\Mail\Transport\TransportInterface instance. When the
33 * MailService is created, it will automatically check if this is an existing service.
34 *
35 * Default value is \Zend\Mail\Transport\Sendmail
36 */
37 //'mail_adapter' => '\Zend\Mail\Transport\Sendmail',
38 'mail_adapter' => 'Zend\Mail\Transport\Smtp',
39
40 /**
41 * An alias for the 'mail_adapter' option. Use just one or another.
42 */
43 //'transport' => '\Zend\Mail\Transport\Sendmail',
44
45
46 /************
47 * RENDERER *
48 ************/
49
50 /*
51 * The renderer service name to be used to render email templates.
52 * Default value is mailviewrenderer, which is an alias to the standard viewrenderer registered by Zend\Mvc
53 */
54 //'renderer' => 'mailviewrenderer',
55
56
57 /************************
58 * MESSAGE CONFIGURATION *
59 ************************/
60
61 'message_options' => [
62 /**
63 * From email address of the email.
64 *
65 * Default value is an empty string
66 */
67 //'from' => '',
68 'from' => '*@gmail.com',
69
70 /**
71 * From name to be displayed instead of from address.
72 *
73 * Default value is an empty string
74 */
75 //'from_name' => '',
76 'from_name' => '*@gmail.com',
77
78 /**
79 * ReplyTo email address of the email.
80 *
81 * Default value is an empty string
82 */
83 //'reply_to' => '',
84
85 /**
86 * ReplyTo name to be displayed instead of from address.
87 *
88 * Default value is an empty string
89 */
90 //'reply_to_name' => '',
91
92 /**
93 * Destination addresses of sent emails.
94 * It can be an email address as string or an array of email addresses.
95 *
96 * Default value is an empty array.
97 */
98 //'to' => [],
99 'to' => [
100 '*@gmail.com',
101 ],
102
103 /**
104 * Copy destination addresses of sent emails.
105 * It can be an email address as string or an array of email addresses.
106 *
107 * Default value is an empty array
108 */
109 //'cc' => [],
110
111 /**
112 * Hidden copy destination addresses of sent emails.
113 * It can be an email address as string or an array of email addresses.
114 *
115 * Default value is an empty array
116 */
117 //'bcc' => [],
118
119 /**
120 * Email subject.
121 *
122 * Default value is an empty string
123 */
124 //'subject' => '',
125
126 /**
127 * Email body.
128 * It can be a plain-text string, a HTML string or a template that will be computed at runtime.
129 * The 'content' property is used by default.
130 * To force a template configuration to be used, set 'use_template' to true.
131 *
132 * Default content is an empty string.
133 */
134 //'body' => [
135 //'content' => '',
136 //'charset' => 'utf-8',
137 //'use_template' => false,
138
139 /*
140 * Defines information to create the email body from a view partial.
141 * It defines template path and template params.
142 * The path will be resolved by a view resolver, so you need to place mail templates inside a view
143 * folder of one of your modules or customize your template map and template path stack.
144 * Params will be a group of key-value pairs.
145 *
146 * The 'children' property allows to define children for the template, in case you want to use
147 * layouts.
148 * You can define any number of children. The key in the array will be used as the 'capture_to'
149 * property when rendering the template.
150 * If you set the key 'content' to the child, you should have something like echo $this->content in
151 * you layout.
152 *
153 * Any child can have its own children, so you can nest views into other views recursively.
154 *
155 * By default no children are used
156 */
157 //'template' => [
158 // 'path' => 'ac-mailer/mail-templates/layout',
159 // 'params' => [],
160 // 'children' => [
161 // 'content' => [
162 // 'path' => 'ac-mailer/mail-templates/mail',
163 // 'params' => [],
164 // ]
165 // ],
166 // 'default_layout' => [
167 // 'path' => null,
168 // 'params' => [],
169 // 'template_capture_to' => 'content'
170 // ]
171 //],
172 //],
173
174 /**
175 * Attachments config.
176 * Allows to define an array of files that will be attached to the message,
177 * or even a directory that will be iterated to attach all found files.
178 * Set directory will only be iterated if 'iterate' property is true and 'path' is a valid
179 * directory.
180 * If 'recursive' is true all nested directories will be iterated too.
181 * If both files and dir are set, all files will be merged without duplication.
182 *
183 * By default the files array is empty and the directory won't be iterated
184 */
185 //'attachments' => [
186 // 'files' => [],
187 // 'dir' => [
188 // 'iterate' => false,
189 // 'path' => 'data/mail/attachments',
190 // 'recursive' => false,
191 // ],
192 //],
193 ],
194
195
196 /**********************
197 * SMTP CONFIGURATION *
198 **********************/
199
200 /**
201 * SMTP concrete options that will be used only when the adapter is a Zend\Mail\Transport\Smtp.
202 * This will be ignored otherwise.
203 *
204 * NOTE: It is a best practice to avoid committing credentials in Git. You can override these settings in
205 * a local.php config (which are gitignored by default) to create environment-specific settings and/or to
206 * avoid committing credentials to Git.
207 */
208 'smtp_options' => [
209 /**
210 * Hostname or IP address of the mail server.
211 *
212 * Default value is localhost
213 */
214 //'host' => 'localhost',
215 'host' => '...',
216
217 /**
218 * Port of the mail server.
219 *
220 * Default value is 25
221 */
222 //'port' => 25,
223 'port' => 587,
224
225 /**
226 * The connection class used for authentication.
227 * The value can be one of 'smtp', 'plain', 'login' or 'crammd5'.
228 *
229 * Default value is 'smtp'.
230 */
231 //'connection_class' => 'smtp',
232 'connection_class' => 'smtp',
233
234 //'connection_config' => [
235 /**
236 * The SMTP authentication identity.
237 * If this is not set, the 'from' option of the message will be used.
238 *
239 * Default value is an empty string
240 */
241 //'username' => '',
242 'username' => '*@gmail.com',
243
244 /**
245 * The SMTP authentication credential.
246 *
247 * Default value is an empty string
248 */
249 //'password' => '',
250 'password' => '...',
251
252 /**
253 * This defines the encryption type to be used, 'ssl' or 'tls'.
254 * Null should be used to disable SSL.
255 *
256 * Default value is null
257 */
258 //'ssl' => null,
259 'ssl' => 'tls',
260 //],
261 ],
262
263
264 /**********************
265 * FILE CONFIGURATION *
266 **********************/
267
268 /**
269 * File concrete options that will be used only when the adapter is a Zend\Mail\Transport\File.
270 * This will be ignored otherwise.
271 */
272 'file_options' => [
273 /**
274 * This is the folder where the file is going to be saved
275 *
276 * Default value is 'data/mail/output'
277 */
278 //'path' => 'data/mail/output',
279
280 /**
281 * A callable that will get the Zend\Mail\Transport\File object as an argument and should return the
282 * filename.
283 *
284 * Default value is null, in which case an empty callable will be used.
285 */
286 //'callback' => null,
287 ],
288
289
290 /*************
291 * LISTENERS *
292 *************/
293
294 /**
295 * A list of mail listeners that will be attached to the mail service when created.
296 * Each element can be either a string or a AcMailer\Event\MailListenerInterface instance.
297 * Each string will be checked as a service first. If a service is not found, it will be checked as a fully
298 * qualified class name and lazily created in that case.
299 * Anything else will throw a AcMailer\Exception\InvalidArgumentException.
300 *
301 * By default, the list of listeners is empty
302 */
303 //'mail_listeners' => [],
304 ],
305
306 /**
307 * You can define other service configurations here, with the same structure as in the 'default' block
308 */
309
310 ],
311];