This repository has been archived by the owner on Jun 4, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathWireMailMailgunConfig.php
77 lines (76 loc) · 2.54 KB
/
WireMailMailgunConfig.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<?php
/**
* Configuration for WireMailMailgun
*/
class WireMailMailgunConfig extends ModuleConfig
{
function __construct() {
$this->add(array(
array(
'name' => 'apiKey',
'label' => __('Mailgun API Key'),
'description' => __('You can find your API Key [on Mailgun](https://mailgun.com/app/domains)'),
'required' => true,
'type' => 'Text',
'columnWidth' => 50
),
array(
'name' => 'domain',
'label' => __('Domain Name'),
'description' => __('The domain name for this API key.'),
'required' => true,
'type' => 'Text',
'columnWidth' => 50
),
array(
'name' => 'fromEmail',
'label' => __('Default Sender Email Address'),
'description' => __('The "from" email address. When left empty, defaults to *processwire@[domainName]*.'),
'type' => 'Email',
'columnWidth' => 50
),
array(
'name' => 'fromName',
'label' => __('Default Sender Name'),
'description' => __('The "from" email name. When left empty, defaults to *ProcessWire*.'),
'type' => 'Text',
'columnWidth' => 50
),
array(
'name' => 'trackOpens',
'label' => __('Track Message Opens'),
'type' => 'Checkbox',
'value' => 'trackOpens',
'columnWidth' => 50
),
array(
'name' => 'trackClicks',
'label' => __('Track Message Clicks'),
'type' => 'Checkbox',
'value' => 'trackClicks',
'columnWidth' => 50
),
array(
'name' => 'testMode',
'label' => __('Enable Test Mode'),
'description' => __('When this option is enabled, Mailgun will accept messages but won\'t send them. [Click here for more information](https://documentation.mailgun.com/user_manual.html#sending-in-test-mode).'),
'type' => 'Checkbox',
'value' => 'testMode'
),
array(
'name' => 'disableSslCheck',
'label' => __('Disable cURL SSL Check'),
'description' => __("If you see the following error in ProcessWire Mailgun logs: *cURL Error: SSL certificate problem: unable to get local issuer certificate*.\nThis option will work around this issue. It might help on some development configurations, but it is recommended that you leave this option unchecked on production servers."),
'type' => 'Checkbox',
'value' => 'disableSslCheck'
),
array(
'name' => 'publicApiKey',
'label' => __('Mailgun Public API Key'),
'description' => __("You can find your Public API Key [on Mailgun](https://mailgun.com/app/dashboard)\nNote that the Public API Key is only required if you use the `validateEmail()` feature."),
'required' => false,
'type' => 'Text'
),
));
}
}