Add new settings to set inactive subscriber period

[MAILPOET-1970]
This commit is contained in:
Ján Mikláš
2019-04-10 15:23:03 +02:00
committed by M. Shull
parent f6a30dba38
commit 54bc5513c1
2 changed files with 56 additions and 1 deletions

View File

@ -12,6 +12,7 @@ class SettingsController {
const DEFAULT_SENDING_METHOD = 'PHPMail'; const DEFAULT_SENDING_METHOD = 'PHPMail';
const DEFAULT_SENDING_FREQUENCY_EMAILS = 25; const DEFAULT_SENDING_FREQUENCY_EMAILS = 25;
const DEFAULT_SENDING_FREQUENCY_INTERVAL = 5; // in minutes const DEFAULT_SENDING_FREQUENCY_INTERVAL = 5; // in minutes
const DEFAULT_INACTIVE_SUBSCRIBER_DAYS = 180;
private static $loaded = false; private static $loaded = false;
@ -65,6 +66,7 @@ class SettingsController {
'enabled' => false, 'enabled' => false,
], ],
'display_nps_poll' => true, 'display_nps_poll' => true,
'inactive_subscriber_days' => self::DEFAULT_INACTIVE_SUBSCRIBER_DAYS,
]; ];
} }
return $this->defaults; return $this->defaults;

View File

@ -9,7 +9,7 @@
<p class="description"> <p class="description">
<%= __('Your bounced emails will be sent to this address.') %> <%= __('Your bounced emails will be sent to this address.') %>
<a href="http://beta.docs.mailpoet.com/article/180-how-bounce-management-works-in-mailpoet-3" <a href="http://beta.docs.mailpoet.com/article/180-how-bounce-management-works-in-mailpoet-3"
target="_blank" target="_blank"
><%= _x('Read more.', 'support article link label') %></a> ><%= _x('Read more.', 'support article link label') %></a>
</p> </p>
</th> </th>
@ -159,6 +159,59 @@
</p> </p>
</td> </td>
</tr> </tr>
<!-- inactive subscribers -->
<tr>
<th scope="row">
<label>
<%= __('Stop sending to inactive subscribers') %>
</label>
<p class="description">
<%= __("Gmail, Yahoo and other email providers will treat your emails like spam if your subscribers don't open your emails in the long run. This option will mark your subscribers as Inactive and MailPoet will stop sending to them.") %>
</p>
</th>
<td>
<p>
<label>
<input
type="radio"
name="inactive_subscriber_days"
value=""
<% if not(settings.inactive_subscriber_days) %>checked="checked"<% endif %>
/><%= __('Never') %>
</label>
</p>
<p>
<label>
<input
type="radio"
name="inactive_subscriber_days"
value="90"
<% if (settings.inactive_subscriber_days == 90) %>checked="checked"<% endif %>
/><%= __('After 3 months (recommended if you send once a day)') %>
</label>
</p>
<p>
<label>
<input
type="radio"
name="inactive_subscriber_days"
value="180"
<% if (settings.inactive_subscriber_days == 180) %>checked="checked"<% endif %>
/><%= __('After 6 months (default, recommended if you send at least once a month)')%>
</label>
</p>
<p>
<label>
<input
type="radio"
name="inactive_subscriber_days"
value="365"
<% if (settings.inactive_subscriber_days == 365) %>checked="checked"<% endif %>
/><%= __('After 12 months') %>
</label>
</p>
</td>
</tr>
<!-- share anonymous data? --> <!-- share anonymous data? -->
<tr> <tr>
<th scope="row"> <th scope="row">