MailPoet Newsletters (New) - Version 3.0.0-beta.36.3.0

Version Description

  • 2017-07-11 =
  • Added: migration script for MailPoet 2 users now imports settings;
  • Fixed: emails are sorted by date sent instead of modified date; thanks Scott
  • Fixed: cursor doesn't get stuck on "move" icon when editing text;
  • Fixed: repeated subscriptions don't duplicate welcome notifications; thanks Luc
Download this release

Release Info

Developer wysija
Plugin Icon 128x128 MailPoet Newsletters (New)
Version 3.0.0-beta.36.3.0
Comparing to
See all releases

Code changes from version 3.0.0-beta.36.2.0 to 3.0.0-beta.36.3.0

Files changed (57) hide show
  1. assets/css/manifest.json +1 -1
  2. assets/css/{newsletter_editor.f6da21d2.css → newsletter_editor.aace9f8f.css} +6 -0
  3. assets/js/{admin.080e0640.js → admin.65d0dc6d.js} +81 -113
  4. assets/js/{admin_vendor.ad6d7a22.js → admin_vendor.927b0f96.js} +137 -105
  5. assets/js/{form_editor.4902de9a.js → form_editor.e0b22679.js} +0 -0
  6. assets/js/{mailpoet.684f3a3c.js → mailpoet.0ebf4b66.js} +4 -4
  7. assets/js/manifest.json +8 -8
  8. assets/js/{mp2migrator.3f76aefe.js → mp2migrator.f7fa3be5.js} +20 -0
  9. assets/js/{newsletter_editor.e810c798.js → newsletter_editor.7d386d8d.js} +5 -4
  10. assets/js/{public.2ca16875.js → public.0e89cdab.js} +4 -4
  11. assets/js/{vendor.25e2ce6a.js → vendor.c136ccd7.js} +1 -1
  12. lang/index.php +0 -3
  13. lang/mailpoet-es_ES.mo +0 -0
  14. lang/mailpoet-it_IT.mo +0 -0
  15. lang/mailpoet.pot +358 -346
  16. lib/API/JSON/v1/Services.php +20 -4
  17. lib/Config/Database.php +2 -0
  18. lib/Config/MP2Migrator.php +187 -8
  19. lib/Config/Migrator.php +22 -0
  20. lib/Config/Populator.php +103 -27
  21. lib/Config/RequirementsChecker.php +8 -4
  22. lib/Config/ServicesChecker.php +8 -4
  23. lib/Cron/Triggers/WordPress.php +9 -9
  24. lib/Cron/Workers/Bounce.php +13 -13
  25. lib/Cron/Workers/KeyCheck/KeyCheckWorker.php +3 -3
  26. lib/Cron/Workers/SendingQueue/SendingQueue.php +2 -2
  27. lib/Cron/Workers/SendingQueue/Tasks/Newsletter.php +4 -2
  28. lib/Cron/Workers/SimpleWorker.php +42 -43
  29. lib/Form/Widget.php +7 -0
  30. lib/Models/Newsletter.php +9 -2
  31. lib/Models/ScheduledTask.php +96 -0
  32. lib/Models/Subscriber.php +5 -10
  33. lib/Newsletter/Scheduler/Scheduler.php +4 -0
  34. lib/Subscription/Pages.php +10 -10
  35. lib/Twig/Filters.php +2 -26
  36. lib/Util/Helpers.php +17 -8
  37. lib/Util/ProgressBar.php +9 -1
  38. mailpoet.php +2 -2
  39. readme.txt +25 -17
  40. vendor/autoload.php +1 -1
  41. vendor/composer/ClassLoader.php +38 -8
  42. vendor/composer/autoload_classmap.php +1 -0
  43. vendor/composer/autoload_real.php +8 -8
  44. vendor/composer/autoload_static.php +6 -5
  45. vendor/composer/installed.json +13 -13
  46. views/form/editor.html +8 -14
  47. views/forms.html +1 -1
  48. views/mp2migration.html +12 -8
  49. views/newsletters.html +1 -1
  50. views/premium.html +3 -3
  51. views/settings/advanced.html +1 -1
  52. views/settings/mta.html +568 -485
  53. views/settings/premium.html +2 -2
  54. views/subscribers/importExport/import.html +1 -1
  55. views/subscribers/importExport/import/step1.html +3 -3
  56. views/subscribers/importExport/import/step2.html +1 -1
  57. views/welcome.html +7 -0
assets/css/manifest.json CHANGED
@@ -1,7 +1,7 @@
1
  {
2
  "admin.css": "admin.c73ddfe6.css",
3
  "importExport.css": "importExport.b3745466.css",
4
- "newsletter_editor.css": "newsletter_editor.f6da21d2.css",
5
  "public.css": "public.cae357df.css",
6
  "rtl.css": "rtl.d41d8cd9.css"
7
  }
1
  {
2
  "admin.css": "admin.c73ddfe6.css",
3
  "importExport.css": "importExport.b3745466.css",
4
+ "newsletter_editor.css": "newsletter_editor.aace9f8f.css",
5
  "public.css": "public.cae357df.css",
6
  "rtl.css": "rtl.d41d8cd9.css"
7
  }
assets/css/{newsletter_editor.f6da21d2.css → newsletter_editor.aace9f8f.css} RENAMED
@@ -1853,6 +1853,12 @@ input.mailpoet_option_offset_left_small {
1853
  box-shadow: inset 1px 2px 1px #025c80;
1854
  color: #fff;
1855
  }
 
 
 
 
 
 
1856
  .mailpoet_resize_handle_container {
1857
  position: absolute;
1858
  bottom: 0;
1853
  box-shadow: inset 1px 2px 1px #025c80;
1854
  color: #fff;
1855
  }
1856
+ .mailpoet_droppable_block {
1857
+ cursor: move;
1858
+ }
1859
+ .mailpoet_droppable_block.mailpoet_ignore_drag {
1860
+ cursor: auto;
1861
+ }
1862
  .mailpoet_resize_handle_container {
1863
  position: absolute;
1864
  bottom: 0;
assets/js/{admin.080e0640.js → admin.65d0dc6d.js} RENAMED
@@ -3091,17 +3091,6 @@ webpackJsonp([0],[
3091
  })();
3092
  }
3093
 
3094
- var avatar = false;
3095
- if (subscriber.avatar_url) {
3096
- avatar = _react2['default'].createElement('img', {
3097
- className: 'avatar',
3098
- src: subscriber.avatar_url,
3099
- title: '',
3100
- width: '32',
3101
- height: '32'
3102
- });
3103
- }
3104
-
3105
  return _react2['default'].createElement(
3106
  'div',
3107
  null,
@@ -3258,7 +3247,7 @@ webpackJsonp([0],[
3258
  this.setupSelect2();
3259
  }
3260
  },
3261
- componentDidUpdate: function componentDidUpdate(prevProps, prevState) {
3262
  if (this.props.item !== undefined && prevProps.item !== undefined && this.props.item.id !== prevProps.item.id) {
3263
  jQuery('#' + this.refs.select.id).val(this.getSelectedValues()).trigger('change');
3264
  }
@@ -3294,7 +3283,7 @@ webpackJsonp([0],[
3294
  });
3295
 
3296
  var hasRemoved = false;
3297
- select2.on('select2:unselecting', function (e) {
3298
  hasRemoved = true;
3299
  });
3300
  select2.on('select2:opening', function (e) {
@@ -9295,7 +9284,7 @@ webpackJsonp([0],[
9295
  }
9296
  };
9297
 
9298
- var afterFormContent = function afterFormContent(subscriber) {
9299
  return React.createElement(
9300
  'p',
9301
  { className: 'description' },
@@ -9416,7 +9405,7 @@ webpackJsonp([0],[
9416
  loading: false,
9417
  item: response.data
9418
  });
9419
- }).fail(function (response) {
9420
  _this.setState({
9421
  loading: false,
9422
  item: {}
@@ -9441,15 +9430,15 @@ webpackJsonp([0],[
9441
 
9442
  // only get values from displayed fields
9443
  var item = {};
9444
- this.props.fields.map((function (field) {
9445
  if (field['fields'] !== undefined) {
9446
- field.fields.map((function (subfield) {
9447
- item[subfield.name] = this.state.item[subfield.name];
9448
- }).bind(this));
9449
  } else {
9450
- item[field.name] = this.state.item[field.name];
9451
  }
9452
- }).bind(this));
9453
  // set id if specified
9454
  if (this.props.params.id !== undefined) {
9455
  item.id = this.props.params.id;
@@ -9462,7 +9451,7 @@ webpackJsonp([0],[
9462
  data: item
9463
  }).always(function () {
9464
  _this2.setState({ loading: false });
9465
- }).done(function (response) {
9466
  if (_this2.props.onSuccess !== undefined) {
9467
  _this2.props.onSuccess();
9468
  } else {
@@ -9496,6 +9485,8 @@ webpackJsonp([0],[
9496
  }
9497
  },
9498
  render: function render() {
 
 
9499
  if (this.getErrors() !== undefined) {
9500
  var errors = this.getErrors().map(function (error, index) {
9501
  return React.createElement(
@@ -9519,13 +9510,13 @@ webpackJsonp([0],[
9519
  afterFormContent = this.props.afterFormContent(this.getValues());
9520
  }
9521
 
9522
- var fields = this.props.fields.map((function (field, i) {
9523
  return React.createElement(FormField, {
9524
  field: field,
9525
- item: this.getValues(),
9526
- onValueChange: this.handleValueChange,
9527
  key: 'field-' + i });
9528
- }).bind(this));
9529
 
9530
  var actions = false;
9531
  if (this.props.children) {
@@ -9649,17 +9640,19 @@ webpackJsonp([0],[
9649
  }
9650
  },
9651
  render: function render() {
 
 
9652
  var field = false;
9653
 
9654
  if (this.props.field['fields'] !== undefined) {
9655
- field = this.props.field.fields.map((function (subfield, index) {
9656
- return this.renderField({
9657
  index: index,
9658
  field: subfield,
9659
- item: this.props.item,
9660
- onValueChange: this.props.onValueChange || false
9661
  });
9662
- }).bind(this));
9663
  } else {
9664
  field = this.renderField(this.props);
9665
  }
@@ -9874,7 +9867,7 @@ webpackJsonp([0],[
9874
  }
9875
 
9876
  var currentYear = Moment().year();
9877
- for (var i = currentYear; i >= currentYear - yearsRange; i--) {
9878
  years.push(React.createElement(
9879
  'option',
9880
  {
@@ -9921,7 +9914,7 @@ webpackJsonp([0],[
9921
  ));
9922
  }
9923
 
9924
- for (var i = 1; i <= 12; i++) {
9925
  months.push(React.createElement(
9926
  'option',
9927
  {
@@ -9968,7 +9961,7 @@ webpackJsonp([0],[
9968
  ));
9969
  }
9970
 
9971
- for (var i = 1; i <= 31; i++) {
9972
  days.push(React.createElement(
9973
  'option',
9974
  {
@@ -10015,7 +10008,7 @@ webpackJsonp([0],[
10015
  }
10016
  }, {
10017
  key: 'componentDidUpdate',
10018
- value: function componentDidUpdate(prevProps, prevState) {
10019
  if (this.props.item !== undefined && prevProps.item !== undefined && this.props.item.id !== prevProps.item.id) {
10020
  this.extractDateParts();
10021
  }
@@ -26331,6 +26324,12 @@ webpackJsonp([0],[
26331
  loading: false
26332
  });
26333
  }
 
 
 
 
 
 
26334
  });
26335
  },
26336
  handleSelectTemplate: function handleSelectTemplate(template) {
@@ -26372,8 +26371,14 @@ webpackJsonp([0],[
26372
  data: {
26373
  id: template.id
26374
  }
26375
- }).done(function (response) {
26376
  _this3.getTemplates();
 
 
 
 
 
 
26377
  });
26378
  } else {
26379
  this.setState({ loading: false });
@@ -26390,7 +26395,9 @@ webpackJsonp([0],[
26390
  this.getTemplates();
26391
  },
26392
  render: function render() {
26393
- var templates = this.state.templates.map((function (template, index) {
 
 
26394
  var deleteLink = React.createElement(
26395
  'div',
26396
  { className: 'mailpoet_delete' },
@@ -26398,7 +26405,7 @@ webpackJsonp([0],[
26398
  'a',
26399
  {
26400
  href: 'javascript:;',
26401
- onClick: this.handleDeleteTemplate.bind(null, template)
26402
  },
26403
  MailPoet.I18n.t('delete')
26404
  )
@@ -26408,7 +26415,7 @@ webpackJsonp([0],[
26408
  if (typeof template.thumbnail === 'string' && template.thumbnail.length > 0) {
26409
  thumbnail = React.createElement(
26410
  'a',
26411
- { href: 'javascript:;', onClick: this.handleShowTemplate.bind(null, template) },
26412
  React.createElement('img', { src: template.thumbnail }),
26413
  React.createElement('div', { className: 'mailpoet_overlay' })
26414
  );
@@ -26443,7 +26450,7 @@ webpackJsonp([0],[
26443
  'a',
26444
  {
26445
  className: 'button button-secondary',
26446
- onClick: this.handleShowTemplate.bind(null, template)
26447
  },
26448
  MailPoet.I18n.t('preview')
26449
  ),
@@ -26452,14 +26459,14 @@ webpackJsonp([0],[
26452
  'a',
26453
  {
26454
  className: 'button button-primary',
26455
- onClick: this.handleSelectTemplate.bind(null, template)
26456
  },
26457
  MailPoet.I18n.t('select')
26458
  )
26459
  ),
26460
  template.readonly === "1" ? false : deleteLink
26461
  );
26462
- }).bind(this));
26463
 
26464
  var boxClasses = classNames('mailpoet_boxes', 'clearfix', { 'mailpoet_boxes_loading': this.state.loading });
26465
 
@@ -26556,7 +26563,7 @@ webpackJsonp([0],[
26556
  item: response.data,
26557
  fields: _this.getFieldsByNewsletter(response.data)
26558
  });
26559
- }).fail(function (response) {
26560
  _this.setState({
26561
  loading: false,
26562
  item: {}
@@ -26628,7 +26635,7 @@ webpackJsonp([0],[
26628
 
26629
  e.preventDefault();
26630
 
26631
- this._save(e).done(function (response) {
26632
  MailPoet.Notice.success(MailPoet.I18n.t('newsletterUpdated'));
26633
  }).done(function () {
26634
  _this3.context.router.push('/' + (_this3.state.item.type || ''));
@@ -26638,13 +26645,13 @@ webpackJsonp([0],[
26638
  e.preventDefault();
26639
  var redirectTo = e.target.href;
26640
 
26641
- this._save(e).done(function (response) {
26642
  MailPoet.Notice.success(MailPoet.I18n.t('newsletterUpdated'));
26643
  }).done(function () {
26644
  window.location = redirectTo;
26645
  }).fail(this._showError);
26646
  },
26647
- _save: function _save(e) {
26648
  var _this4 = this;
26649
 
26650
  var data = this.state.item;
@@ -26745,10 +26752,9 @@ webpackJsonp([0],[
26745
 
26746
  var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
26747
 
26748
- !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(2), __webpack_require__(273), __webpack_require__(278), __webpack_require__(274), __webpack_require__(422), __webpack_require__(295), __webpack_require__(293), __webpack_require__(291)], __WEBPACK_AMD_DEFINE_RESULT__ = function (React, jQuery, _, MailPoet, Hooks, Checkbox, Select, Text) {
26749
 
26750
- var settings = window.mailpoet_settings || {},
26751
- currentTime = window.mailpoet_current_time || '00:00',
26752
  defaultDateTime = window.mailpoet_current_date + ' ' + '00:00:00';
26753
  timeOfDayItems = window.mailpoet_schedule_time_of_day, dateDisplayFormat = window.mailpoet_date_display_format, dateStorageFormat = window.mailpoet_date_storage_format;
26754
 
@@ -27036,7 +27042,7 @@ webpackJsonp([0],[
27036
  return !!!segment.deleted_at;
27037
  },
27038
  getLabel: function getLabel(segment) {
27039
- return segment.name + ' (' + parseInt(segment.subscribers).toLocaleString() + ')';
27040
  },
27041
  transformChangedValue: function transformChangedValue(segment_ids) {
27042
  var all_segments = this.state.items;
@@ -27094,7 +27100,7 @@ webpackJsonp([0],[
27094
  fields = Hooks.applyFilters('mailpoet_newsletters_3rd_step_fields', fields);
27095
 
27096
  return {
27097
- getFields: function getFields(newsletter) {
27098
  return fields;
27099
  },
27100
  getSendButtonOptions: function getSendButtonOptions(newsletter) {
@@ -27122,8 +27128,6 @@ webpackJsonp([0],[
27122
 
27123
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(274), __webpack_require__(422), __webpack_require__(431), __webpack_require__(278)], __WEBPACK_AMD_DEFINE_RESULT__ = function (MailPoet, Hooks, Scheduling, _) {
27124
 
27125
- var settings = window.mailpoet_settings || {};
27126
-
27127
  var fields = [{
27128
  name: 'subject',
27129
  label: MailPoet.I18n.t('subjectLine'),
@@ -27152,7 +27156,7 @@ webpackJsonp([0],[
27152
  return !!!segment.deleted_at;
27153
  },
27154
  getLabel: function getLabel(segment) {
27155
- return segment.name + ' (' + parseInt(segment.subscribers).toLocaleString() + ')';
27156
  },
27157
  transformChangedValue: function transformChangedValue(segment_ids) {
27158
  var all_segments = this.state.items;
@@ -27205,10 +27209,10 @@ webpackJsonp([0],[
27205
  fields = Hooks.applyFilters('mailpoet_newsletters_3rd_step_fields', fields);
27206
 
27207
  return {
27208
- getFields: function getFields(newsletter) {
27209
  return fields;
27210
  },
27211
- getSendButtonOptions: function getSendButtonOptions(newsletter) {
27212
  return {
27213
  value: MailPoet.I18n.t('activate')
27214
  };
@@ -27358,8 +27362,6 @@ webpackJsonp([0],[
27358
 
27359
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(274), __webpack_require__(422), __webpack_require__(434)], __WEBPACK_AMD_DEFINE_RESULT__ = function (MailPoet, Hooks, Scheduling) {
27360
 
27361
- var settings = window.mailpoet_settings || {};
27362
-
27363
  var fields = [{
27364
  name: 'subject',
27365
  label: MailPoet.I18n.t('subjectLine'),
@@ -27413,10 +27415,10 @@ webpackJsonp([0],[
27413
  fields = Hooks.applyFilters('mailpoet_newsletters_3rd_step_fields', fields);
27414
 
27415
  return {
27416
- getFields: function getFields(newsletter) {
27417
  return fields;
27418
  },
27419
- getSendButtonOptions: function getSendButtonOptions(newsletter) {
27420
  return {
27421
  value: MailPoet.I18n.t('activate')
27422
  };
@@ -27613,7 +27615,6 @@ webpackJsonp([0],[
27613
  var _newslettersListingsMixinsJsx = __webpack_require__(440);
27614
 
27615
  var mailpoet_tracking_enabled = !!window['mailpoet_tracking_enabled'];
27616
- var mailpoet_settings = window.mailpoet_settings || {};
27617
 
27618
  var messages = {
27619
  onTrash: function onTrash(response) {
@@ -27666,8 +27667,8 @@ webpackJsonp([0],[
27666
  label: _mailpoet2['default'].I18n.t('statistics'),
27667
  display: mailpoet_tracking_enabled
27668
  }, {
27669
- name: 'updated_at',
27670
- label: _mailpoet2['default'].I18n.t('lastModifiedOn'),
27671
  sortable: true
27672
  }];
27673
 
@@ -27771,11 +27772,11 @@ webpackJsonp([0],[
27771
  ) : null,
27772
  _react2['default'].createElement(
27773
  'td',
27774
- { className: 'column-date', 'data-colname': _mailpoet2['default'].I18n.t('lastModifiedOn') },
27775
  _react2['default'].createElement(
27776
  'abbr',
27777
  null,
27778
- _mailpoet2['default'].Date.format(newsletter.updated_at)
27779
  )
27780
  )
27781
  );
@@ -27809,7 +27810,7 @@ webpackJsonp([0],[
27809
  item_actions: newsletter_actions,
27810
  messages: messages,
27811
  auto_refresh: true,
27812
- sort_by: 'updated_at',
27813
  sort_order: 'desc',
27814
  afterGetItems: this.checkMailerStatus
27815
  })
@@ -28279,7 +28280,7 @@ webpackJsonp([0],[
28279
  },
28280
  getMailerError: function getMailerError(state) {
28281
  var mailer_error_notice = undefined;
28282
- var mailer_check_settings_notice = (0, _reactStringReplace2['default'])(_mailpoet2['default'].I18n.t('mailerCheckSettingsNotice'), /\[link\](.*?)\[\/link\]/g, function (match, i) {
28283
  return _react2['default'].createElement(
28284
  'a',
28285
  { href: '?page=mailpoet-settings#mta' },
@@ -28371,8 +28372,6 @@ webpackJsonp([0],[
28371
 
28372
  var _reactRouter = __webpack_require__(180);
28373
 
28374
- var _history = __webpack_require__(243);
28375
-
28376
  var _listingListingJsx = __webpack_require__(276);
28377
 
28378
  var _listingListingJsx2 = _interopRequireDefault(_listingListingJsx);
@@ -28387,10 +28386,6 @@ webpackJsonp([0],[
28387
 
28388
  var _classnames2 = _interopRequireDefault(_classnames);
28389
 
28390
- var _jquery = __webpack_require__(273);
28391
-
28392
- var _jquery2 = _interopRequireDefault(_jquery);
28393
-
28394
  var _mailpoet = __webpack_require__(274);
28395
 
28396
  var _mailpoet2 = _interopRequireDefault(_mailpoet);
@@ -28406,7 +28401,6 @@ webpackJsonp([0],[
28406
  var mailpoet_roles = window.mailpoet_roles || {};
28407
  var mailpoet_segments = window.mailpoet_segments || {};
28408
  var mailpoet_tracking_enabled = !!window['mailpoet_tracking_enabled'];
28409
- var mailpoet_settings = window.mailpoet_settings || {};
28410
 
28411
  var messages = {
28412
  onTrash: function onTrash(response) {
@@ -28528,8 +28522,7 @@ webpackJsonp([0],[
28528
  });
28529
  },
28530
  renderStatus: function renderStatus(newsletter) {
28531
- var total_sent = undefined;
28532
- total_sent = _mailpoet2['default'].I18n.t('sentToXSubscribers').replace('%$1d', newsletter.total_sent.toLocaleString());
28533
 
28534
  return _react2['default'].createElement(
28535
  'div',
@@ -28726,8 +28719,6 @@ webpackJsonp([0],[
28726
 
28727
  var _reactRouter = __webpack_require__(180);
28728
 
28729
- var _history = __webpack_require__(243);
28730
-
28731
  var _listingListingJsx = __webpack_require__(276);
28732
 
28733
  var _listingListingJsx2 = _interopRequireDefault(_listingListingJsx);
@@ -28742,18 +28733,12 @@ webpackJsonp([0],[
28742
 
28743
  var _classnames2 = _interopRequireDefault(_classnames);
28744
 
28745
- var _jquery = __webpack_require__(273);
28746
-
28747
- var _jquery2 = _interopRequireDefault(_jquery);
28748
-
28749
  var _mailpoet = __webpack_require__(274);
28750
 
28751
  var _mailpoet2 = _interopRequireDefault(_mailpoet);
28752
 
28753
  var _newslettersSchedulingCommonJsx = __webpack_require__(432);
28754
 
28755
- var mailpoet_settings = window.mailpoet_settings || {};
28756
-
28757
  var messages = {
28758
  onTrash: function onTrash(response) {
28759
  var count = ~ ~response.meta.count;
@@ -29084,10 +29069,6 @@ webpackJsonp([0],[
29084
 
29085
  var _classnames2 = _interopRequireDefault(_classnames);
29086
 
29087
- var _jquery = __webpack_require__(273);
29088
-
29089
- var _jquery2 = _interopRequireDefault(_jquery);
29090
-
29091
  var _mailpoet = __webpack_require__(274);
29092
 
29093
  var _mailpoet2 = _interopRequireDefault(_mailpoet);
@@ -29107,7 +29088,6 @@ webpackJsonp([0],[
29107
  var _newslettersListingsMixinsJsx = __webpack_require__(440);
29108
 
29109
  var mailpoet_tracking_enabled = !!window['mailpoet_tracking_enabled'];
29110
- var mailpoet_settings = window.mailpoet_settings || {};
29111
 
29112
  var columns = [{
29113
  name: 'subject',
@@ -29123,7 +29103,7 @@ webpackJsonp([0],[
29123
  label: _mailpoet2['default'].I18n.t('statistics'),
29124
  display: mailpoet_tracking_enabled
29125
  }, {
29126
- name: 'processed_at',
29127
  label: _mailpoet2['default'].I18n.t('sentOn')
29128
  }];
29129
 
@@ -29144,13 +29124,6 @@ webpackJsonp([0],[
29144
  displayName: 'NewsletterListNotificationHistory',
29145
 
29146
  mixins: [_newslettersListingsMixinsJsx.QueueMixin, _newslettersListingsMixinsJsx.StatisticsMixin, _newslettersListingsMixinsJsx.MailerMixin],
29147
- renderSentDate: function renderSentDate(newsletter) {
29148
- return newsletter.queue.status === 'completed' ? _react2['default'].createElement(
29149
- 'abbr',
29150
- null,
29151
- _mailpoet2['default'].Date.format(newsletter.updated_at)
29152
- ) : _mailpoet2['default'].I18n.t('notSentYet');
29153
- },
29154
  renderItem: function renderItem(newsletter, actions, meta) {
29155
  var rowClasses = (0, _classnames2['default'])('manage-column', 'column-primary', 'has-row-actions');
29156
 
@@ -29158,8 +29131,6 @@ webpackJsonp([0],[
29158
  return segment.name;
29159
  }).join(', ');
29160
 
29161
- var mailer_log = window.mailpoet_settings.mta_log || {};
29162
-
29163
  return _react2['default'].createElement(
29164
  'div',
29165
  null,
@@ -29197,8 +29168,8 @@ webpackJsonp([0],[
29197
  ) : null,
29198
  _react2['default'].createElement(
29199
  'td',
29200
- { className: 'column-date', 'data-colname': _mailpoet2['default'].I18n.t('lastModifiedOn') },
29201
- this.renderSentDate(newsletter)
29202
  )
29203
  );
29204
  },
@@ -29237,7 +29208,7 @@ webpackJsonp([0],[
29237
  columns: columns,
29238
  item_actions: newsletter_actions,
29239
  auto_refresh: true,
29240
- sort_by: 'updated_at',
29241
  sort_order: 'desc',
29242
  afterGetItems: this.checkMailerStatus
29243
  })
@@ -29316,10 +29287,6 @@ webpackJsonp([0],[
29316
 
29317
  var _reactRouter = __webpack_require__(180);
29318
 
29319
- var _jquery = __webpack_require__(273);
29320
-
29321
- var _jquery2 = _interopRequireDefault(_jquery);
29322
-
29323
  var _mailpoet = __webpack_require__(274);
29324
 
29325
  var _mailpoet2 = _interopRequireDefault(_mailpoet);
@@ -29436,7 +29403,7 @@ webpackJsonp([0],[
29436
  }
29437
  }, {
29438
  name: 'read_more',
29439
- link: function link(item) {
29440
  return _react2['default'].createElement(
29441
  'a',
29442
  {
@@ -29464,6 +29431,13 @@ webpackJsonp([0],[
29464
  _mailpoet2['default'].Notice.success(_mailpoet2['default'].I18n.t('listSynchronized').replace('%$1s', item.name));
29465
  refresh();
29466
  }
 
 
 
 
 
 
 
29467
  });
29468
  },
29469
  display: function display(segment) {
@@ -29741,12 +29715,6 @@ webpackJsonp([0],[
29741
 
29742
  var _react2 = _interopRequireDefault(_react);
29743
 
29744
- var _reactDom = __webpack_require__(34);
29745
-
29746
- var _reactDom2 = _interopRequireDefault(_reactDom);
29747
-
29748
- var _reactRouter = __webpack_require__(180);
29749
-
29750
  var _listingListingJsx = __webpack_require__(276);
29751
 
29752
  var _listingListingJsx2 = _interopRequireDefault(_listingListingJsx);
3091
  })();
3092
  }
3093
 
 
 
 
 
 
 
 
 
 
 
 
3094
  return _react2['default'].createElement(
3095
  'div',
3096
  null,
3247
  this.setupSelect2();
3248
  }
3249
  },
3250
+ componentDidUpdate: function componentDidUpdate(prevProps) {
3251
  if (this.props.item !== undefined && prevProps.item !== undefined && this.props.item.id !== prevProps.item.id) {
3252
  jQuery('#' + this.refs.select.id).val(this.getSelectedValues()).trigger('change');
3253
  }
3283
  });
3284
 
3285
  var hasRemoved = false;
3286
+ select2.on('select2:unselecting', function () {
3287
  hasRemoved = true;
3288
  });
3289
  select2.on('select2:opening', function (e) {
9284
  }
9285
  };
9286
 
9287
+ var afterFormContent = function afterFormContent() {
9288
  return React.createElement(
9289
  'p',
9290
  { className: 'description' },
9405
  loading: false,
9406
  item: response.data
9407
  });
9408
+ }).fail(function () {
9409
  _this.setState({
9410
  loading: false,
9411
  item: {}
9430
 
9431
  // only get values from displayed fields
9432
  var item = {};
9433
+ this.props.fields.map(function (field) {
9434
  if (field['fields'] !== undefined) {
9435
+ field.fields.map(function (subfield) {
9436
+ item[subfield.name] = _this2.state.item[subfield.name];
9437
+ });
9438
  } else {
9439
+ item[field.name] = _this2.state.item[field.name];
9440
  }
9441
+ });
9442
  // set id if specified
9443
  if (this.props.params.id !== undefined) {
9444
  item.id = this.props.params.id;
9451
  data: item
9452
  }).always(function () {
9453
  _this2.setState({ loading: false });
9454
+ }).done(function () {
9455
  if (_this2.props.onSuccess !== undefined) {
9456
  _this2.props.onSuccess();
9457
  } else {
9485
  }
9486
  },
9487
  render: function render() {
9488
+ var _this3 = this;
9489
+
9490
  if (this.getErrors() !== undefined) {
9491
  var errors = this.getErrors().map(function (error, index) {
9492
  return React.createElement(
9510
  afterFormContent = this.props.afterFormContent(this.getValues());
9511
  }
9512
 
9513
+ var fields = this.props.fields.map(function (field, i) {
9514
  return React.createElement(FormField, {
9515
  field: field,
9516
+ item: _this3.getValues(),
9517
+ onValueChange: _this3.handleValueChange,
9518
  key: 'field-' + i });
9519
+ });
9520
 
9521
  var actions = false;
9522
  if (this.props.children) {
9640
  }
9641
  },
9642
  render: function render() {
9643
+ var _this = this;
9644
+
9645
  var field = false;
9646
 
9647
  if (this.props.field['fields'] !== undefined) {
9648
+ field = this.props.field.fields.map(function (subfield, index) {
9649
+ return _this.renderField({
9650
  index: index,
9651
  field: subfield,
9652
+ item: _this.props.item,
9653
+ onValueChange: _this.props.onValueChange || false
9654
  });
9655
+ });
9656
  } else {
9657
  field = this.renderField(this.props);
9658
  }
9867
  }
9868
 
9869
  var currentYear = Moment().year();
9870
+ for (var i = currentYear; i >= currentYear - yearsRange; i -= 1) {
9871
  years.push(React.createElement(
9872
  'option',
9873
  {
9914
  ));
9915
  }
9916
 
9917
+ for (var i = 1; i <= 12; i += 1) {
9918
  months.push(React.createElement(
9919
  'option',
9920
  {
9961
  ));
9962
  }
9963
 
9964
+ for (var i = 1; i <= 31; i += 1) {
9965
  days.push(React.createElement(
9966
  'option',
9967
  {
10008
  }
10009
  }, {
10010
  key: 'componentDidUpdate',
10011
+ value: function componentDidUpdate(prevProps) {
10012
  if (this.props.item !== undefined && prevProps.item !== undefined && this.props.item.id !== prevProps.item.id) {
10013
  this.extractDateParts();
10014
  }
26324
  loading: false
26325
  });
26326
  }
26327
+ }).fail(function (response) {
26328
+ if (response.errors.length > 0) {
26329
+ MailPoet.Notice.error(response.errors.map(function (error) {
26330
+ return error.message;
26331
+ }), { scroll: true });
26332
+ }
26333
  });
26334
  },
26335
  handleSelectTemplate: function handleSelectTemplate(template) {
26371
  data: {
26372
  id: template.id
26373
  }
26374
+ }).done(function () {
26375
  _this3.getTemplates();
26376
+ }).fail(function (response) {
26377
+ if (response.errors.length > 0) {
26378
+ MailPoet.Notice.error(response.errors.map(function (error) {
26379
+ return error.message;
26380
+ }), { scroll: true });
26381
+ }
26382
  });
26383
  } else {
26384
  this.setState({ loading: false });
26395
  this.getTemplates();
26396
  },
26397
  render: function render() {
26398
+ var _this4 = this;
26399
+
26400
+ var templates = this.state.templates.map(function (template, index) {
26401
  var deleteLink = React.createElement(
26402
  'div',
26403
  { className: 'mailpoet_delete' },
26405
  'a',
26406
  {
26407
  href: 'javascript:;',
26408
+ onClick: _this4.handleDeleteTemplate.bind(null, template)
26409
  },
26410
  MailPoet.I18n.t('delete')
26411
  )
26415
  if (typeof template.thumbnail === 'string' && template.thumbnail.length > 0) {
26416
  thumbnail = React.createElement(
26417
  'a',
26418
+ { href: 'javascript:;', onClick: _this4.handleShowTemplate.bind(null, template) },
26419
  React.createElement('img', { src: template.thumbnail }),
26420
  React.createElement('div', { className: 'mailpoet_overlay' })
26421
  );
26450
  'a',
26451
  {
26452
  className: 'button button-secondary',
26453
+ onClick: _this4.handleShowTemplate.bind(null, template)
26454
  },
26455
  MailPoet.I18n.t('preview')
26456
  ),
26459
  'a',
26460
  {
26461
  className: 'button button-primary',
26462
+ onClick: _this4.handleSelectTemplate.bind(null, template)
26463
  },
26464
  MailPoet.I18n.t('select')
26465
  )
26466
  ),
26467
  template.readonly === "1" ? false : deleteLink
26468
  );
26469
+ });
26470
 
26471
  var boxClasses = classNames('mailpoet_boxes', 'clearfix', { 'mailpoet_boxes_loading': this.state.loading });
26472
 
26563
  item: response.data,
26564
  fields: _this.getFieldsByNewsletter(response.data)
26565
  });
26566
+ }).fail(function () {
26567
  _this.setState({
26568
  loading: false,
26569
  item: {}
26635
 
26636
  e.preventDefault();
26637
 
26638
+ this._save(e).done(function () {
26639
  MailPoet.Notice.success(MailPoet.I18n.t('newsletterUpdated'));
26640
  }).done(function () {
26641
  _this3.context.router.push('/' + (_this3.state.item.type || ''));
26645
  e.preventDefault();
26646
  var redirectTo = e.target.href;
26647
 
26648
+ this._save(e).done(function () {
26649
  MailPoet.Notice.success(MailPoet.I18n.t('newsletterUpdated'));
26650
  }).done(function () {
26651
  window.location = redirectTo;
26652
  }).fail(this._showError);
26653
  },
26654
+ _save: function _save() {
26655
  var _this4 = this;
26656
 
26657
  var data = this.state.item;
26752
 
26753
  var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
26754
 
26755
+ !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(2), __webpack_require__(273), __webpack_require__(278), __webpack_require__(274), __webpack_require__(422)], __WEBPACK_AMD_DEFINE_RESULT__ = function (React, jQuery, _, MailPoet, Hooks) {
26756
 
26757
+ var currentTime = window.mailpoet_current_time || '00:00',
 
26758
  defaultDateTime = window.mailpoet_current_date + ' ' + '00:00:00';
26759
  timeOfDayItems = window.mailpoet_schedule_time_of_day, dateDisplayFormat = window.mailpoet_date_display_format, dateStorageFormat = window.mailpoet_date_storage_format;
26760
 
27042
  return !!!segment.deleted_at;
27043
  },
27044
  getLabel: function getLabel(segment) {
27045
+ return segment.name + ' (' + parseInt(segment.subscribers, 10).toLocaleString() + ')';
27046
  },
27047
  transformChangedValue: function transformChangedValue(segment_ids) {
27048
  var all_segments = this.state.items;
27100
  fields = Hooks.applyFilters('mailpoet_newsletters_3rd_step_fields', fields);
27101
 
27102
  return {
27103
+ getFields: function getFields() {
27104
  return fields;
27105
  },
27106
  getSendButtonOptions: function getSendButtonOptions(newsletter) {
27128
 
27129
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(274), __webpack_require__(422), __webpack_require__(431), __webpack_require__(278)], __WEBPACK_AMD_DEFINE_RESULT__ = function (MailPoet, Hooks, Scheduling, _) {
27130
 
 
 
27131
  var fields = [{
27132
  name: 'subject',
27133
  label: MailPoet.I18n.t('subjectLine'),
27156
  return !!!segment.deleted_at;
27157
  },
27158
  getLabel: function getLabel(segment) {
27159
+ return segment.name + ' (' + parseInt(segment.subscribers, 10).toLocaleString() + ')';
27160
  },
27161
  transformChangedValue: function transformChangedValue(segment_ids) {
27162
  var all_segments = this.state.items;
27209
  fields = Hooks.applyFilters('mailpoet_newsletters_3rd_step_fields', fields);
27210
 
27211
  return {
27212
+ getFields: function getFields() {
27213
  return fields;
27214
  },
27215
+ getSendButtonOptions: function getSendButtonOptions() {
27216
  return {
27217
  value: MailPoet.I18n.t('activate')
27218
  };
27362
 
27363
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(274), __webpack_require__(422), __webpack_require__(434)], __WEBPACK_AMD_DEFINE_RESULT__ = function (MailPoet, Hooks, Scheduling) {
27364
 
 
 
27365
  var fields = [{
27366
  name: 'subject',
27367
  label: MailPoet.I18n.t('subjectLine'),
27415
  fields = Hooks.applyFilters('mailpoet_newsletters_3rd_step_fields', fields);
27416
 
27417
  return {
27418
+ getFields: function getFields() {
27419
  return fields;
27420
  },
27421
+ getSendButtonOptions: function getSendButtonOptions() {
27422
  return {
27423
  value: MailPoet.I18n.t('activate')
27424
  };
27615
  var _newslettersListingsMixinsJsx = __webpack_require__(440);
27616
 
27617
  var mailpoet_tracking_enabled = !!window['mailpoet_tracking_enabled'];
 
27618
 
27619
  var messages = {
27620
  onTrash: function onTrash(response) {
27667
  label: _mailpoet2['default'].I18n.t('statistics'),
27668
  display: mailpoet_tracking_enabled
27669
  }, {
27670
+ name: 'sent_at',
27671
+ label: _mailpoet2['default'].I18n.t('sentOn'),
27672
  sortable: true
27673
  }];
27674
 
27772
  ) : null,
27773
  _react2['default'].createElement(
27774
  'td',
27775
+ { className: 'column-date', 'data-colname': _mailpoet2['default'].I18n.t('sentOn') },
27776
  _react2['default'].createElement(
27777
  'abbr',
27778
  null,
27779
+ newsletter.sent_at ? _mailpoet2['default'].Date.format(newsletter.sent_at) : _mailpoet2['default'].I18n.t('notSentYet')
27780
  )
27781
  )
27782
  );
27810
  item_actions: newsletter_actions,
27811
  messages: messages,
27812
  auto_refresh: true,
27813
+ sort_by: 'sent_at',
27814
  sort_order: 'desc',
27815
  afterGetItems: this.checkMailerStatus
27816
  })
28280
  },
28281
  getMailerError: function getMailerError(state) {
28282
  var mailer_error_notice = undefined;
28283
+ var mailer_check_settings_notice = (0, _reactStringReplace2['default'])(_mailpoet2['default'].I18n.t('mailerCheckSettingsNotice'), /\[link\](.*?)\[\/link\]/g, function (match) {
28284
  return _react2['default'].createElement(
28285
  'a',
28286
  { href: '?page=mailpoet-settings#mta' },
28372
 
28373
  var _reactRouter = __webpack_require__(180);
28374
 
 
 
28375
  var _listingListingJsx = __webpack_require__(276);
28376
 
28377
  var _listingListingJsx2 = _interopRequireDefault(_listingListingJsx);
28386
 
28387
  var _classnames2 = _interopRequireDefault(_classnames);
28388
 
 
 
 
 
28389
  var _mailpoet = __webpack_require__(274);
28390
 
28391
  var _mailpoet2 = _interopRequireDefault(_mailpoet);
28401
  var mailpoet_roles = window.mailpoet_roles || {};
28402
  var mailpoet_segments = window.mailpoet_segments || {};
28403
  var mailpoet_tracking_enabled = !!window['mailpoet_tracking_enabled'];
 
28404
 
28405
  var messages = {
28406
  onTrash: function onTrash(response) {
28522
  });
28523
  },
28524
  renderStatus: function renderStatus(newsletter) {
28525
+ var total_sent = _mailpoet2['default'].I18n.t('sentToXSubscribers').replace('%$1d', newsletter.total_sent.toLocaleString());
 
28526
 
28527
  return _react2['default'].createElement(
28528
  'div',
28719
 
28720
  var _reactRouter = __webpack_require__(180);
28721
 
 
 
28722
  var _listingListingJsx = __webpack_require__(276);
28723
 
28724
  var _listingListingJsx2 = _interopRequireDefault(_listingListingJsx);
28733
 
28734
  var _classnames2 = _interopRequireDefault(_classnames);
28735
 
 
 
 
 
28736
  var _mailpoet = __webpack_require__(274);
28737
 
28738
  var _mailpoet2 = _interopRequireDefault(_mailpoet);
28739
 
28740
  var _newslettersSchedulingCommonJsx = __webpack_require__(432);
28741
 
 
 
28742
  var messages = {
28743
  onTrash: function onTrash(response) {
28744
  var count = ~ ~response.meta.count;
29069
 
29070
  var _classnames2 = _interopRequireDefault(_classnames);
29071
 
 
 
 
 
29072
  var _mailpoet = __webpack_require__(274);
29073
 
29074
  var _mailpoet2 = _interopRequireDefault(_mailpoet);
29088
  var _newslettersListingsMixinsJsx = __webpack_require__(440);
29089
 
29090
  var mailpoet_tracking_enabled = !!window['mailpoet_tracking_enabled'];
 
29091
 
29092
  var columns = [{
29093
  name: 'subject',
29103
  label: _mailpoet2['default'].I18n.t('statistics'),
29104
  display: mailpoet_tracking_enabled
29105
  }, {
29106
+ name: 'sent_at',
29107
  label: _mailpoet2['default'].I18n.t('sentOn')
29108
  }];
29109
 
29124
  displayName: 'NewsletterListNotificationHistory',
29125
 
29126
  mixins: [_newslettersListingsMixinsJsx.QueueMixin, _newslettersListingsMixinsJsx.StatisticsMixin, _newslettersListingsMixinsJsx.MailerMixin],
 
 
 
 
 
 
 
29127
  renderItem: function renderItem(newsletter, actions, meta) {
29128
  var rowClasses = (0, _classnames2['default'])('manage-column', 'column-primary', 'has-row-actions');
29129
 
29131
  return segment.name;
29132
  }).join(', ');
29133
 
 
 
29134
  return _react2['default'].createElement(
29135
  'div',
29136
  null,
29168
  ) : null,
29169
  _react2['default'].createElement(
29170
  'td',
29171
+ { className: 'column-date', 'data-colname': _mailpoet2['default'].I18n.t('sentOn') },
29172
+ newsletter.sent_at ? _mailpoet2['default'].Date.format(newsletter.sent_at) : _mailpoet2['default'].I18n.t('notSentYet')
29173
  )
29174
  );
29175
  },
29208
  columns: columns,
29209
  item_actions: newsletter_actions,
29210
  auto_refresh: true,
29211
+ sort_by: 'sent_at',
29212
  sort_order: 'desc',
29213
  afterGetItems: this.checkMailerStatus
29214
  })
29287
 
29288
  var _reactRouter = __webpack_require__(180);
29289
 
 
 
 
 
29290
  var _mailpoet = __webpack_require__(274);
29291
 
29292
  var _mailpoet2 = _interopRequireDefault(_mailpoet);
29403
  }
29404
  }, {
29405
  name: 'read_more',
29406
+ link: function link() {
29407
  return _react2['default'].createElement(
29408
  'a',
29409
  {
29431
  _mailpoet2['default'].Notice.success(_mailpoet2['default'].I18n.t('listSynchronized').replace('%$1s', item.name));
29432
  refresh();
29433
  }
29434
+ }).fail(function (response) {
29435
+ _mailpoet2['default'].Modal.loading(false);
29436
+ if (response.errors.length > 0) {
29437
+ _mailpoet2['default'].Notice.error(response.errors.map(function (error) {
29438
+ return error.message;
29439
+ }), { scroll: true });
29440
+ }
29441
  });
29442
  },
29443
  display: function display(segment) {
29715
 
29716
  var _react2 = _interopRequireDefault(_react);
29717
 
 
 
 
 
 
 
29718
  var _listingListingJsx = __webpack_require__(276);
29719
 
29720
  var _listingListingJsx2 = _interopRequireDefault(_listingListingJsx);
assets/js/{admin_vendor.ad6d7a22.js → admin_vendor.927b0f96.js} RENAMED
@@ -28313,7 +28313,7 @@ webpackJsonp([1],[
28313
  handleDeleteItem: function handleDeleteItem(id) {
28314
  this.props.onDeleteItem(id);
28315
  },
28316
- handleToggleItem: function handleToggleItem(id) {
28317
  this.setState({ expanded: !this.state.expanded });
28318
  },
28319
  render: function render() {
@@ -28345,9 +28345,9 @@ webpackJsonp([1],[
28345
  if (custom_actions.length > 0) {
28346
  (function () {
28347
  var is_first = true;
28348
- item_actions = custom_actions.map((function (action, index) {
28349
  if (action.display !== undefined) {
28350
- if (action.display(this.props.item) === false) {
28351
  return;
28352
  }
28353
  }
@@ -28363,7 +28363,7 @@ webpackJsonp([1],[
28363
  'a',
28364
  {
28365
  href: 'javascript:;',
28366
- onClick: this.handleTrashItem.bind(null, this.props.item.id) },
28367
  _mailpoet2['default'].I18n.t('moveToTrash')
28368
  )
28369
  );
@@ -28371,10 +28371,10 @@ webpackJsonp([1],[
28371
  custom_action = _react2['default'].createElement(
28372
  'span',
28373
  {
28374
- onClick: this.props.onRefreshItems,
28375
  key: 'action-' + index, className: action.name },
28376
  !is_first ? ' | ' : '',
28377
- action.link(this.props.item)
28378
  );
28379
  } else if (action.link) {
28380
  custom_action = _react2['default'].createElement(
@@ -28382,7 +28382,7 @@ webpackJsonp([1],[
28382
  {
28383
  key: 'action-' + index, className: action.name },
28384
  !is_first ? ' | ' : '',
28385
- action.link(this.props.item)
28386
  );
28387
  } else {
28388
  custom_action = _react2['default'].createElement(
@@ -28392,7 +28392,7 @@ webpackJsonp([1],[
28392
  !is_first ? ' | ' : '',
28393
  _react2['default'].createElement(
28394
  'a',
28395
- { href: 'javascript:;', onClick: action.onClick !== undefined ? action.onClick.bind(null, this.props.item, this.props.onRefreshItems) : false },
28396
  action.label
28397
  )
28398
  );
@@ -28403,7 +28403,7 @@ webpackJsonp([1],[
28403
  }
28404
 
28405
  return custom_action;
28406
- }).bind(_this));
28407
  })();
28408
  } else {
28409
  item_actions = _react2['default'].createElement(
@@ -28503,6 +28503,8 @@ webpackJsonp([1],[
28503
  displayName: 'ListingItems',
28504
 
28505
  render: function render() {
 
 
28506
  if (this.props.items.length === 0) {
28507
  var message = undefined;
28508
  if (this.props.loading === true) {
@@ -28550,25 +28552,25 @@ webpackJsonp([1],[
28550
  )
28551
  )
28552
  ),
28553
- this.props.items.map((function (item, index) {
28554
  item.id = parseInt(item.id, 10);
28555
- item.selected = this.props.selected_ids.indexOf(item.id) !== -1;
28556
 
28557
  return _react2['default'].createElement(ListingItem, {
28558
- columns: this.props.columns,
28559
- onSelectItem: this.props.onSelectItem,
28560
- onRenderItem: this.props.onRenderItem,
28561
- onDeleteItem: this.props.onDeleteItem,
28562
- onRestoreItem: this.props.onRestoreItem,
28563
- onTrashItem: this.props.onTrashItem,
28564
- onRefreshItems: this.props.onRefreshItems,
28565
- selection: this.props.selection,
28566
- is_selectable: this.props.is_selectable,
28567
- item_actions: this.props.item_actions,
28568
- group: this.props.group,
28569
  key: 'item-' + item.id + '-' + index,
28570
  item: item });
28571
- }).bind(this))
28572
  );
28573
  }
28574
  }
@@ -28605,13 +28607,13 @@ webpackJsonp([1],[
28605
  return [matches[1], matches[2]];
28606
  },
28607
  initWithParams: function initWithParams(params) {
28608
- var _this2 = this;
28609
 
28610
  var state = this.getInitialState();
28611
  // check for url params
28612
  if (params.splat) {
28613
  params.splat.split('/').map(function (param) {
28614
- var _getParam = _this2.getParam(param);
28615
 
28616
  var _getParam2 = _slicedToArray(_getParam, 2);
28617
 
@@ -28655,9 +28657,9 @@ webpackJsonp([1],[
28655
  state.sort_order = this.props.sort_order;
28656
  }
28657
 
28658
- this.setState(state, (function () {
28659
- this.getItems();
28660
- }).bind(this));
28661
  },
28662
  getParams: function getParams() {
28663
  // get all route parameters (without the "splat")
@@ -28671,13 +28673,13 @@ webpackJsonp([1],[
28671
  return params;
28672
  },
28673
  setParams: function setParams() {
28674
- var _this3 = this;
28675
 
28676
  if (this.props.location) {
28677
  var params = Object.keys(this.state).filter(function (key) {
28678
  return ['group', 'filter', 'search', 'page', 'sort_by', 'sort_order'].indexOf(key) !== -1;
28679
  }).map(function (key) {
28680
- var value = _this3.state[key];
28681
  if (value === Object(value)) {
28682
  value = _jquery2['default'].param(value);
28683
  } else if (value === Boolean(value)) {
@@ -28710,11 +28712,11 @@ webpackJsonp([1],[
28710
  }
28711
  },
28712
  setBaseUrlParams: function setBaseUrlParams(base_url) {
28713
- var _this4 = this;
28714
 
28715
  if (base_url.indexOf(':') !== -1) {
28716
  (function () {
28717
- var params = _this4.getParams();
28718
  Object.keys(params).map(function (key) {
28719
  if (base_url.indexOf(':' + key) !== -1) {
28720
  base_url = base_url.replace(':' + key, params[key]);
@@ -28726,14 +28728,16 @@ webpackJsonp([1],[
28726
  return base_url;
28727
  },
28728
  componentDidMount: function componentDidMount() {
 
 
28729
  if (this.isMounted()) {
28730
  var params = this.props.params || {};
28731
  this.initWithParams(params);
28732
 
28733
  if (this.props.auto_refresh) {
28734
- (0, _jquery2['default'])(document).on('heartbeat-tick.mailpoet', (function (e, data) {
28735
- this.getItems();
28736
- }).bind(this));
28737
  }
28738
  }
28739
  },
@@ -28742,7 +28746,7 @@ webpackJsonp([1],[
28742
  this.initWithParams(params);
28743
  },
28744
  getItems: function getItems() {
28745
- var _this5 = this;
28746
 
28747
  if (this.isMounted()) {
28748
  this.setState({ loading: true });
@@ -28764,9 +28768,9 @@ webpackJsonp([1],[
28764
  sort_order: this.state.sort_order
28765
  }
28766
  }).always(function () {
28767
- _this5.setState({ loading: false });
28768
  }).done(function (response) {
28769
- _this5.setState({
28770
  items: response.data || [],
28771
  filters: response.meta.filters || {},
28772
  groups: response.meta.groups || [],
@@ -28774,14 +28778,14 @@ webpackJsonp([1],[
28774
  meta: _underscore2['default'].omit(response.meta, ['filters', 'groups', 'count'])
28775
  }, function () {
28776
  // if viewing an empty trash
28777
- if (_this5.state.group === 'trash' && response.meta.count === 0) {
28778
  // redirect to default group
28779
- _this5.handleGroup('all');
28780
  }
28781
 
28782
  // trigger afterGetItems callback if specified
28783
- if (_this5.props.afterGetItems !== undefined) {
28784
- _this5.props.afterGetItems(_this5.state);
28785
  }
28786
  });
28787
  }).fail(function (response) {
@@ -28794,7 +28798,7 @@ webpackJsonp([1],[
28794
  }
28795
  },
28796
  handleRestoreItem: function handleRestoreItem(id) {
28797
- var _this6 = this;
28798
 
28799
  this.setState({
28800
  loading: true,
@@ -28809,10 +28813,10 @@ webpackJsonp([1],[
28809
  id: id
28810
  }
28811
  }).done(function (response) {
28812
- if (_this6.props.messages !== undefined && _this6.props.messages['onRestore'] !== undefined) {
28813
- _this6.props.messages.onRestore(response);
28814
  }
28815
- _this6.getItems();
28816
  }).fail(function (response) {
28817
  _mailpoet2['default'].Notice.error(response.errors.map(function (error) {
28818
  return error.message;
@@ -28820,7 +28824,7 @@ webpackJsonp([1],[
28820
  });
28821
  },
28822
  handleTrashItem: function handleTrashItem(id) {
28823
- var _this7 = this;
28824
 
28825
  this.setState({
28826
  loading: true,
@@ -28835,10 +28839,10 @@ webpackJsonp([1],[
28835
  id: id
28836
  }
28837
  }).done(function (response) {
28838
- if (_this7.props.messages !== undefined && _this7.props.messages['onTrash'] !== undefined) {
28839
- _this7.props.messages.onTrash(response);
28840
  }
28841
- _this7.getItems();
28842
  }).fail(function (response) {
28843
  _mailpoet2['default'].Notice.error(response.errors.map(function (error) {
28844
  return error.message;
@@ -28846,7 +28850,7 @@ webpackJsonp([1],[
28846
  });
28847
  },
28848
  handleDeleteItem: function handleDeleteItem(id) {
28849
- var _this8 = this;
28850
 
28851
  this.setState({
28852
  loading: true,
@@ -28861,10 +28865,10 @@ webpackJsonp([1],[
28861
  id: id
28862
  }
28863
  }).done(function (response) {
28864
- if (_this8.props.messages !== undefined && _this8.props.messages['onDelete'] !== undefined) {
28865
- _this8.props.messages.onDelete(response);
28866
  }
28867
- _this8.getItems();
28868
  }).fail(function (response) {
28869
  _mailpoet2['default'].Notice.error(response.errors.map(function (error) {
28870
  return error.message;
@@ -28872,7 +28876,7 @@ webpackJsonp([1],[
28872
  });
28873
  },
28874
  handleEmptyTrash: function handleEmptyTrash() {
28875
- var _this9 = this;
28876
 
28877
  return this.handleBulkAction('all', {
28878
  action: 'delete',
@@ -28880,7 +28884,7 @@ webpackJsonp([1],[
28880
  }).done(function (response) {
28881
  _mailpoet2['default'].Notice.success(_mailpoet2['default'].I18n.t('permanentlyDeleted').replace('%d', response.meta.count));
28882
  // redirect to default group
28883
- _this9.handleGroup('all');
28884
  }).fail(function (response) {
28885
  _mailpoet2['default'].Notice.error(response.errors.map(function (error) {
28886
  return error.message;
@@ -28888,7 +28892,7 @@ webpackJsonp([1],[
28888
  });
28889
  },
28890
  handleBulkAction: function handleBulkAction(selected_ids, params) {
28891
- var _this10 = this;
28892
 
28893
  if (this.state.selection === false && this.state.selected_ids.length === 0 && selected_ids !== 'all') {
28894
  return false;
@@ -28915,28 +28919,38 @@ webpackJsonp([1],[
28915
  action: 'bulkAction',
28916
  data: data
28917
  }).done(function () {
28918
- _this10.getItems();
 
 
 
 
 
 
28919
  });
28920
  },
28921
  handleSearch: function handleSearch(search) {
 
 
28922
  this.setState({
28923
  search: search,
28924
  page: 1,
28925
  selection: false,
28926
  selected_ids: []
28927
- }, (function () {
28928
- this.setParams();
28929
- }).bind(this));
28930
  },
28931
  handleSort: function handleSort(sort_by) {
 
 
28932
  var sort_order = arguments.length <= 1 || arguments[1] === undefined ? 'asc' : arguments[1];
28933
 
28934
  this.setState({
28935
  sort_by: sort_by,
28936
  sort_order: sort_order === 'asc' ? 'asc' : 'desc'
28937
- }, (function () {
28938
- this.setParams();
28939
- }).bind(this));
28940
  },
28941
  handleSelectItem: function handleSelectItem(id, is_checked) {
28942
  var selected_ids = this.state.selected_ids,
@@ -28988,14 +29002,18 @@ webpackJsonp([1],[
28988
  });
28989
  },
28990
  handleFilter: function handleFilter(filters) {
 
 
28991
  this.setState({
28992
  filter: filters,
28993
  page: 1
28994
- }, (function () {
28995
- this.setParams();
28996
- }).bind(this));
28997
  },
28998
  handleGroup: function handleGroup(group) {
 
 
28999
  // reset search
29000
  (0, _jquery2['default'])('#search_input').val('');
29001
 
@@ -29004,18 +29022,20 @@ webpackJsonp([1],[
29004
  filter: {},
29005
  search: '',
29006
  page: 1
29007
- }, (function () {
29008
- this.setParams();
29009
- }).bind(this));
29010
  },
29011
  handleSetPage: function handleSetPage(page) {
 
 
29012
  this.setState({
29013
  page: page,
29014
  selection: false,
29015
  selected_ids: []
29016
- }, (function () {
29017
- this.setParams();
29018
- }).bind(this));
29019
  },
29020
  handleRenderItem: function handleRenderItem(item, actions) {
29021
  var render = this.props.onRenderItem(item, actions, this.state.meta);
@@ -30753,19 +30773,21 @@ webpackJsonp([1],[
30753
  };
30754
  },
30755
  handleChangeAction: function handleChangeAction(e) {
 
 
30756
  this.setState({
30757
  action: e.target.value,
30758
  extra: false
30759
- }, (function () {
30760
- var action = this.getSelectedAction();
30761
 
30762
  // action on select callback
30763
  if (action !== null && action['onSelect'] !== undefined) {
30764
- this.setState({
30765
  extra: action.onSelect(e)
30766
  });
30767
  }
30768
- }).bind(this));
30769
  },
30770
  handleApplyAction: function handleApplyAction(e) {
30771
  e.preventDefault();
@@ -30840,7 +30862,7 @@ webpackJsonp([1],[
30840
  { value: '' },
30841
  MailPoet.I18n.t('bulkActions')
30842
  ),
30843
- this.props.bulk_actions.map((function (action, index) {
30844
  return React.createElement(
30845
  'option',
30846
  {
@@ -30849,7 +30871,7 @@ webpackJsonp([1],[
30849
  },
30850
  action.label
30851
  );
30852
- }).bind(this))
30853
  ),
30854
  React.createElement('input', {
30855
  onClick: this.handleApplyAction,
@@ -30891,15 +30913,17 @@ webpackJsonp([1],[
30891
  return this.props.onSelectItems(this.refs.toggle.checked);
30892
  },
30893
  render: function render() {
30894
- var columns = this.props.columns.map((function (column, index) {
 
 
30895
  column.is_primary = index === 0;
30896
- column.sorted = this.props.sort_by === column.name ? this.props.sort_order : 'desc';
30897
  return _react2['default'].createElement(ListingColumn, {
30898
- onSort: this.props.onSort,
30899
- sort_by: this.props.sort_by,
30900
  key: 'column-' + index,
30901
  column: column });
30902
- }).bind(this));
30903
 
30904
  var checkbox = undefined;
30905
 
@@ -30989,11 +31013,13 @@ webpackJsonp([1],[
30989
  };
30990
  },
30991
  setPage: function setPage(page) {
 
 
30992
  this.setState({
30993
  page: null
30994
- }, (function () {
30995
- this.props.onSetPage(this.constrainPage(page));
30996
- }).bind(this));
30997
  },
30998
  setFirstPage: function setFirstPage() {
30999
  this.setPage(1);
@@ -31271,12 +31297,14 @@ webpackJsonp([1],[
31271
  return this.props.onSelectGroup(group);
31272
  },
31273
  render: function render() {
31274
- var groups = this.props.groups.map((function (group, index) {
 
 
31275
  if (group.name === 'trash' && group.count === 0) {
31276
  return false;
31277
  }
31278
 
31279
- var classes = classNames({ 'current': group.name === this.props.group });
31280
 
31281
  return React.createElement(
31282
  'li',
@@ -31287,7 +31315,7 @@ webpackJsonp([1],[
31287
  {
31288
  href: 'javascript:;',
31289
  className: classes,
31290
- onClick: this.handleSelect.bind(this, group.name) },
31291
  group.label,
31292
  ' ',
31293
  React.createElement(
@@ -31299,7 +31327,7 @@ webpackJsonp([1],[
31299
  )
31300
  )
31301
  );
31302
- }).bind(this));
31303
 
31304
  return React.createElement(
31305
  'ul',
@@ -31341,16 +31369,18 @@ webpackJsonp([1],[
31341
  });
31342
  },
31343
  componentDidUpdate: function componentDidUpdate() {
 
 
31344
  var selected_filters = this.props.filter;
31345
- var available_filters = this.getAvailableFilters().map((function (filter, i) {
31346
  if (selected_filters[filter] !== undefined && selected_filters[filter]) {
31347
- jQuery(this.refs['filter-' + i]).val(selected_filters[filter]).trigger('change');
31348
  }
31349
- }).bind(this));
31350
  },
31351
  render: function render() {
31352
  var filters = this.props.filters;
31353
- var available_filters = this.getAvailableFilters().map((function (filter, i) {
31354
  return React.createElement(
31355
  'select',
31356
  {
@@ -31358,7 +31388,7 @@ webpackJsonp([1],[
31358
  key: 'filter-' + i,
31359
  name: filter
31360
  },
31361
- filters[filter].map((function (option, j) {
31362
  return React.createElement(
31363
  'option',
31364
  {
@@ -31367,9 +31397,9 @@ webpackJsonp([1],[
31367
  },
31368
  option.label
31369
  );
31370
- }).bind(this))
31371
  );
31372
- }).bind(this));
31373
 
31374
  var button = undefined;
31375
 
@@ -32555,12 +32585,14 @@ webpackJsonp([1],[
32555
  };
32556
  },
32557
  render: function render() {
32558
- var steps = this.state.steps.map((function (step, index) {
32559
- var stepClasses = classNames({ 'mailpoet_current': this.props.step === step.name });
 
 
32560
 
32561
  var label = step.label;
32562
 
32563
- if (step['link'] !== undefined && this.props.step !== step.name) {
32564
  label = React.createElement(
32565
  Link,
32566
  { to: step.link },
@@ -32576,9 +32608,9 @@ webpackJsonp([1],[
32576
  { className: stepClasses },
32577
  label
32578
  ),
32579
- index < this.state.steps.length - 1 ? ' > ' : ''
32580
  );
32581
- }).bind(this));
32582
 
32583
  return React.createElement(
32584
  'p',
@@ -32745,7 +32777,7 @@ webpackJsonp([1],[
32745
  };
32746
 
32747
  var availableSegmentValues = _underscore2['default'].object(_underscore2['default'].map(availableSegments, function (segment) {
32748
- var name = segment.name + ' (' + parseInt(segment.subscribers).toLocaleString() + ')';
32749
  return [segment.id, name];
32750
  }));
32751
  var segmentField = {
@@ -32967,7 +32999,7 @@ webpackJsonp([1],[
32967
  key: 'getBadgeType',
32968
  value: function getBadgeType(stat, rate) {
32969
  var len = stat.badgeRanges.length;
32970
- for (var i = 0; i < len; i++) {
32971
  if (rate > stat.badgeRanges[i]) {
32972
  return stat.badgeTypes[i];
32973
  }
28313
  handleDeleteItem: function handleDeleteItem(id) {
28314
  this.props.onDeleteItem(id);
28315
  },
28316
+ handleToggleItem: function handleToggleItem() {
28317
  this.setState({ expanded: !this.state.expanded });
28318
  },
28319
  render: function render() {
28345
  if (custom_actions.length > 0) {
28346
  (function () {
28347
  var is_first = true;
28348
+ item_actions = custom_actions.map(function (action, index) {
28349
  if (action.display !== undefined) {
28350
+ if (action.display(_this.props.item) === false) {
28351
  return;
28352
  }
28353
  }
28363
  'a',
28364
  {
28365
  href: 'javascript:;',
28366
+ onClick: _this.handleTrashItem.bind(null, _this.props.item.id) },
28367
  _mailpoet2['default'].I18n.t('moveToTrash')
28368
  )
28369
  );
28371
  custom_action = _react2['default'].createElement(
28372
  'span',
28373
  {
28374
+ onClick: _this.props.onRefreshItems,
28375
  key: 'action-' + index, className: action.name },
28376
  !is_first ? ' | ' : '',
28377
+ action.link(_this.props.item)
28378
  );
28379
  } else if (action.link) {
28380
  custom_action = _react2['default'].createElement(
28382
  {
28383
  key: 'action-' + index, className: action.name },
28384
  !is_first ? ' | ' : '',
28385
+ action.link(_this.props.item)
28386
  );
28387
  } else {
28388
  custom_action = _react2['default'].createElement(
28392
  !is_first ? ' | ' : '',
28393
  _react2['default'].createElement(
28394
  'a',
28395
+ { href: 'javascript:;', onClick: action.onClick !== undefined ? action.onClick.bind(null, _this.props.item, _this.props.onRefreshItems) : false },
28396
  action.label
28397
  )
28398
  );
28403
  }
28404
 
28405
  return custom_action;
28406
+ });
28407
  })();
28408
  } else {
28409
  item_actions = _react2['default'].createElement(
28503
  displayName: 'ListingItems',
28504
 
28505
  render: function render() {
28506
+ var _this2 = this;
28507
+
28508
  if (this.props.items.length === 0) {
28509
  var message = undefined;
28510
  if (this.props.loading === true) {
28552
  )
28553
  )
28554
  ),
28555
+ this.props.items.map(function (item, index) {
28556
  item.id = parseInt(item.id, 10);
28557
+ item.selected = _this2.props.selected_ids.indexOf(item.id) !== -1;
28558
 
28559
  return _react2['default'].createElement(ListingItem, {
28560
+ columns: _this2.props.columns,
28561
+ onSelectItem: _this2.props.onSelectItem,
28562
+ onRenderItem: _this2.props.onRenderItem,
28563
+ onDeleteItem: _this2.props.onDeleteItem,
28564
+ onRestoreItem: _this2.props.onRestoreItem,
28565
+ onTrashItem: _this2.props.onTrashItem,
28566
+ onRefreshItems: _this2.props.onRefreshItems,
28567
+ selection: _this2.props.selection,
28568
+ is_selectable: _this2.props.is_selectable,
28569
+ item_actions: _this2.props.item_actions,
28570
+ group: _this2.props.group,
28571
  key: 'item-' + item.id + '-' + index,
28572
  item: item });
28573
+ })
28574
  );
28575
  }
28576
  }
28607
  return [matches[1], matches[2]];
28608
  },
28609
  initWithParams: function initWithParams(params) {
28610
+ var _this3 = this;
28611
 
28612
  var state = this.getInitialState();
28613
  // check for url params
28614
  if (params.splat) {
28615
  params.splat.split('/').map(function (param) {
28616
+ var _getParam = _this3.getParam(param);
28617
 
28618
  var _getParam2 = _slicedToArray(_getParam, 2);
28619
 
28657
  state.sort_order = this.props.sort_order;
28658
  }
28659
 
28660
+ this.setState(state, function () {
28661
+ _this3.getItems();
28662
+ });
28663
  },
28664
  getParams: function getParams() {
28665
  // get all route parameters (without the "splat")
28673
  return params;
28674
  },
28675
  setParams: function setParams() {
28676
+ var _this4 = this;
28677
 
28678
  if (this.props.location) {
28679
  var params = Object.keys(this.state).filter(function (key) {
28680
  return ['group', 'filter', 'search', 'page', 'sort_by', 'sort_order'].indexOf(key) !== -1;
28681
  }).map(function (key) {
28682
+ var value = _this4.state[key];
28683
  if (value === Object(value)) {
28684
  value = _jquery2['default'].param(value);
28685
  } else if (value === Boolean(value)) {
28712
  }
28713
  },
28714
  setBaseUrlParams: function setBaseUrlParams(base_url) {
28715
+ var _this5 = this;
28716
 
28717
  if (base_url.indexOf(':') !== -1) {
28718
  (function () {
28719
+ var params = _this5.getParams();
28720
  Object.keys(params).map(function (key) {
28721
  if (base_url.indexOf(':' + key) !== -1) {
28722
  base_url = base_url.replace(':' + key, params[key]);
28728
  return base_url;
28729
  },
28730
  componentDidMount: function componentDidMount() {
28731
+ var _this6 = this;
28732
+
28733
  if (this.isMounted()) {
28734
  var params = this.props.params || {};
28735
  this.initWithParams(params);
28736
 
28737
  if (this.props.auto_refresh) {
28738
+ (0, _jquery2['default'])(document).on('heartbeat-tick.mailpoet', function () {
28739
+ _this6.getItems();
28740
+ });
28741
  }
28742
  }
28743
  },
28746
  this.initWithParams(params);
28747
  },
28748
  getItems: function getItems() {
28749
+ var _this7 = this;
28750
 
28751
  if (this.isMounted()) {
28752
  this.setState({ loading: true });
28768
  sort_order: this.state.sort_order
28769
  }
28770
  }).always(function () {
28771
+ _this7.setState({ loading: false });
28772
  }).done(function (response) {
28773
+ _this7.setState({
28774
  items: response.data || [],
28775
  filters: response.meta.filters || {},
28776
  groups: response.meta.groups || [],
28778
  meta: _underscore2['default'].omit(response.meta, ['filters', 'groups', 'count'])
28779
  }, function () {
28780
  // if viewing an empty trash
28781
+ if (_this7.state.group === 'trash' && response.meta.count === 0) {
28782
  // redirect to default group
28783
+ _this7.handleGroup('all');
28784
  }
28785
 
28786
  // trigger afterGetItems callback if specified
28787
+ if (_this7.props.afterGetItems !== undefined) {
28788
+ _this7.props.afterGetItems(_this7.state);
28789
  }
28790
  });
28791
  }).fail(function (response) {
28798
  }
28799
  },
28800
  handleRestoreItem: function handleRestoreItem(id) {
28801
+ var _this8 = this;
28802
 
28803
  this.setState({
28804
  loading: true,
28813
  id: id
28814
  }
28815
  }).done(function (response) {
28816
+ if (_this8.props.messages !== undefined && _this8.props.messages['onRestore'] !== undefined) {
28817
+ _this8.props.messages.onRestore(response);
28818
  }
28819
+ _this8.getItems();
28820
  }).fail(function (response) {
28821
  _mailpoet2['default'].Notice.error(response.errors.map(function (error) {
28822
  return error.message;
28824
  });
28825
  },
28826
  handleTrashItem: function handleTrashItem(id) {
28827
+ var _this9 = this;
28828
 
28829
  this.setState({
28830
  loading: true,
28839
  id: id
28840
  }
28841
  }).done(function (response) {
28842
+ if (_this9.props.messages !== undefined && _this9.props.messages['onTrash'] !== undefined) {
28843
+ _this9.props.messages.onTrash(response);
28844
  }
28845
+ _this9.getItems();
28846
  }).fail(function (response) {
28847
  _mailpoet2['default'].Notice.error(response.errors.map(function (error) {
28848
  return error.message;
28850
  });
28851
  },
28852
  handleDeleteItem: function handleDeleteItem(id) {
28853
+ var _this10 = this;
28854
 
28855
  this.setState({
28856
  loading: true,
28865
  id: id
28866
  }
28867
  }).done(function (response) {
28868
+ if (_this10.props.messages !== undefined && _this10.props.messages['onDelete'] !== undefined) {
28869
+ _this10.props.messages.onDelete(response);
28870
  }
28871
+ _this10.getItems();
28872
  }).fail(function (response) {
28873
  _mailpoet2['default'].Notice.error(response.errors.map(function (error) {
28874
  return error.message;
28876
  });
28877
  },
28878
  handleEmptyTrash: function handleEmptyTrash() {
28879
+ var _this11 = this;
28880
 
28881
  return this.handleBulkAction('all', {
28882
  action: 'delete',
28884
  }).done(function (response) {
28885
  _mailpoet2['default'].Notice.success(_mailpoet2['default'].I18n.t('permanentlyDeleted').replace('%d', response.meta.count));
28886
  // redirect to default group
28887
+ _this11.handleGroup('all');
28888
  }).fail(function (response) {
28889
  _mailpoet2['default'].Notice.error(response.errors.map(function (error) {
28890
  return error.message;
28892
  });
28893
  },
28894
  handleBulkAction: function handleBulkAction(selected_ids, params) {
28895
+ var _this12 = this;
28896
 
28897
  if (this.state.selection === false && this.state.selected_ids.length === 0 && selected_ids !== 'all') {
28898
  return false;
28919
  action: 'bulkAction',
28920
  data: data
28921
  }).done(function () {
28922
+ _this12.getItems();
28923
+ }).fail(function (response) {
28924
+ if (response.errors.length > 0) {
28925
+ _mailpoet2['default'].Notice.error(response.errors.map(function (error) {
28926
+ return error.message;
28927
+ }), { scroll: true });
28928
+ }
28929
  });
28930
  },
28931
  handleSearch: function handleSearch(search) {
28932
+ var _this13 = this;
28933
+
28934
  this.setState({
28935
  search: search,
28936
  page: 1,
28937
  selection: false,
28938
  selected_ids: []
28939
+ }, function () {
28940
+ _this13.setParams();
28941
+ });
28942
  },
28943
  handleSort: function handleSort(sort_by) {
28944
+ var _this14 = this;
28945
+
28946
  var sort_order = arguments.length <= 1 || arguments[1] === undefined ? 'asc' : arguments[1];
28947
 
28948
  this.setState({
28949
  sort_by: sort_by,
28950
  sort_order: sort_order === 'asc' ? 'asc' : 'desc'
28951
+ }, function () {
28952
+ _this14.setParams();
28953
+ });
28954
  },
28955
  handleSelectItem: function handleSelectItem(id, is_checked) {
28956
  var selected_ids = this.state.selected_ids,
29002
  });
29003
  },
29004
  handleFilter: function handleFilter(filters) {
29005
+ var _this15 = this;
29006
+
29007
  this.setState({
29008
  filter: filters,
29009
  page: 1
29010
+ }, function () {
29011
+ _this15.setParams();
29012
+ });
29013
  },
29014
  handleGroup: function handleGroup(group) {
29015
+ var _this16 = this;
29016
+
29017
  // reset search
29018
  (0, _jquery2['default'])('#search_input').val('');
29019
 
29022
  filter: {},
29023
  search: '',
29024
  page: 1
29025
+ }, function () {
29026
+ _this16.setParams();
29027
+ });
29028
  },
29029
  handleSetPage: function handleSetPage(page) {
29030
+ var _this17 = this;
29031
+
29032
  this.setState({
29033
  page: page,
29034
  selection: false,
29035
  selected_ids: []
29036
+ }, function () {
29037
+ _this17.setParams();
29038
+ });
29039
  },
29040
  handleRenderItem: function handleRenderItem(item, actions) {
29041
  var render = this.props.onRenderItem(item, actions, this.state.meta);
30773
  };
30774
  },
30775
  handleChangeAction: function handleChangeAction(e) {
30776
+ var _this = this;
30777
+
30778
  this.setState({
30779
  action: e.target.value,
30780
  extra: false
30781
+ }, function () {
30782
+ var action = _this.getSelectedAction();
30783
 
30784
  // action on select callback
30785
  if (action !== null && action['onSelect'] !== undefined) {
30786
+ _this.setState({
30787
  extra: action.onSelect(e)
30788
  });
30789
  }
30790
+ });
30791
  },
30792
  handleApplyAction: function handleApplyAction(e) {
30793
  e.preventDefault();
30862
  { value: '' },
30863
  MailPoet.I18n.t('bulkActions')
30864
  ),
30865
+ this.props.bulk_actions.map(function (action, index) {
30866
  return React.createElement(
30867
  'option',
30868
  {
30871
  },
30872
  action.label
30873
  );
30874
+ })
30875
  ),
30876
  React.createElement('input', {
30877
  onClick: this.handleApplyAction,
30913
  return this.props.onSelectItems(this.refs.toggle.checked);
30914
  },
30915
  render: function render() {
30916
+ var _this = this;
30917
+
30918
+ var columns = this.props.columns.map(function (column, index) {
30919
  column.is_primary = index === 0;
30920
+ column.sorted = _this.props.sort_by === column.name ? _this.props.sort_order : 'desc';
30921
  return _react2['default'].createElement(ListingColumn, {
30922
+ onSort: _this.props.onSort,
30923
+ sort_by: _this.props.sort_by,
30924
  key: 'column-' + index,
30925
  column: column });
30926
+ });
30927
 
30928
  var checkbox = undefined;
30929
 
31013
  };
31014
  },
31015
  setPage: function setPage(page) {
31016
+ var _this = this;
31017
+
31018
  this.setState({
31019
  page: null
31020
+ }, function () {
31021
+ _this.props.onSetPage(_this.constrainPage(page));
31022
+ });
31023
  },
31024
  setFirstPage: function setFirstPage() {
31025
  this.setPage(1);
31297
  return this.props.onSelectGroup(group);
31298
  },
31299
  render: function render() {
31300
+ var _this = this;
31301
+
31302
+ var groups = this.props.groups.map(function (group, index) {
31303
  if (group.name === 'trash' && group.count === 0) {
31304
  return false;
31305
  }
31306
 
31307
+ var classes = classNames({ 'current': group.name === _this.props.group });
31308
 
31309
  return React.createElement(
31310
  'li',
31315
  {
31316
  href: 'javascript:;',
31317
  className: classes,
31318
+ onClick: _this.handleSelect.bind(_this, group.name) },
31319
  group.label,
31320
  ' ',
31321
  React.createElement(
31327
  )
31328
  )
31329
  );
31330
+ });
31331
 
31332
  return React.createElement(
31333
  'ul',
31369
  });
31370
  },
31371
  componentDidUpdate: function componentDidUpdate() {
31372
+ var _this2 = this;
31373
+
31374
  var selected_filters = this.props.filter;
31375
+ this.getAvailableFilters().map(function (filter, i) {
31376
  if (selected_filters[filter] !== undefined && selected_filters[filter]) {
31377
+ jQuery(_this2.refs['filter-' + i]).val(selected_filters[filter]).trigger('change');
31378
  }
31379
+ });
31380
  },
31381
  render: function render() {
31382
  var filters = this.props.filters;
31383
+ var available_filters = this.getAvailableFilters().map(function (filter, i) {
31384
  return React.createElement(
31385
  'select',
31386
  {
31388
  key: 'filter-' + i,
31389
  name: filter
31390
  },
31391
+ filters[filter].map(function (option, j) {
31392
  return React.createElement(
31393
  'option',
31394
  {
31397
  },
31398
  option.label
31399
  );
31400
+ })
31401
  );
31402
+ });
31403
 
31404
  var button = undefined;
31405
 
32585
  };
32586
  },
32587
  render: function render() {
32588
+ var _this = this;
32589
+
32590
+ var steps = this.state.steps.map(function (step, index) {
32591
+ var stepClasses = classNames({ 'mailpoet_current': _this.props.step === step.name });
32592
 
32593
  var label = step.label;
32594
 
32595
+ if (step['link'] !== undefined && _this.props.step !== step.name) {
32596
  label = React.createElement(
32597
  Link,
32598
  { to: step.link },
32608
  { className: stepClasses },
32609
  label
32610
  ),
32611
+ index < _this.state.steps.length - 1 ? ' > ' : ''
32612
  );
32613
+ });
32614
 
32615
  return React.createElement(
32616
  'p',
32777
  };
32778
 
32779
  var availableSegmentValues = _underscore2['default'].object(_underscore2['default'].map(availableSegments, function (segment) {
32780
+ var name = segment.name + ' (' + parseInt(segment.subscribers, 10).toLocaleString() + ')';
32781
  return [segment.id, name];
32782
  }));
32783
  var segmentField = {
32999
  key: 'getBadgeType',
33000
  value: function getBadgeType(stat, rate) {
33001
  var len = stat.badgeRanges.length;
33002
+ for (var i = 0; i < len; i += 1) {
33003
  if (rate > stat.badgeRanges[i]) {
33004
  return stat.badgeTypes[i];
33005
  }
assets/js/{form_editor.4902de9a.js → form_editor.e0b22679.js} RENAMED
File without changes
assets/js/{mailpoet.684f3a3c.js → mailpoet.0ebf4b66.js} RENAMED
@@ -17788,7 +17788,7 @@ webpackJsonp([3],[
17788
  message: message
17789
  }
17790
  ]
17791
- }
17792
  }
17793
 
17794
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(274), __webpack_require__(273), __webpack_require__(278)], __WEBPACK_AMD_DEFINE_RESULT__ = function(MailPoet, jQuery, _) {
@@ -17829,7 +17829,7 @@ webpackJsonp([3],[
17829
  endpoint: this.options.endpoint,
17830
  method: this.options.action,
17831
  data: this.options.data || {}
17832
- }
17833
  },
17834
  request: function(method, options) {
17835
  // set options
@@ -17841,8 +17841,8 @@ webpackJsonp([3],[
17841
  // remove null values from the data object
17842
  if (_.isObject(params.data)) {
17843
  params.data = _.pick(params.data, function(value) {
17844
- return (value !== null)
17845
- })
17846
  }
17847
 
17848
  // ajax request
17788
  message: message
17789
  }
17790
  ]
17791
+ };
17792
  }
17793
 
17794
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(274), __webpack_require__(273), __webpack_require__(278)], __WEBPACK_AMD_DEFINE_RESULT__ = function(MailPoet, jQuery, _) {
17829
  endpoint: this.options.endpoint,
17830
  method: this.options.action,
17831
  data: this.options.data || {}
17832
+ };
17833
  },
17834
  request: function(method, options) {
17835
  // set options
17841
  // remove null values from the data object
17842
  if (_.isObject(params.data)) {
17843
  params.data = _.pick(params.data, function(value) {
17844
+ return (value !== null);
17845
+ });
17846
  }
17847
 
17848
  // ajax request
assets/js/manifest.json CHANGED
@@ -1,10 +1,10 @@
1
  {
2
- "mp2migrator.js": "mp2migrator.3f76aefe.js",
3
- "public.js": "public.2ca16875.js",
4
- "admin.js": "admin.080e0640.js",
5
- "admin_vendor.js": "admin_vendor.ad6d7a22.js",
6
- "form_editor.js": "form_editor.4902de9a.js",
7
- "mailpoet.js": "mailpoet.684f3a3c.js",
8
- "newsletter_editor.js": "newsletter_editor.e810c798.js",
9
- "vendor.js": "vendor.25e2ce6a.js"
10
  }
1
  {
2
+ "mp2migrator.js": "mp2migrator.f7fa3be5.js",
3
+ "public.js": "public.0e89cdab.js",
4
+ "admin.js": "admin.65d0dc6d.js",
5
+ "admin_vendor.js": "admin_vendor.927b0f96.js",
6
+ "form_editor.js": "form_editor.e0b22679.js",
7
+ "mailpoet.js": "mailpoet.0ebf4b66.js",
8
+ "newsletter_editor.js": "newsletter_editor.7d386d8d.js",
9
+ "vendor.js": "vendor.c136ccd7.js"
10
  }
assets/js/{mp2migrator.3f76aefe.js → mp2migrator.f7fa3be5.js} RENAMED
@@ -116,6 +116,8 @@
116
  jQuery('#progresslabel').html(progress + '%');
117
  if(Number(result.current) !== 0) {
118
  jQuery('#skip-import').hide();
 
 
119
  }
120
  if(MailPoet.MP2Migrator.is_logging) {
121
  MailPoet.MP2Migrator.updateProgressbar_timeout = setTimeout(MailPoet.MP2Migrator.updateProgressbar, 1000);
@@ -182,6 +184,15 @@
182
  jQuery('#stop-import').removeAttr('disabled'); // Enable the button
183
  MailPoet.MP2Migrator.reactivateImportButton();
184
  MailPoet.MP2Migrator.updateDisplay(); // Get the latest information after the import was stopped
 
 
 
 
 
 
 
 
 
185
  });
186
  MailPoet.MP2Migrator.stopLogger();
187
  return false;
@@ -196,6 +207,15 @@
196
  }
197
  }).done(function () {
198
  MailPoet.MP2Migrator.gotoWelcomePage();
 
 
 
 
 
 
 
 
 
199
  });
200
  return false;
201
  },
116
  jQuery('#progresslabel').html(progress + '%');
117
  if(Number(result.current) !== 0) {
118
  jQuery('#skip-import').hide();
119
+ jQuery('#progressbar').show();
120
+ jQuery('#logger-container').show();
121
  }
122
  if(MailPoet.MP2Migrator.is_logging) {
123
  MailPoet.MP2Migrator.updateProgressbar_timeout = setTimeout(MailPoet.MP2Migrator.updateProgressbar, 1000);
184
  jQuery('#stop-import').removeAttr('disabled'); // Enable the button
185
  MailPoet.MP2Migrator.reactivateImportButton();
186
  MailPoet.MP2Migrator.updateDisplay(); // Get the latest information after the import was stopped
187
+ }).fail(function (response) {
188
+ if(response.errors.length > 0) {
189
+ MailPoet.Notice.error(
190
+ response.errors.map(function (error) {
191
+ return error.message;
192
+ }),
193
+ {scroll: true}
194
+ );
195
+ }
196
  });
197
  MailPoet.MP2Migrator.stopLogger();
198
  return false;
207
  }
208
  }).done(function () {
209
  MailPoet.MP2Migrator.gotoWelcomePage();
210
+ }).fail(function (response) {
211
+ if(response.errors.length > 0) {
212
+ MailPoet.Notice.error(
213
+ response.errors.map(function (error) {
214
+ return error.message;
215
+ }),
216
+ {scroll: true}
217
+ );
218
+ }
219
  });
220
  return false;
221
  },
assets/js/{newsletter_editor.e810c798.js → newsletter_editor.7d386d8d.js} RENAMED
@@ -9424,7 +9424,7 @@ webpackJsonp([4],{
9424
  message: message
9425
  }
9426
  ]
9427
- }
9428
  }
9429
 
9430
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(274), __webpack_require__(273), __webpack_require__(278)], __WEBPACK_AMD_DEFINE_RESULT__ = function(MailPoet, jQuery, _) {
@@ -9465,7 +9465,7 @@ webpackJsonp([4],{
9465
  endpoint: this.options.endpoint,
9466
  method: this.options.action,
9467
  data: this.options.data || {}
9468
- }
9469
  },
9470
  request: function(method, options) {
9471
  // set options
@@ -9477,8 +9477,8 @@ webpackJsonp([4],{
9477
  // remove null values from the data object
9478
  if (_.isObject(params.data)) {
9479
  params.data = _.pick(params.data, function(value) {
9480
- return (value !== null)
9481
- })
9482
  }
9483
 
9484
  // ajax request
@@ -33862,6 +33862,7 @@ webpackJsonp([4],{
33862
  },
33863
  })
33864
  .preventDefault('auto')
 
33865
  .actionChecker(function (pointer, event, action) {
33866
  // Disable dragging with right click
33867
  if (event.button !== 0) {
9424
  message: message
9425
  }
9426
  ]
9427
+ };
9428
  }
9429
 
9430
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(274), __webpack_require__(273), __webpack_require__(278)], __WEBPACK_AMD_DEFINE_RESULT__ = function(MailPoet, jQuery, _) {
9465
  endpoint: this.options.endpoint,
9466
  method: this.options.action,
9467
  data: this.options.data || {}
9468
+ };
9469
  },
9470
  request: function(method, options) {
9471
  // set options
9477
  // remove null values from the data object
9478
  if (_.isObject(params.data)) {
9479
  params.data = _.pick(params.data, function(value) {
9480
+ return (value !== null);
9481
+ });
9482
  }
9483
 
9484
  // ajax request
33862
  },
33863
  })
33864
  .preventDefault('auto')
33865
+ .styleCursor(false)
33866
  .actionChecker(function (pointer, event, action) {
33867
  // Disable dragging with right click
33868
  if (event.button !== 0) {
assets/js/{public.2ca16875.js → public.0e89cdab.js} RENAMED
@@ -110,7 +110,7 @@
110
  message: message
111
  }
112
  ]
113
- }
114
  }
115
 
116
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(1), __webpack_require__(4), __webpack_require__(5)], __WEBPACK_AMD_DEFINE_RESULT__ = function(MailPoet, jQuery, _) {
@@ -151,7 +151,7 @@
151
  endpoint: this.options.endpoint,
152
  method: this.options.action,
153
  data: this.options.data || {}
154
- }
155
  },
156
  request: function(method, options) {
157
  // set options
@@ -163,8 +163,8 @@
163
  // remove null values from the data object
164
  if (_.isObject(params.data)) {
165
  params.data = _.pick(params.data, function(value) {
166
- return (value !== null)
167
- })
168
  }
169
 
170
  // ajax request
110
  message: message
111
  }
112
  ]
113
+ };
114
  }
115
 
116
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(1), __webpack_require__(4), __webpack_require__(5)], __WEBPACK_AMD_DEFINE_RESULT__ = function(MailPoet, jQuery, _) {
151
  endpoint: this.options.endpoint,
152
  method: this.options.action,
153
  data: this.options.data || {}
154
+ };
155
  },
156
  request: function(method, options) {
157
  // set options
163
  // remove null values from the data object
164
  if (_.isObject(params.data)) {
165
  params.data = _.pick(params.data, function(value) {
166
+ return (value !== null);
167
+ });
168
  }
169
 
170
  // ajax request
assets/js/{vendor.25e2ce6a.js → vendor.c136ccd7.js} RENAMED
@@ -76,7 +76,7 @@
76
  /******/ script.charset = 'utf-8';
77
  /******/ script.async = true;
78
 
79
- /******/ script.src = __webpack_require__.p + "" + ({"0":"admin","1":"admin_vendor","2":"form_editor","3":"mailpoet","4":"newsletter_editor"}[chunkId]||chunkId) + "." + {"0":"080e0640","1":"ad6d7a22","2":"4902de9a","3":"684f3a3c","4":"e810c798"}[chunkId] + ".chunk.js";
80
  /******/ head.appendChild(script);
81
  /******/ }
82
  /******/ };
76
  /******/ script.charset = 'utf-8';
77
  /******/ script.async = true;
78
 
79
+ /******/ script.src = __webpack_require__.p + "" + ({"0":"admin","1":"admin_vendor","2":"form_editor","3":"mailpoet","4":"newsletter_editor"}[chunkId]||chunkId) + "." + {"0":"65d0dc6d","1":"927b0f96","2":"e0b22679","3":"0ebf4b66","4":"7d386d8d"}[chunkId] + ".chunk.js";
80
  /******/ head.appendChild(script);
81
  /******/ }
82
  /******/ };
lang/index.php CHANGED
@@ -1,3 +0,0 @@
1
- <?php
2
-
3
- // Silence is golden
 
 
 
lang/mailpoet-es_ES.mo CHANGED
Binary file
lang/mailpoet-it_IT.mo CHANGED
Binary file
lang/mailpoet.pot CHANGED
@@ -4,7 +4,7 @@ msgid ""
4
  msgstr ""
5
  "Project-Id-Version: \n"
6
  "Report-Msgid-Bugs-To: http://support.mailpoet.com/\n"
7
- "POT-Creation-Date: 2017-07-04 13:52:03+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -153,9 +153,7 @@ msgid "Your MailPoet Sending Service key is invalid."
153
  msgstr ""
154
 
155
  #: lib/API/JSON/v1/Services.php:63
156
- msgid ""
157
- "Error validating MailPoet Sending Service key, please try again later "
158
- "(code: %s)"
159
  msgstr ""
160
 
161
  #: lib/API/JSON/v1/Services.php:94 views/settings/premium.html:30
@@ -175,7 +173,17 @@ msgid "Your Premium key is already used on another site."
175
  msgstr ""
176
 
177
  #: lib/API/JSON/v1/Services.php:119
178
- msgid "Error validating Premium key, please try again later (code: %s)"
 
 
 
 
 
 
 
 
 
 
179
  msgstr ""
180
 
181
  #: lib/API/JSON/v1/Settings.php:20
@@ -198,15 +206,15 @@ msgstr ""
198
 
199
  #: lib/API/MP/v1/API.php:21
200
  #: lib/Subscribers/ImportExport/ImportExportFactory.php:33
201
- #: lib/Subscription/Pages.php:278 views/form/editor.html:225
202
- #: views/form/editor.html:228 views/subscribers/subscribers.html:52
203
  msgid "First name"
204
  msgstr ""
205
 
206
  #: lib/API/MP/v1/API.php:25
207
  #: lib/Subscribers/ImportExport/ImportExportFactory.php:34
208
- #: lib/Subscription/Pages.php:287 views/form/editor.html:234
209
- #: views/form/editor.html:237 views/subscribers/subscribers.html:53
210
  msgid "Last name"
211
  msgstr ""
212
 
@@ -230,90 +238,93 @@ msgstr ""
230
  msgid "START IMPORT"
231
  msgstr ""
232
 
233
- #: lib/Config/MP2Migrator.php:167 views/mp2migration.html:63
234
  msgid "IMPORT COMPLETE"
235
  msgstr ""
236
 
237
- #: lib/Config/MP2Migrator.php:170
238
  msgid "END IMPORT"
239
  msgstr ""
240
 
241
- #: lib/Config/MP2Migrator.php:194
242
  msgid "MailPoet data erased"
243
  msgstr ""
244
 
245
- #: lib/Config/MP2Migrator.php:224 views/mp2migration.html:65
246
  msgid "IMPORT STOPPED BY USER"
247
  msgstr ""
248
 
249
- #: lib/Config/MP2Migrator.php:256
250
  msgid "MailPoet 2 data found:"
251
  msgstr ""
252
 
253
- #: lib/Config/MP2Migrator.php:261
254
  msgid "%d subscribers list"
255
  msgid_plural "%d subscribers lists"
256
  msgstr[0] ""
257
  msgstr[1] ""
258
 
259
- #: lib/Config/MP2Migrator.php:266
260
  msgid "%d subscriber"
261
  msgid_plural "%d subscribers"
262
  msgstr[0] ""
263
  msgstr[1] ""
264
 
265
- #: lib/Config/MP2Migrator.php:271
266
  msgid "%d form"
267
  msgid_plural "%d forms"
268
  msgstr[0] ""
269
  msgstr[1] ""
270
 
271
- #: lib/Config/MP2Migrator.php:296
272
  msgid "Importing segments..."
273
  msgstr ""
274
 
275
- #: lib/Config/MP2Migrator.php:317
276
  msgid "%d segment imported"
277
  msgid_plural "%d segments imported"
278
  msgstr[0] ""
279
  msgstr[1] ""
280
 
281
- #: lib/Config/MP2Migrator.php:386
282
  msgid "Importing custom fields..."
283
  msgstr ""
284
 
285
- #: lib/Config/MP2Migrator.php:396
286
  msgid "%d custom field imported"
287
  msgid_plural "%d custom fields imported"
288
  msgstr[0] ""
289
  msgstr[1] ""
290
 
291
- #: lib/Config/MP2Migrator.php:534
292
  msgid "Importing subscribers..."
293
  msgstr ""
294
 
295
- #: lib/Config/MP2Migrator.php:556
296
  msgid "%d subscriber imported"
297
  msgid_plural "%d subscribers imported"
298
  msgstr[0] ""
299
  msgstr[1] ""
300
 
301
- #: lib/Config/MP2Migrator.php:782
302
  msgid "Importing forms..."
303
  msgstr ""
304
 
305
- #: lib/Config/MP2Migrator.php:801
306
  msgid "%d form imported"
307
  msgid_plural "%d forms imported"
308
  msgstr[0] ""
309
  msgstr[1] ""
310
 
 
 
 
 
311
  #: lib/Config/Menu.php:67 lib/Config/Menu.php:68 views/newsletters.html:23
312
  msgid "Emails"
313
  msgstr ""
314
 
315
  #: lib/Config/Menu.php:91 lib/Config/Menu.php:92 views/forms.html:25
316
- #: views/mp2migration.html:13
317
  msgid "Forms"
318
  msgstr ""
319
 
@@ -323,13 +334,13 @@ msgid "Subscribers"
323
  msgstr ""
324
 
325
  #: lib/Config/Menu.php:137 lib/Config/Menu.php:138 views/forms.html:53
326
- #: views/newsletters.html:64 views/newsletters.html:164 views/segments.html:13
327
  #: views/subscribers/subscribers.html:66
328
  msgid "Lists"
329
  msgstr ""
330
 
331
  #: lib/Config/Menu.php:161 lib/Config/Menu.php:162 views/form/editor.html:37
332
- #: views/mp2migration.html:14 views/newsletters.html:65 views/settings.html:6
333
  msgid "Settings"
334
  msgstr ""
335
 
@@ -373,7 +384,7 @@ msgstr ""
373
 
374
  #: lib/Config/Menu.php:270 lib/Newsletter/Shortcodes/ShortcodesHelper.php:32
375
  #: views/newsletter/templates/components/sidebar/styles.hbs:74
376
- #: views/newsletters.html:119
377
  msgid "Newsletter"
378
  msgstr ""
379
 
@@ -395,11 +406,11 @@ msgid ""
395
  "might work within a MultiSite environment, we don’t support it."
396
  msgstr ""
397
 
398
- #: lib/Config/Populator.php:152
399
  msgid "My First List"
400
  msgstr ""
401
 
402
- #: lib/Config/Populator.php:154
403
  msgid "This list is automatically created when you install MailPoet."
404
  msgstr ""
405
 
@@ -929,31 +940,31 @@ msgid ""
929
  "Please read our [link]instructions[/link] on how to resolve this issue."
930
  msgstr ""
931
 
932
- #: lib/Config/RequirementsChecker.php:88
933
  msgid ""
934
  "MailPoet requires a PDO_MYSQL PHP extension. Please read our "
935
  "[link]instructions[/link] on how to resolve this issue."
936
  msgstr ""
937
 
938
- #: lib/Config/RequirementsChecker.php:104
939
  msgid ""
940
  "MailPoet requires an XML PHP extension. Please read our "
941
  "[link]instructions[/link] on how to resolve this issue."
942
  msgstr ""
943
 
944
- #: lib/Config/RequirementsChecker.php:113
945
  msgid ""
946
  "MailPoet requires a ZIP PHP extension. Please read our "
947
  "[link]instructions[/link] on how to resolve this issue."
948
  msgstr ""
949
 
950
- #: lib/Config/RequirementsChecker.php:124
951
  msgid ""
952
  "A MailPoet dependency (%s) does not appear to be loaded correctly, thus "
953
  "MailPoet will not work correctly. Please reinstall the plugin."
954
  msgstr ""
955
 
956
- #: lib/Config/RequirementsChecker.php:135
957
  msgid ""
958
  "MailPoet has detected a dependency conflict (%s) with another plugin (%s), "
959
  "which may cause unexpected behavior. Please disable the offending plugin to "
@@ -966,19 +977,19 @@ msgid ""
966
  "[link]Visit MailPoet.com to purchase a key[/link]"
967
  msgstr ""
968
 
969
- #: lib/Config/ServicesChecker.php:42
970
  msgid ""
971
  "Your newsletters are awesome! Don't forget to [link]upgrade your MailPoet "
972
  "email plan[/link] by %s to keep sending them to your subscribers."
973
  msgstr ""
974
 
975
- #: lib/Config/ServicesChecker.php:72
976
  msgid ""
977
  "Warning! Your License Key is either invalid or expired. [link]Renew your "
978
  "License now[/link] to enjoy automatic updates and Premium support."
979
  msgstr ""
980
 
981
- #: lib/Config/ServicesChecker.php:85
982
  msgid ""
983
  "Your License Key is expiring! Don't forget to [link]renew your "
984
  "license[/link] by %s to keep enjoying automatic updates and Premium support."
@@ -1017,7 +1028,7 @@ msgid "Please specify a valid email address."
1017
  msgstr ""
1018
 
1019
  #: lib/Form/Block/Base.php:18 views/form/editor.html:55
1020
- #: views/newsletters.html:167
1021
  msgid "Please select a list"
1022
  msgstr ""
1023
 
@@ -1073,62 +1084,62 @@ msgstr ""
1073
  msgid "Month (January, February,...)"
1074
  msgstr ""
1075
 
1076
- #: lib/Form/Block/Date.php:124 views/newsletters.html:189
1077
  #: views/subscribers/importExport/import.html:56
1078
  msgid "January"
1079
  msgstr ""
1080
 
1081
- #: lib/Form/Block/Date.php:124 views/newsletters.html:190
1082
  #: views/subscribers/importExport/import.html:57
1083
  msgid "February"
1084
  msgstr ""
1085
 
1086
- #: lib/Form/Block/Date.php:124 views/newsletters.html:191
1087
  #: views/subscribers/importExport/import.html:58
1088
  msgid "March"
1089
  msgstr ""
1090
 
1091
- #: lib/Form/Block/Date.php:124 views/newsletters.html:192
1092
  #: views/subscribers/importExport/import.html:59
1093
  msgid "April"
1094
  msgstr ""
1095
 
1096
- #: lib/Form/Block/Date.php:125 views/newsletters.html:193
1097
- #: views/newsletters.html:205 views/subscribers/importExport/import.html:60
1098
  msgid "May"
1099
  msgstr ""
1100
 
1101
- #: lib/Form/Block/Date.php:125 views/newsletters.html:194
1102
  #: views/subscribers/importExport/import.html:61
1103
  msgid "June"
1104
  msgstr ""
1105
 
1106
- #: lib/Form/Block/Date.php:125 views/newsletters.html:195
1107
  #: views/subscribers/importExport/import.html:62
1108
  msgid "July"
1109
  msgstr ""
1110
 
1111
- #: lib/Form/Block/Date.php:125 views/newsletters.html:196
1112
  #: views/subscribers/importExport/import.html:63
1113
  msgid "August"
1114
  msgstr ""
1115
 
1116
- #: lib/Form/Block/Date.php:125 views/newsletters.html:197
1117
  #: views/subscribers/importExport/import.html:64
1118
  msgid "September"
1119
  msgstr ""
1120
 
1121
- #: lib/Form/Block/Date.php:126 views/newsletters.html:198
1122
  #: views/subscribers/importExport/import.html:65
1123
  msgid "October"
1124
  msgstr ""
1125
 
1126
- #: lib/Form/Block/Date.php:126 views/newsletters.html:199
1127
  #: views/subscribers/importExport/import.html:66
1128
  msgid "November"
1129
  msgstr ""
1130
 
1131
- #: lib/Form/Block/Date.php:126 views/newsletters.html:200
1132
  #: views/subscribers/importExport/import.html:67
1133
  msgid "December"
1134
  msgstr ""
@@ -1217,13 +1228,13 @@ msgid "Please specify a type."
1217
  msgstr ""
1218
 
1219
  #: lib/Models/Form.php:93 lib/Models/Newsletter.php:646
1220
- #: lib/Models/Segment.php:133 lib/Models/Subscriber.php:347
1221
  msgid "All"
1222
  msgstr ""
1223
 
1224
  #: lib/Models/Form.php:98 lib/Models/Newsletter.php:716
1225
- #: lib/Models/Segment.php:138 lib/Models/Subscriber.php:372 views/forms.html:66
1226
- #: views/newsletters.html:76 views/segments.html:50
1227
  #: views/subscribers/subscribers.html:37
1228
  msgid "Trash"
1229
  msgstr ""
@@ -1236,7 +1247,7 @@ msgstr ""
1236
  msgid "Deleted list"
1237
  msgstr ""
1238
 
1239
- #: lib/Models/Newsletter.php:547 lib/Models/Subscriber.php:283
1240
  #: lib/Subscribers/ImportExport/Export/Export.php:170
1241
  msgid "All Lists"
1242
  msgstr ""
@@ -1259,7 +1270,7 @@ msgstr ""
1259
  msgid "Sent"
1260
  msgstr ""
1261
 
1262
- #: lib/Models/Newsletter.php:696 views/newsletters.html:84
1263
  msgid "Active"
1264
  msgstr ""
1265
 
@@ -1315,30 +1326,30 @@ msgstr ""
1315
  msgid "Your email address is invalid!"
1316
  msgstr ""
1317
 
1318
- #: lib/Models/Subscriber.php:193
1319
  msgid "You need to wait before subscribing again."
1320
  msgstr ""
1321
 
1322
- #: lib/Models/Subscriber.php:291
1323
  msgid "Subscribers without a list (%s)"
1324
  msgstr ""
1325
 
1326
- #: lib/Models/Subscriber.php:352 lib/Subscription/Pages.php:301
1327
  #: views/segments.html:30 views/subscribers/subscribers.html:56
1328
  msgid "Subscribed"
1329
  msgstr ""
1330
 
1331
- #: lib/Models/Subscriber.php:357 views/segments.html:31
1332
  #: views/subscribers/subscribers.html:55
1333
  msgid "Unconfirmed"
1334
  msgstr ""
1335
 
1336
- #: lib/Models/Subscriber.php:362 lib/Subscription/Pages.php:309
1337
  #: views/segments.html:32 views/subscribers/subscribers.html:57
1338
  msgid "Unsubscribed"
1339
  msgstr ""
1340
 
1341
- #: lib/Models/Subscriber.php:367 lib/Subscription/Pages.php:317
1342
  #: views/segments.html:33 views/subscribers/subscribers.html:58
1343
  msgid "Bounced"
1344
  msgstr ""
@@ -1461,7 +1472,7 @@ msgid "Invalid router endpoint action"
1461
  msgstr ""
1462
 
1463
  #: lib/Settings/Pages.php:12 lib/Settings/Pages.php:13
1464
- #: lib/Settings/Pages.php:37 lib/Subscription/Pages.php:106
1465
  msgid "MailPoet Page"
1466
  msgstr ""
1467
 
@@ -1562,29 +1573,29 @@ msgstr ""
1562
  msgid "Yes, please add me to your mailing list."
1563
  msgstr ""
1564
 
1565
- #: lib/Subscription/Pages.php:102
1566
  msgid "Hmmm... we don't have a record of you."
1567
  msgstr ""
1568
 
1569
- #: lib/Subscription/Pages.php:132
1570
  msgid ""
1571
  "Your email address doesn't appear in our lists anymore. Sign up again or "
1572
  "contact us if this appears to be a mistake."
1573
  msgstr ""
1574
 
1575
- #: lib/Subscription/Pages.php:176 lib/Subscription/Pages.php:188
1576
  msgid "You have subscribed to: %s"
1577
  msgstr ""
1578
 
1579
- #: lib/Subscription/Pages.php:185
1580
  msgid "You are now subscribed!"
1581
  msgstr ""
1582
 
1583
- #: lib/Subscription/Pages.php:198 lib/Subscription/Pages.php:416
1584
  msgid "Manage your subscription"
1585
  msgstr ""
1586
 
1587
- #: lib/Subscription/Pages.php:204
1588
  msgid "You are now unsubscribed."
1589
  msgstr ""
1590
 
@@ -1597,16 +1608,16 @@ msgid "Your lists"
1597
  msgstr ""
1598
 
1599
  #: lib/Subscription/Pages.php:348 views/form/editor.html:29
1600
- #: views/form/editor.html:382 views/newsletter/templates/components/save.hbs:3
1601
  #: views/segments.html:56 views/subscribers/subscribers.html:96
1602
  msgid "Save"
1603
  msgstr ""
1604
 
1605
- #: lib/Subscription/Pages.php:380
1606
  msgid "[link]Edit your profile[/link] to update your email."
1607
  msgstr ""
1608
 
1609
- #: lib/Subscription/Pages.php:386
1610
  msgid "[link]Log in to your account[/link] to update your email."
1611
  msgstr ""
1612
 
@@ -1620,19 +1631,19 @@ msgstr ""
1620
  msgid "Accidentally unsubscribed?"
1621
  msgstr ""
1622
 
1623
- #: lib/Twig/Functions.php:88 views/settings/mta.html:985
1624
  msgid "every minute"
1625
  msgstr ""
1626
 
1627
- #: lib/Twig/Functions.php:89 views/settings/mta.html:986
1628
  msgid "every %1$d minutes"
1629
  msgstr ""
1630
 
1631
- #: lib/Twig/Functions.php:90 views/settings/mta.html:987
1632
  msgid "every hour"
1633
  msgstr ""
1634
 
1635
- #: lib/Twig/Functions.php:91 views/settings/mta.html:988
1636
  msgid "every %1$d hours"
1637
  msgstr ""
1638
 
@@ -1700,95 +1711,95 @@ msgstr ""
1700
  msgid "Add this form to your sidebar or footer on the [link]Widgets page[/link]."
1701
  msgstr ""
1702
 
1703
- #: views/form/editor.html:140
1704
  msgid "Copy and paste this [link]shortcode[/link] on to a post or page."
1705
  msgstr ""
1706
 
1707
- #: views/form/editor.html:149
1708
  msgid "%sPHP%s and %siFrame%s versions are also available."
1709
  msgstr ""
1710
 
1711
- #: views/form/editor.html:168
1712
  msgid "Fields"
1713
  msgstr ""
1714
 
1715
- #: views/form/editor.html:174
1716
  msgid "Add New Field"
1717
  msgstr ""
1718
 
1719
- #: views/form/editor.html:183
1720
  #: views/newsletter/templates/blocks/social/settings.hbs:3
1721
  #: views/newsletter/templates/components/sidebar/styles.hbs:2
1722
  msgid "Styles"
1723
  msgstr ""
1724
 
1725
- #: views/form/editor.html:193
1726
  #: views/newsletter/templates/components/sidebar/preview.hbs:2
1727
- #: views/newsletters.html:114 views/settings/basics.html:244
1728
  #: views/settings/basics.html:301 views/settings/signup.html:177
1729
  msgid "Preview"
1730
  msgstr ""
1731
 
1732
- #: views/form/editor.html:218
1733
  #: views/newsletter/templates/blocks/divider/widget.hbs:4
1734
  msgid "Divider"
1735
  msgstr ""
1736
 
1737
- #: views/form/editor.html:243
1738
  msgid "List selection"
1739
  msgstr ""
1740
 
1741
- #: views/form/editor.html:246
1742
  msgid "Select list(s):"
1743
  msgstr ""
1744
 
1745
- #: views/form/editor.html:252
1746
  msgid "Random text or HTML"
1747
  msgstr ""
1748
 
1749
- #: views/form/editor.html:255
1750
  msgid ""
1751
  "Subscribe to our newsletter and join [mailpoet_subscribers_count] other "
1752
  "subscribers."
1753
  msgstr ""
1754
 
1755
- #: views/form/editor.html:400
1756
  msgid "Edit name"
1757
  msgstr ""
1758
 
1759
- #: views/form/editor.html:414
1760
  msgid "The form name was successfully updated!"
1761
  msgstr ""
1762
 
1763
- #: views/form/editor.html:462
1764
  msgid "Form preview"
1765
  msgstr ""
1766
 
1767
- #: views/form/editor.html:509
1768
  msgid "Saved! The changes are now active in your widget."
1769
  msgstr ""
1770
 
1771
- #: views/form/editor.html:511
1772
  msgid "Saved! Add this form to %1$sa widget%2$s."
1773
  msgstr ""
1774
 
1775
- #: views/form/editor.html:584 views/subscribers/importExport/import.html:50
1776
  msgid "Add new field"
1777
  msgstr ""
1778
 
1779
- #: views/form/editor.html:604 views/form/templates/toolbar/fields.hbs:14
1780
  msgid "Edit field"
1781
  msgstr ""
1782
 
1783
- #: views/form/editor.html:625
1784
  msgid "This field will be deleted for all your subscribers. Are you sure?"
1785
  msgstr ""
1786
 
1787
- #: views/form/editor.html:643
1788
  msgid "Removed custom field %$1s"
1789
  msgstr ""
1790
 
1791
- #: views/form/editor.html:723
1792
  msgid "Edit field settings"
1793
  msgstr ""
1794
 
@@ -1826,7 +1837,7 @@ msgstr ""
1826
  #: views/newsletter/templates/blocks/posts/settingsDisplayOptions.hbs:221
1827
  #: views/premium.html:54 views/settings/advanced.html:90
1828
  #: views/settings/advanced.html:130 views/settings/bounce.html:190
1829
- #: views/settings/mta.html:569 views/settings/signup.html:34
1830
  #: views/subscribers/importExport/export.html:33
1831
  #: views/subscribers/importExport/import/step2.html:63
1832
  msgid "Yes"
@@ -1845,8 +1856,8 @@ msgstr ""
1845
  #: views/newsletter/templates/blocks/posts/settingsDisplayOptions.hbs:227
1846
  #: views/premium.html:60 views/premium.html:61 views/settings/advanced.html:101
1847
  #: views/settings/advanced.html:141 views/settings/bounce.html:148
1848
- #: views/settings/bounce.html:179 views/settings/mta.html:532
1849
- #: views/settings/mta.html:580 views/settings/signup.html:46
1850
  #: views/subscribers/importExport/export.html:38
1851
  #: views/subscribers/importExport/import/step2.html:67
1852
  msgid "No"
@@ -2142,12 +2153,12 @@ msgstr ""
2142
  msgid "%$1d forms have been restored from the trash."
2143
  msgstr ""
2144
 
2145
- #: views/forms.html:63 views/newsletters.html:78 views/segments.html:49
2146
  #: views/subscribers/subscribers.html:35
2147
  msgid "Edit"
2148
  msgstr ""
2149
 
2150
- #: views/forms.html:64 views/newsletters.html:79 views/segments.html:41
2151
  msgid "Duplicate"
2152
  msgstr ""
2153
 
@@ -2155,12 +2166,12 @@ msgstr ""
2155
  msgid "Form \"%$1s\" has been duplicated."
2156
  msgstr ""
2157
 
2158
- #: views/forms.html:67 views/newsletters.html:77 views/segments.html:51
2159
  #: views/subscribers/subscribers.html:38
2160
  msgid "Move to trash"
2161
  msgstr ""
2162
 
2163
- #: views/forms.html:68 views/newsletters.html:91 views/segments.html:48
2164
  #: views/subscribers/subscribers.html:93
2165
  msgid "Add New"
2166
  msgstr ""
@@ -2261,43 +2272,44 @@ msgstr ""
2261
  msgid "What will be kept in MailPoet 3"
2262
  msgstr ""
2263
 
2264
- #: views/mp2migration.html:12
2265
- msgid "Subscribers and lists"
2266
- msgstr ""
2267
-
2268
- #: views/mp2migration.html:14 views/mp2migration.html:15
2269
- msgid "soon"
2270
- msgstr ""
2271
-
2272
- #: views/mp2migration.html:15
2273
- msgid "Archive of sent newsletters"
2274
  msgstr ""
2275
 
2276
- #: views/mp2migration.html:24
2277
  msgid "Start upgrade"
2278
  msgstr ""
2279
 
2280
- #: views/mp2migration.html:25 views/newsletters.html:89
2281
  msgid "Pause"
2282
  msgstr ""
2283
 
2284
- #: views/mp2migration.html:26
2285
  msgid "No thanks, I'll skip and start from scratch."
2286
  msgstr ""
2287
 
2288
- #: views/mp2migration.html:36
2289
  msgid "Upgrade completed!"
2290
  msgstr ""
2291
 
2292
- #: views/mp2migration.html:37
 
 
 
 
 
 
2293
  msgid "Go to MailPoet"
2294
  msgstr ""
2295
 
2296
- #: views/mp2migration.html:41
2297
  msgid "Log..."
2298
  msgstr ""
2299
 
2300
- #: views/mp2migration.html:64
2301
  msgid "Importing…"
2302
  msgstr ""
2303
 
@@ -2732,7 +2744,7 @@ msgid "Edit settings"
2732
  msgstr ""
2733
 
2734
  #: views/newsletter/templates/blocks/base/toolsGeneric.hbs:6
2735
- #: views/newsletters.html:112
2736
  msgid "Delete"
2737
  msgstr ""
2738
 
@@ -2945,7 +2957,7 @@ msgstr ""
2945
  msgid "Preview text (usually displayed underneath the subject line in the inbox)"
2946
  msgstr ""
2947
 
2948
- #: views/newsletter/templates/components/save.hbs:5 views/newsletters.html:227
2949
  msgid "Next"
2950
  msgstr ""
2951
 
@@ -3048,7 +3060,7 @@ msgstr ""
3048
  msgid "Current page"
3049
  msgstr ""
3050
 
3051
- #: views/newsletters.html:61 views/newsletters.html:117
3052
  msgid "Subject"
3053
  msgstr ""
3054
 
@@ -3073,563 +3085,563 @@ msgid "Last modified on"
3073
  msgstr ""
3074
 
3075
  #: views/newsletters.html:70
3076
- msgid "1 email was moved to the trash."
3077
  msgstr ""
3078
 
3079
  #: views/newsletters.html:71
3080
- msgid "%$1d emails were moved to the trash."
3081
  msgstr ""
3082
 
3083
  #: views/newsletters.html:72
3084
- msgid "1 email was permanently deleted."
3085
  msgstr ""
3086
 
3087
  #: views/newsletters.html:73
3088
- msgid "%$1d emails were permanently deleted."
3089
  msgstr ""
3090
 
3091
  #: views/newsletters.html:74
3092
- msgid "1 email has been restored from the Trash."
3093
  msgstr ""
3094
 
3095
  #: views/newsletters.html:75
 
 
 
 
3096
  msgid "%$1d emails have been restored from the Trash."
3097
  msgstr ""
3098
 
3099
- #: views/newsletters.html:80
3100
  msgid "Email \"%$1s\" has been duplicated."
3101
  msgstr ""
3102
 
3103
- #: views/newsletters.html:81
3104
  msgid "Not sent yet"
3105
  msgstr ""
3106
 
3107
- #: views/newsletters.html:82
3108
  msgid "Scheduled for"
3109
  msgstr ""
3110
 
3111
- #: views/newsletters.html:83
3112
  msgid "Schedule it"
3113
  msgstr ""
3114
 
3115
- #: views/newsletters.html:85
3116
  msgid "Not Active"
3117
  msgstr ""
3118
 
3119
- #: views/newsletters.html:86
3120
  msgid "Sent to %$1d of %$2d"
3121
  msgstr ""
3122
 
3123
- #: views/newsletters.html:87
3124
  msgid "Sent to %$1d subscribers"
3125
  msgstr ""
3126
 
3127
- #: views/newsletters.html:88
3128
  msgid "Resume"
3129
  msgstr ""
3130
 
3131
- #: views/newsletters.html:90
3132
  msgid "Paused"
3133
  msgstr ""
3134
 
3135
- #: views/newsletters.html:93
3136
  msgid "Excellent"
3137
  msgstr ""
3138
 
3139
- #: views/newsletters.html:94
3140
  msgid "Congrats!"
3141
  msgstr ""
3142
 
3143
- #: views/newsletters.html:95
3144
  msgid "Good"
3145
  msgstr ""
3146
 
3147
- #: views/newsletters.html:96
3148
  msgid "Good stuff."
3149
  msgstr ""
3150
 
3151
- #: views/newsletters.html:97
3152
  msgid "Bad"
3153
  msgstr ""
3154
 
3155
- #: views/newsletters.html:98
3156
  msgid "Something to improve."
3157
  msgstr ""
3158
 
3159
- #: views/newsletters.html:99
3160
  msgid ""
3161
  "Above 30% is excellent.\\\\n"
3162
  "Between 10 and 30% is good.\\\\n"
3163
  "Under 10% is bad."
3164
  msgstr ""
3165
 
3166
- #: views/newsletters.html:100
3167
  msgid ""
3168
  "Above 3% is excellent.\\\\n"
3169
  "Between 1 and 3% is good.\\\\n"
3170
  "Under 1% is bad."
3171
  msgstr ""
3172
 
3173
- #: views/newsletters.html:101
3174
  msgid ""
3175
  "Under 1% is excellent.\\\\n"
3176
  "Between 1 and 3% is good.\\\\n"
3177
  "Over 3% is bad."
3178
  msgstr ""
3179
 
3180
- #: views/newsletters.html:102
3181
  msgid "Nice job! Check back in %$1d hour(s) for more stats."
3182
  msgstr ""
3183
 
3184
- #: views/newsletters.html:103
3185
  msgid "What can I do to improve this?"
3186
  msgstr ""
3187
 
3188
- #: views/newsletters.html:105
3189
  msgid "This template file appears to be damaged. Please try another one."
3190
  msgstr ""
3191
 
3192
- #: views/newsletters.html:106
3193
  msgid "Import a template"
3194
  msgstr ""
3195
 
3196
- #: views/newsletters.html:107
3197
  msgid "Select a .json file to upload"
3198
  msgstr ""
3199
 
3200
- #: views/newsletters.html:108
3201
  msgid "Upload"
3202
  msgstr ""
3203
 
3204
- #: views/newsletters.html:109
3205
  msgid "MailPoet's Guide"
3206
  msgstr ""
3207
 
3208
- #: views/newsletters.html:110
3209
  msgid "This is the standard template that comes with MailPoet."
3210
  msgstr ""
3211
 
3212
- #: views/newsletters.html:111
3213
  msgid "You are about to delete the template named \"%$1s\"."
3214
  msgstr ""
3215
 
3216
- #: views/newsletters.html:115
3217
  msgid "Select a responsive template"
3218
  msgstr ""
3219
 
3220
- #: views/newsletters.html:118
3221
  msgid "Select type of email"
3222
  msgstr ""
3223
 
3224
- #: views/newsletters.html:120
3225
  msgid ""
3226
  "Send a newsletter with images, buttons, dividers, and social bookmarks. Or, "
3227
  "just send a basic text email."
3228
  msgstr ""
3229
 
3230
- #: views/newsletters.html:121
3231
  msgid "Create"
3232
  msgstr ""
3233
 
3234
- #: views/newsletters.html:122
3235
  msgid "Welcome Email"
3236
  msgstr ""
3237
 
3238
- #: views/newsletters.html:123
3239
  msgid ""
3240
  "Automatically send an email (or series of emails) to new subscribers or "
3241
  "WordPress users. Send a day, a week, or a month after they sign up."
3242
  msgstr ""
3243
 
3244
- #: views/newsletters.html:124 views/subscribers/subscribers.html:23
3245
  msgid "Get premium version!"
3246
  msgstr ""
3247
 
3248
- #: views/newsletters.html:125
3249
  msgid "Set up"
3250
  msgstr ""
3251
 
3252
- #: views/newsletters.html:126
3253
  msgid "Latest Post Notifications"
3254
  msgstr ""
3255
 
3256
- #: views/newsletters.html:127
3257
  msgid ""
3258
  "Let MailPoet email your subscribers with your latest content. You can send "
3259
  "daily, weekly, monthly, or even immediately after publication."
3260
  msgstr ""
3261
 
3262
- #: views/newsletters.html:128
3263
  msgid "Select a frequency"
3264
  msgstr ""
3265
 
3266
- #: views/newsletters.html:129
3267
  msgid ""
3268
  "Insert [newsletter:total] to show number of posts, [newsletter:post_title] "
3269
  "to show the latest post's title & [newsletter:number] to display the issue "
3270
  "number."
3271
  msgstr ""
3272
 
3273
- #: views/newsletters.html:130 views/settings/mta.html:97
3274
- #: views/settings/mta.html:635
3275
  msgid "Activate"
3276
  msgstr ""
3277
 
3278
- #: views/newsletters.html:131
3279
  msgid "Send this Welcome Email when..."
3280
  msgstr ""
3281
 
3282
- #: views/newsletters.html:133
3283
  msgid "Once a day at..."
3284
  msgstr ""
3285
 
3286
- #: views/newsletters.html:134
3287
  msgid "Weekly on..."
3288
  msgstr ""
3289
 
3290
- #: views/newsletters.html:135
3291
  msgid "Monthly on the..."
3292
  msgstr ""
3293
 
3294
- #: views/newsletters.html:136
3295
  msgid "Monthly every..."
3296
  msgstr ""
3297
 
3298
- #: views/newsletters.html:137
3299
  msgid "Immediately"
3300
  msgstr ""
3301
 
3302
- #: views/newsletters.html:138
3303
  msgid "Sunday"
3304
  msgstr ""
3305
 
3306
- #: views/newsletters.html:139
3307
  msgid "Monday"
3308
  msgstr ""
3309
 
3310
- #: views/newsletters.html:140
3311
  msgid "Tuesday"
3312
  msgstr ""
3313
 
3314
- #: views/newsletters.html:141
3315
  msgid "Wednesday"
3316
  msgstr ""
3317
 
3318
- #: views/newsletters.html:142
3319
  msgid "Thursday"
3320
  msgstr ""
3321
 
3322
- #: views/newsletters.html:143
3323
  msgid "Friday"
3324
  msgstr ""
3325
 
3326
- #: views/newsletters.html:144
3327
  msgid "Saturday"
3328
  msgstr ""
3329
 
3330
- #: views/newsletters.html:145
3331
  msgid "1st"
3332
  msgstr ""
3333
 
3334
- #: views/newsletters.html:146
3335
  msgid "2nd"
3336
  msgstr ""
3337
 
3338
- #: views/newsletters.html:147
3339
  msgid "3rd"
3340
  msgstr ""
3341
 
3342
- #: views/newsletters.html:148
3343
  msgid "%$1dth"
3344
  msgstr ""
3345
 
3346
- #: views/newsletters.html:152
3347
  msgid "When is this Welcome Email sent?"
3348
  msgstr ""
3349
 
3350
- #: views/newsletters.html:154
3351
  msgid "When someone subscribes to the list..."
3352
  msgstr ""
3353
 
3354
- #: views/newsletters.html:155
3355
  msgid "When a new WordPress user is added to your site..."
3356
  msgstr ""
3357
 
3358
- #: views/newsletters.html:156
3359
  msgid "immediately"
3360
  msgstr ""
3361
 
3362
- #: views/newsletters.html:157
3363
  msgid "hour(s) later"
3364
  msgstr ""
3365
 
3366
- #: views/newsletters.html:158
3367
  msgid "day(s) later"
3368
  msgstr ""
3369
 
3370
- #: views/newsletters.html:159
3371
  msgid "week(s) later"
3372
  msgstr ""
3373
 
3374
- #: views/newsletters.html:161
3375
  msgid "Subject line"
3376
  msgstr ""
3377
 
3378
- #: views/newsletters.html:162
3379
  msgid ""
3380
  "Be creative! It's the first thing that your subscribers see. Tempt them to "
3381
  "open your email."
3382
  msgstr ""
3383
 
3384
- #: views/newsletters.html:163
3385
  msgid "Please specify a subject"
3386
  msgstr ""
3387
 
3388
- #: views/newsletters.html:165
3389
  msgid "This subscriber segment will be used for this email."
3390
  msgstr ""
3391
 
3392
- #: views/newsletters.html:166 views/subscribers/subscribers.html:59
3393
  msgid "Select a list"
3394
  msgstr ""
3395
 
3396
- #: views/newsletters.html:168
3397
  msgid "Sender"
3398
  msgstr ""
3399
 
3400
- #: views/newsletters.html:169
3401
  msgid "Your name and email"
3402
  msgstr ""
3403
 
3404
- #: views/newsletters.html:170 views/newsletters.html:174
3405
  msgid "John Doe"
3406
  msgstr ""
3407
 
3408
- #: views/newsletters.html:171 views/newsletters.html:175
3409
  msgid "john.doe@email.com"
3410
  msgstr ""
3411
 
3412
- #: views/newsletters.html:172 views/settings/basics.html:29
3413
  #: views/settings/signup.html:85
3414
  msgid "Reply-to"
3415
  msgstr ""
3416
 
3417
- #: views/newsletters.html:173
3418
  msgid ""
3419
  "When your subscribers reply to your emails, their emails will go to this "
3420
  "address."
3421
  msgstr ""
3422
 
3423
- #: views/newsletters.html:176
3424
  msgid "Email was updated successfully!"
3425
  msgstr ""
3426
 
3427
- #: views/newsletters.html:177
3428
  msgid "Email was added successfully!"
3429
  msgstr ""
3430
 
3431
- #: views/newsletters.html:178
3432
  msgid ""
3433
  "An error occurred while trying to send. <a href=\"%$1s\">Please check your "
3434
  "settings</a>."
3435
  msgstr ""
3436
 
3437
- #: views/newsletters.html:179
3438
  msgid "Final Step: Last Details"
3439
  msgstr ""
3440
 
3441
- #: views/newsletters.html:180
3442
  msgid "Save as draft and close"
3443
  msgstr ""
3444
 
3445
- #: views/newsletters.html:181
3446
  msgid "or simply"
3447
  msgstr ""
3448
 
3449
- #: views/newsletters.html:182
3450
  msgid "go back to the Design page"
3451
  msgstr ""
3452
 
3453
- #: views/newsletters.html:183
3454
  msgid "Your website’s time is"
3455
  msgstr ""
3456
 
3457
- #: views/newsletters.html:184
3458
  msgid "Please enter the scheduled date."
3459
  msgstr ""
3460
 
3461
- #: views/newsletters.html:185
3462
  msgid "Schedule"
3463
  msgstr ""
3464
 
3465
- #: views/newsletters.html:187
3466
  msgid "Close"
3467
  msgstr ""
3468
 
3469
- #: views/newsletters.html:188
3470
  msgid "Today"
3471
  msgstr ""
3472
 
3473
- #: views/newsletters.html:201
3474
  msgid "Jan"
3475
  msgstr ""
3476
 
3477
- #: views/newsletters.html:202
3478
  msgid "Feb"
3479
  msgstr ""
3480
 
3481
- #: views/newsletters.html:203
3482
  msgid "Mar"
3483
  msgstr ""
3484
 
3485
- #: views/newsletters.html:204
3486
  msgid "Apr"
3487
  msgstr ""
3488
 
3489
- #: views/newsletters.html:206
3490
  msgid "Jun"
3491
  msgstr ""
3492
 
3493
- #: views/newsletters.html:207
3494
  msgid "Jul"
3495
  msgstr ""
3496
 
3497
- #: views/newsletters.html:208
3498
  msgid "Aug"
3499
  msgstr ""
3500
 
3501
- #: views/newsletters.html:209
3502
  msgid "Sep"
3503
  msgstr ""
3504
 
3505
- #: views/newsletters.html:210
3506
  msgid "Oct"
3507
  msgstr ""
3508
 
3509
- #: views/newsletters.html:211
3510
  msgid "Nov"
3511
  msgstr ""
3512
 
3513
- #: views/newsletters.html:212
3514
  msgid "Dec"
3515
  msgstr ""
3516
 
3517
- #: views/newsletters.html:213
3518
  msgid "Sun"
3519
  msgstr ""
3520
 
3521
- #: views/newsletters.html:214
3522
  msgid "Mon"
3523
  msgstr ""
3524
 
3525
- #: views/newsletters.html:215
3526
  msgid "Tue"
3527
  msgstr ""
3528
 
3529
- #: views/newsletters.html:216
3530
  msgid "Wed"
3531
  msgstr ""
3532
 
3533
- #: views/newsletters.html:217
3534
  msgid "Thu"
3535
  msgstr ""
3536
 
3537
- #: views/newsletters.html:218
3538
  msgid "Fri"
3539
  msgstr ""
3540
 
3541
- #: views/newsletters.html:219
3542
  msgid "Sat"
3543
  msgstr ""
3544
 
3545
- #: views/newsletters.html:228
3546
  msgid "Previous"
3547
  msgstr ""
3548
 
3549
- #: views/newsletters.html:229
3550
  msgid "The newsletter is being sent..."
3551
  msgstr ""
3552
 
3553
- #: views/newsletters.html:230
3554
  msgid "The newsletter has been scheduled."
3555
  msgstr ""
3556
 
3557
- #: views/newsletters.html:231
3558
  msgid "Your Welcome Email is now activated!"
3559
  msgstr ""
3560
 
3561
- #: views/newsletters.html:232
3562
  msgid "Your Welcome Email could not be activated, please check the settings."
3563
  msgstr ""
3564
 
3565
- #: views/newsletters.html:233
3566
  msgid "Your post notification is now active!"
3567
  msgstr ""
3568
 
3569
- #: views/newsletters.html:234
3570
  msgid "Your Post Notification could not be activated, check the settings."
3571
  msgstr ""
3572
 
3573
- #: views/newsletters.html:235
3574
  msgid "This newsletter is sent when someone subscribes to the list: \"%$1s\""
3575
  msgstr ""
3576
 
3577
- #: views/newsletters.html:236
3578
  msgid "This newsletter is sent when a new WordPress user is added to your site"
3579
  msgstr ""
3580
 
3581
- #: views/newsletters.html:237
3582
  msgid ""
3583
  "This newsletter is sent when a new WordPress user with the role \"%$1s\" is "
3584
  "added to your site"
3585
  msgstr ""
3586
 
3587
- #: views/newsletters.html:238
3588
  msgid "%$1d hour(s) later"
3589
  msgstr ""
3590
 
3591
- #: views/newsletters.html:239
3592
  msgid "%$1d day(s) later"
3593
  msgstr ""
3594
 
3595
- #: views/newsletters.html:240
3596
  msgid "%$1d week(s) later"
3597
  msgstr ""
3598
 
3599
- #: views/newsletters.html:241
3600
  msgid "Send daily at %$1s"
3601
  msgstr ""
3602
 
3603
- #: views/newsletters.html:242
3604
  msgid "Send weekly on %$1s at %$2s"
3605
  msgstr ""
3606
 
3607
- #: views/newsletters.html:243
3608
  msgid "Send monthly on the %$1s at %$2s"
3609
  msgstr ""
3610
 
3611
- #: views/newsletters.html:244
3612
  msgid "Send every %$1s %$2s of the month at %$3s"
3613
  msgstr ""
3614
 
3615
- #: views/newsletters.html:245
3616
  msgid "Send immediately"
3617
  msgstr ""
3618
 
3619
- #: views/newsletters.html:246
3620
  msgid "if there's new content to %$1s."
3621
  msgstr ""
3622
 
3623
- #: views/newsletters.html:247
3624
  msgid "You need to select a list to send to."
3625
  msgstr ""
3626
 
3627
- #: views/newsletters.html:249
3628
- msgid "Back to Post notifications"
3629
- msgstr ""
3630
-
3631
  #: views/newsletters.html:250
3632
- msgid "Sent on"
3633
  msgstr ""
3634
 
3635
  #: views/newsletters.html:251
@@ -4117,11 +4129,11 @@ msgstr ""
4117
  msgid "Hostname"
4118
  msgstr ""
4119
 
4120
- #: views/settings/bounce.html:50 views/settings/mta.html:493
4121
  msgid "Login"
4122
  msgstr ""
4123
 
4124
- #: views/settings/bounce.html:67 views/settings/mta.html:510
4125
  msgid "Password"
4126
  msgstr ""
4127
 
@@ -4173,210 +4185,205 @@ msgstr ""
4173
  msgid "Is it working? Try to connect"
4174
  msgstr ""
4175
 
4176
- #: views/settings/mta.html:69
4177
  msgid "You're now sending with MailPoet!"
4178
  msgstr ""
4179
 
4180
- #: views/settings/mta.html:71
4181
  msgid "Great, you're all set up. Your emails will now be sent quickly and reliably!"
4182
  msgstr ""
4183
 
4184
- #: views/settings/mta.html:78
4185
  msgid "Solve all of your sending problems!"
4186
  msgstr ""
4187
 
4188
- #: views/settings/mta.html:80
4189
  msgid ""
4190
  "Let MailPoet send your emails and get the Premium features for as little as "
4191
  "10 dollars or euros per month."
4192
  msgstr ""
4193
 
4194
- #: views/settings/mta.html:86 views/welcome.html:50
4195
  msgid "Find out more"
4196
  msgstr ""
4197
 
4198
- #: views/settings/mta.html:90 views/settings/mta.html:113
4199
- #: views/settings/mta.html:135
4200
  msgid "Activated"
4201
  msgstr ""
4202
 
4203
- #: views/settings/mta.html:104
4204
- msgid "Your web host / web server"
4205
  msgstr ""
4206
 
4207
- #: views/settings/mta.html:107
4208
- msgid "Free, but not recommended"
4209
  msgstr ""
4210
 
4211
- #: views/settings/mta.html:109
4212
  msgid ""
4213
- "Web hosts generally have a bad reputation as a sender. Your newsletter will "
4214
- "probably be considered spam."
4215
  msgstr ""
4216
 
4217
- #: views/settings/mta.html:119 views/settings/mta.html:141
4218
  msgid "Configure"
4219
  msgstr ""
4220
 
4221
- #: views/settings/mta.html:126
4222
- msgid "Third-party"
 
 
4223
  msgstr ""
4224
 
4225
- #: views/settings/mta.html:129
4226
- msgid "For SMTP, SendGrid or Amazon SES"
4227
  msgstr ""
4228
 
4229
- #: views/settings/mta.html:131
4230
- msgid "We only recommend using a third-party service if you are a technical user."
4231
  msgstr ""
4232
 
4233
- #: views/settings/mta.html:147
4234
- msgid ""
4235
- "Need help to pick? [link]Check out the comparison table of sending "
4236
- "methods[/link]."
4237
  msgstr ""
4238
 
4239
- #: views/settings/mta.html:164 views/settings/mta.html:297
4240
- msgid "Sending frequency"
4241
  msgstr ""
4242
 
4243
- #: views/settings/mta.html:175
4244
- msgid "Safe default values"
4245
  msgstr ""
4246
 
4247
- #: views/settings/mta.html:183
4248
- msgid "I'll set my own frequency"
 
 
 
 
 
 
 
 
4249
  msgstr ""
4250
 
4251
- #: views/settings/mta.html:188
4252
- msgid "Input your host's recommended sending frequency"
4253
  msgstr ""
4254
 
4255
- #: views/settings/mta.html:221 views/settings/mta.html:314
4256
  msgid "emails"
4257
  msgstr ""
4258
 
4259
- #: views/settings/mta.html:238 views/settings/mta.html:331
4260
  msgid "recommended"
4261
  msgstr ""
4262
 
4263
- #: views/settings/mta.html:247
4264
  msgid ""
4265
  "<strong>Warning!</strong> Sending more than the recommended amount of "
4266
  "emails? You may break the terms of your web host or provider!"
4267
  msgstr ""
4268
 
4269
- #: views/settings/mta.html:249
4270
  msgid ""
4271
  "Please ask your host for the maximum number of emails you are allowed to "
4272
  "send per day."
4273
  msgstr ""
4274
 
4275
- #: views/settings/mta.html:265
4276
- msgid "Provider"
4277
- msgstr ""
4278
-
4279
- #: views/settings/mta.html:275
4280
- msgid "Custom SMTP"
4281
- msgstr ""
4282
-
4283
- #: views/settings/mta.html:278
4284
- msgid "Select your provider"
4285
- msgstr ""
4286
-
4287
- #: views/settings/mta.html:344
4288
  msgid "SMTP Hostname"
4289
  msgstr ""
4290
 
4291
- #: views/settings/mta.html:347 views/settings/mta.html:458
4292
  msgid "e.g.: smtp.mydomain.com"
4293
  msgstr ""
4294
 
4295
- #: views/settings/mta.html:363
4296
  msgid "SMTP Port"
4297
  msgstr ""
4298
 
4299
- #: views/settings/mta.html:384
4300
  msgid "Region"
4301
  msgstr ""
4302
 
4303
- #: views/settings/mta.html:413
4304
  msgid "Access Key"
4305
  msgstr ""
4306
 
4307
- #: views/settings/mta.html:434
4308
  msgid "Secret Key"
4309
  msgstr ""
4310
 
4311
- #: views/settings/mta.html:455
4312
  msgid "Domain"
4313
  msgstr ""
4314
 
4315
- #: views/settings/mta.html:475
4316
  msgid "API Key"
4317
  msgstr ""
4318
 
4319
- #: views/settings/mta.html:527
4320
  msgid "Secure Connection"
4321
  msgstr ""
4322
 
4323
- #: views/settings/mta.html:552
4324
  msgid "Authentication"
4325
  msgstr ""
4326
 
4327
- #: views/settings/mta.html:555
4328
  msgid ""
4329
  "Leave this option set to Yes. Only a tiny portion of SMTP services prefer "
4330
  "Authentication to be turned off."
4331
  msgstr ""
4332
 
4333
- #: views/settings/mta.html:594
4334
  msgid "SPF Signature (Highly recommended!)"
4335
  msgstr ""
4336
 
4337
- #: views/settings/mta.html:597
4338
  msgid ""
4339
  "This improves your delivery rate by verifying that you're allowed to send "
4340
  "emails from your domain."
4341
  msgstr ""
4342
 
4343
- #: views/settings/mta.html:602
4344
  msgid ""
4345
  "SPF is set up in your DNS. Read your host's support documentation for more "
4346
  "information."
4347
  msgstr ""
4348
 
4349
- #: views/settings/mta.html:610
4350
  msgid "Test the sending method"
4351
  msgstr ""
4352
 
4353
- #: views/settings/mta.html:624
4354
  msgid "Send a test email"
4355
  msgstr ""
4356
 
4357
- #: views/settings/mta.html:640
4358
  msgid "or Cancel"
4359
  msgstr ""
4360
 
4361
- #: views/settings/mta.html:685
4362
  msgid ""
4363
  "The email could not be sent. Make sure the option \"Email notifications\" "
4364
  "has a FROM email address in the Basics tab."
4365
  msgstr ""
4366
 
4367
- #: views/settings/mta.html:698
4368
  msgid "This is a Sending Method Test"
4369
  msgstr ""
4370
 
4371
- #: views/settings/mta.html:700 views/settings/mta.html:701
4372
  msgid "Yup, it works! You can start blasting away emails to the moon."
4373
  msgstr ""
4374
 
4375
- #: views/settings/mta.html:710
4376
  msgid "The email has been sent! Check your inbox."
4377
  msgstr ""
4378
 
4379
- #: views/settings/mta.html:760
4380
  msgid "You have selected an invalid sending method."
4381
  msgstr ""
4382
 
@@ -5019,6 +5026,11 @@ msgid ""
5019
  "newsletter. Sign up below!"
5020
  msgstr ""
5021
 
 
 
 
 
 
5022
  #: lib/Config/Menu.php:80
5023
  msgctxt "newsletters per page (screen options)"
5024
  msgid "Number of newsletters per page"
@@ -5054,7 +5066,7 @@ msgctxt "cancel color selection"
5054
  msgid "Cancel"
5055
  msgstr ""
5056
 
5057
- #: views/newsletters.html:113 views/subscribers/importExport/export.html:52
5058
  #: views/subscribers/importExport/export.html:63
5059
  #: views/subscribers/importExport/import/step1.html:95
5060
  #: views/subscribers/importExport/import/step2.html:41
@@ -5062,47 +5074,47 @@ msgctxt "Verb"
5062
  msgid "Select"
5063
  msgstr ""
5064
 
5065
- #: views/newsletters.html:149
5066
  msgctxt "e.g. monthly every last Monday"
5067
  msgid "last"
5068
  msgstr ""
5069
 
5070
- #: views/newsletters.html:150
5071
  msgctxt "Button label: Next step"
5072
  msgid "Next"
5073
  msgstr ""
5074
 
5075
- #: views/newsletters.html:220
5076
  msgctxt "Sunday - one letter abbreviation"
5077
  msgid "S"
5078
  msgstr ""
5079
 
5080
- #: views/newsletters.html:221
5081
  msgctxt "Monday - one letter abbreviation"
5082
  msgid "M"
5083
  msgstr ""
5084
 
5085
- #: views/newsletters.html:222
5086
  msgctxt "Tuesday - one letter abbreviation"
5087
  msgid "T"
5088
  msgstr ""
5089
 
5090
- #: views/newsletters.html:223
5091
  msgctxt "Wednesday - one letter abbreviation"
5092
  msgid "W"
5093
  msgstr ""
5094
 
5095
- #: views/newsletters.html:224
5096
  msgctxt "Thursday - one letter abbreviation"
5097
  msgid "T"
5098
  msgstr ""
5099
 
5100
- #: views/newsletters.html:225
5101
  msgctxt "Friday - one letter abbreviation"
5102
  msgid "F"
5103
  msgstr ""
5104
 
5105
- #: views/newsletters.html:226
5106
  msgctxt "Saturday - one letter abbreviation"
5107
  msgid "S"
5108
  msgstr ""
4
  msgstr ""
5
  "Project-Id-Version: \n"
6
  "Report-Msgid-Bugs-To: http://support.mailpoet.com/\n"
7
+ "POT-Creation-Date: 2017-07-11 11:33:48+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
153
  msgstr ""
154
 
155
  #: lib/API/JSON/v1/Services.php:63
156
+ msgid "Error validating MailPoet Sending Service key, please try again later (%s)"
 
 
157
  msgstr ""
158
 
159
  #: lib/API/JSON/v1/Services.php:94 views/settings/premium.html:30
173
  msgstr ""
174
 
175
  #: lib/API/JSON/v1/Services.php:119
176
+ msgid "Error validating Premium key, please try again later (%s)"
177
+ msgstr ""
178
+
179
+ #: lib/API/JSON/v1/Services.php:131
180
+ msgid "Service unavailable"
181
+ msgstr ""
182
+
183
+ #: lib/API/JSON/v1/Services.php:134
184
+ msgid ""
185
+ "Contact your hosting support to check the connection between your host and "
186
+ "https://bridge.mailpoet.com"
187
  msgstr ""
188
 
189
  #: lib/API/JSON/v1/Settings.php:20
206
 
207
  #: lib/API/MP/v1/API.php:21
208
  #: lib/Subscribers/ImportExport/ImportExportFactory.php:33
209
+ #: lib/Subscription/Pages.php:278 views/form/editor.html:219
210
+ #: views/form/editor.html:222 views/subscribers/subscribers.html:52
211
  msgid "First name"
212
  msgstr ""
213
 
214
  #: lib/API/MP/v1/API.php:25
215
  #: lib/Subscribers/ImportExport/ImportExportFactory.php:34
216
+ #: lib/Subscription/Pages.php:287 views/form/editor.html:228
217
+ #: views/form/editor.html:231 views/subscribers/subscribers.html:53
218
  msgid "Last name"
219
  msgstr ""
220
 
238
  msgid "START IMPORT"
239
  msgstr ""
240
 
241
+ #: lib/Config/MP2Migrator.php:168 views/mp2migration.html:67
242
  msgid "IMPORT COMPLETE"
243
  msgstr ""
244
 
245
+ #: lib/Config/MP2Migrator.php:171
246
  msgid "END IMPORT"
247
  msgstr ""
248
 
249
+ #: lib/Config/MP2Migrator.php:195
250
  msgid "MailPoet data erased"
251
  msgstr ""
252
 
253
+ #: lib/Config/MP2Migrator.php:225 views/mp2migration.html:69
254
  msgid "IMPORT STOPPED BY USER"
255
  msgstr ""
256
 
257
+ #: lib/Config/MP2Migrator.php:257
258
  msgid "MailPoet 2 data found:"
259
  msgstr ""
260
 
261
+ #: lib/Config/MP2Migrator.php:262
262
  msgid "%d subscribers list"
263
  msgid_plural "%d subscribers lists"
264
  msgstr[0] ""
265
  msgstr[1] ""
266
 
267
+ #: lib/Config/MP2Migrator.php:267
268
  msgid "%d subscriber"
269
  msgid_plural "%d subscribers"
270
  msgstr[0] ""
271
  msgstr[1] ""
272
 
273
+ #: lib/Config/MP2Migrator.php:272
274
  msgid "%d form"
275
  msgid_plural "%d forms"
276
  msgstr[0] ""
277
  msgstr[1] ""
278
 
279
+ #: lib/Config/MP2Migrator.php:289
280
  msgid "Importing segments..."
281
  msgstr ""
282
 
283
+ #: lib/Config/MP2Migrator.php:310
284
  msgid "%d segment imported"
285
  msgid_plural "%d segments imported"
286
  msgstr[0] ""
287
  msgstr[1] ""
288
 
289
+ #: lib/Config/MP2Migrator.php:379
290
  msgid "Importing custom fields..."
291
  msgstr ""
292
 
293
+ #: lib/Config/MP2Migrator.php:389
294
  msgid "%d custom field imported"
295
  msgid_plural "%d custom fields imported"
296
  msgstr[0] ""
297
  msgstr[1] ""
298
 
299
+ #: lib/Config/MP2Migrator.php:527
300
  msgid "Importing subscribers..."
301
  msgstr ""
302
 
303
+ #: lib/Config/MP2Migrator.php:549
304
  msgid "%d subscriber imported"
305
  msgid_plural "%d subscribers imported"
306
  msgstr[0] ""
307
  msgstr[1] ""
308
 
309
+ #: lib/Config/MP2Migrator.php:775
310
  msgid "Importing forms..."
311
  msgstr ""
312
 
313
+ #: lib/Config/MP2Migrator.php:794
314
  msgid "%d form imported"
315
  msgid_plural "%d forms imported"
316
  msgstr[0] ""
317
  msgstr[1] ""
318
 
319
+ #: lib/Config/MP2Migrator.php:1058
320
+ msgid "Settings imported"
321
+ msgstr ""
322
+
323
  #: lib/Config/Menu.php:67 lib/Config/Menu.php:68 views/newsletters.html:23
324
  msgid "Emails"
325
  msgstr ""
326
 
327
  #: lib/Config/Menu.php:91 lib/Config/Menu.php:92 views/forms.html:25
 
328
  msgid "Forms"
329
  msgstr ""
330
 
334
  msgstr ""
335
 
336
  #: lib/Config/Menu.php:137 lib/Config/Menu.php:138 views/forms.html:53
337
+ #: views/newsletters.html:64 views/newsletters.html:165 views/segments.html:13
338
  #: views/subscribers/subscribers.html:66
339
  msgid "Lists"
340
  msgstr ""
341
 
342
  #: lib/Config/Menu.php:161 lib/Config/Menu.php:162 views/form/editor.html:37
343
+ #: views/newsletters.html:65 views/settings.html:6
344
  msgid "Settings"
345
  msgstr ""
346
 
384
 
385
  #: lib/Config/Menu.php:270 lib/Newsletter/Shortcodes/ShortcodesHelper.php:32
386
  #: views/newsletter/templates/components/sidebar/styles.hbs:74
387
+ #: views/newsletters.html:120
388
  msgid "Newsletter"
389
  msgstr ""
390
 
406
  "might work within a MultiSite environment, we don’t support it."
407
  msgstr ""
408
 
409
+ #: lib/Config/Populator.php:156
410
  msgid "My First List"
411
  msgstr ""
412
 
413
+ #: lib/Config/Populator.php:158
414
  msgid "This list is automatically created when you install MailPoet."
415
  msgstr ""
416
 
940
  "Please read our [link]instructions[/link] on how to resolve this issue."
941
  msgstr ""
942
 
943
+ #: lib/Config/RequirementsChecker.php:89
944
  msgid ""
945
  "MailPoet requires a PDO_MYSQL PHP extension. Please read our "
946
  "[link]instructions[/link] on how to resolve this issue."
947
  msgstr ""
948
 
949
+ #: lib/Config/RequirementsChecker.php:106
950
  msgid ""
951
  "MailPoet requires an XML PHP extension. Please read our "
952
  "[link]instructions[/link] on how to resolve this issue."
953
  msgstr ""
954
 
955
+ #: lib/Config/RequirementsChecker.php:116
956
  msgid ""
957
  "MailPoet requires a ZIP PHP extension. Please read our "
958
  "[link]instructions[/link] on how to resolve this issue."
959
  msgstr ""
960
 
961
+ #: lib/Config/RequirementsChecker.php:128
962
  msgid ""
963
  "A MailPoet dependency (%s) does not appear to be loaded correctly, thus "
964
  "MailPoet will not work correctly. Please reinstall the plugin."
965
  msgstr ""
966
 
967
+ #: lib/Config/RequirementsChecker.php:139
968
  msgid ""
969
  "MailPoet has detected a dependency conflict (%s) with another plugin (%s), "
970
  "which may cause unexpected behavior. Please disable the offending plugin to "
977
  "[link]Visit MailPoet.com to purchase a key[/link]"
978
  msgstr ""
979
 
980
+ #: lib/Config/ServicesChecker.php:43
981
  msgid ""
982
  "Your newsletters are awesome! Don't forget to [link]upgrade your MailPoet "
983
  "email plan[/link] by %s to keep sending them to your subscribers."
984
  msgstr ""
985
 
986
+ #: lib/Config/ServicesChecker.php:74
987
  msgid ""
988
  "Warning! Your License Key is either invalid or expired. [link]Renew your "
989
  "License now[/link] to enjoy automatic updates and Premium support."
990
  msgstr ""
991
 
992
+ #: lib/Config/ServicesChecker.php:88
993
  msgid ""
994
  "Your License Key is expiring! Don't forget to [link]renew your "
995
  "license[/link] by %s to keep enjoying automatic updates and Premium support."
1028
  msgstr ""
1029
 
1030
  #: lib/Form/Block/Base.php:18 views/form/editor.html:55
1031
+ #: views/newsletters.html:168
1032
  msgid "Please select a list"
1033
  msgstr ""
1034
 
1084
  msgid "Month (January, February,...)"
1085
  msgstr ""
1086
 
1087
+ #: lib/Form/Block/Date.php:124 views/newsletters.html:190
1088
  #: views/subscribers/importExport/import.html:56
1089
  msgid "January"
1090
  msgstr ""
1091
 
1092
+ #: lib/Form/Block/Date.php:124 views/newsletters.html:191
1093
  #: views/subscribers/importExport/import.html:57
1094
  msgid "February"
1095
  msgstr ""
1096
 
1097
+ #: lib/Form/Block/Date.php:124 views/newsletters.html:192
1098
  #: views/subscribers/importExport/import.html:58
1099
  msgid "March"
1100
  msgstr ""
1101
 
1102
+ #: lib/Form/Block/Date.php:124 views/newsletters.html:193
1103
  #: views/subscribers/importExport/import.html:59
1104
  msgid "April"
1105
  msgstr ""
1106
 
1107
+ #: lib/Form/Block/Date.php:125 views/newsletters.html:194
1108
+ #: views/newsletters.html:206 views/subscribers/importExport/import.html:60
1109
  msgid "May"
1110
  msgstr ""
1111
 
1112
+ #: lib/Form/Block/Date.php:125 views/newsletters.html:195
1113
  #: views/subscribers/importExport/import.html:61
1114
  msgid "June"
1115
  msgstr ""
1116
 
1117
+ #: lib/Form/Block/Date.php:125 views/newsletters.html:196
1118
  #: views/subscribers/importExport/import.html:62
1119
  msgid "July"
1120
  msgstr ""
1121
 
1122
+ #: lib/Form/Block/Date.php:125 views/newsletters.html:197
1123
  #: views/subscribers/importExport/import.html:63
1124
  msgid "August"
1125
  msgstr ""
1126
 
1127
+ #: lib/Form/Block/Date.php:125 views/newsletters.html:198
1128
  #: views/subscribers/importExport/import.html:64
1129
  msgid "September"
1130
  msgstr ""
1131
 
1132
+ #: lib/Form/Block/Date.php:126 views/newsletters.html:199
1133
  #: views/subscribers/importExport/import.html:65
1134
  msgid "October"
1135
  msgstr ""
1136
 
1137
+ #: lib/Form/Block/Date.php:126 views/newsletters.html:200
1138
  #: views/subscribers/importExport/import.html:66
1139
  msgid "November"
1140
  msgstr ""
1141
 
1142
+ #: lib/Form/Block/Date.php:126 views/newsletters.html:201
1143
  #: views/subscribers/importExport/import.html:67
1144
  msgid "December"
1145
  msgstr ""
1228
  msgstr ""
1229
 
1230
  #: lib/Models/Form.php:93 lib/Models/Newsletter.php:646
1231
+ #: lib/Models/Segment.php:133 lib/Models/Subscriber.php:342
1232
  msgid "All"
1233
  msgstr ""
1234
 
1235
  #: lib/Models/Form.php:98 lib/Models/Newsletter.php:716
1236
+ #: lib/Models/Segment.php:138 lib/Models/Subscriber.php:367 views/forms.html:66
1237
+ #: views/newsletters.html:77 views/segments.html:50
1238
  #: views/subscribers/subscribers.html:37
1239
  msgid "Trash"
1240
  msgstr ""
1247
  msgid "Deleted list"
1248
  msgstr ""
1249
 
1250
+ #: lib/Models/Newsletter.php:547 lib/Models/Subscriber.php:278
1251
  #: lib/Subscribers/ImportExport/Export/Export.php:170
1252
  msgid "All Lists"
1253
  msgstr ""
1270
  msgid "Sent"
1271
  msgstr ""
1272
 
1273
+ #: lib/Models/Newsletter.php:696 views/newsletters.html:85
1274
  msgid "Active"
1275
  msgstr ""
1276
 
1326
  msgid "Your email address is invalid!"
1327
  msgstr ""
1328
 
1329
+ #: lib/Models/Subscriber.php:188
1330
  msgid "You need to wait before subscribing again."
1331
  msgstr ""
1332
 
1333
+ #: lib/Models/Subscriber.php:286
1334
  msgid "Subscribers without a list (%s)"
1335
  msgstr ""
1336
 
1337
+ #: lib/Models/Subscriber.php:347 lib/Subscription/Pages.php:301
1338
  #: views/segments.html:30 views/subscribers/subscribers.html:56
1339
  msgid "Subscribed"
1340
  msgstr ""
1341
 
1342
+ #: lib/Models/Subscriber.php:352 views/segments.html:31
1343
  #: views/subscribers/subscribers.html:55
1344
  msgid "Unconfirmed"
1345
  msgstr ""
1346
 
1347
+ #: lib/Models/Subscriber.php:357 lib/Subscription/Pages.php:309
1348
  #: views/segments.html:32 views/subscribers/subscribers.html:57
1349
  msgid "Unsubscribed"
1350
  msgstr ""
1351
 
1352
+ #: lib/Models/Subscriber.php:362 lib/Subscription/Pages.php:317
1353
  #: views/segments.html:33 views/subscribers/subscribers.html:58
1354
  msgid "Bounced"
1355
  msgstr ""
1472
  msgstr ""
1473
 
1474
  #: lib/Settings/Pages.php:12 lib/Settings/Pages.php:13
1475
+ #: lib/Settings/Pages.php:37 lib/Subscription/Pages.php:107
1476
  msgid "MailPoet Page"
1477
  msgstr ""
1478
 
1573
  msgid "Yes, please add me to your mailing list."
1574
  msgstr ""
1575
 
1576
+ #: lib/Subscription/Pages.php:103
1577
  msgid "Hmmm... we don't have a record of you."
1578
  msgstr ""
1579
 
1580
+ #: lib/Subscription/Pages.php:133
1581
  msgid ""
1582
  "Your email address doesn't appear in our lists anymore. Sign up again or "
1583
  "contact us if this appears to be a mistake."
1584
  msgstr ""
1585
 
1586
+ #: lib/Subscription/Pages.php:177 lib/Subscription/Pages.php:189
1587
  msgid "You have subscribed to: %s"
1588
  msgstr ""
1589
 
1590
+ #: lib/Subscription/Pages.php:186
1591
  msgid "You are now subscribed!"
1592
  msgstr ""
1593
 
1594
+ #: lib/Subscription/Pages.php:199 lib/Subscription/Pages.php:416
1595
  msgid "Manage your subscription"
1596
  msgstr ""
1597
 
1598
+ #: lib/Subscription/Pages.php:205
1599
  msgid "You are now unsubscribed."
1600
  msgstr ""
1601
 
1608
  msgstr ""
1609
 
1610
  #: lib/Subscription/Pages.php:348 views/form/editor.html:29
1611
+ #: views/form/editor.html:376 views/newsletter/templates/components/save.hbs:3
1612
  #: views/segments.html:56 views/subscribers/subscribers.html:96
1613
  msgid "Save"
1614
  msgstr ""
1615
 
1616
+ #: lib/Subscription/Pages.php:378
1617
  msgid "[link]Edit your profile[/link] to update your email."
1618
  msgstr ""
1619
 
1620
+ #: lib/Subscription/Pages.php:384
1621
  msgid "[link]Log in to your account[/link] to update your email."
1622
  msgstr ""
1623
 
1631
  msgid "Accidentally unsubscribed?"
1632
  msgstr ""
1633
 
1634
+ #: lib/Twig/Functions.php:88 views/settings/mta.html:1068
1635
  msgid "every minute"
1636
  msgstr ""
1637
 
1638
+ #: lib/Twig/Functions.php:89 views/settings/mta.html:1069
1639
  msgid "every %1$d minutes"
1640
  msgstr ""
1641
 
1642
+ #: lib/Twig/Functions.php:90 views/settings/mta.html:1070
1643
  msgid "every hour"
1644
  msgstr ""
1645
 
1646
+ #: lib/Twig/Functions.php:91 views/settings/mta.html:1071
1647
  msgid "every %1$d hours"
1648
  msgstr ""
1649
 
1711
  msgid "Add this form to your sidebar or footer on the [link]Widgets page[/link]."
1712
  msgstr ""
1713
 
1714
+ #: views/form/editor.html:137
1715
  msgid "Copy and paste this [link]shortcode[/link] on to a post or page."
1716
  msgstr ""
1717
 
1718
+ #: views/form/editor.html:143
1719
  msgid "%sPHP%s and %siFrame%s versions are also available."
1720
  msgstr ""
1721
 
1722
+ #: views/form/editor.html:162
1723
  msgid "Fields"
1724
  msgstr ""
1725
 
1726
+ #: views/form/editor.html:168
1727
  msgid "Add New Field"
1728
  msgstr ""
1729
 
1730
+ #: views/form/editor.html:177
1731
  #: views/newsletter/templates/blocks/social/settings.hbs:3
1732
  #: views/newsletter/templates/components/sidebar/styles.hbs:2
1733
  msgid "Styles"
1734
  msgstr ""
1735
 
1736
+ #: views/form/editor.html:187
1737
  #: views/newsletter/templates/components/sidebar/preview.hbs:2
1738
+ #: views/newsletters.html:115 views/settings/basics.html:244
1739
  #: views/settings/basics.html:301 views/settings/signup.html:177
1740
  msgid "Preview"
1741
  msgstr ""
1742
 
1743
+ #: views/form/editor.html:212
1744
  #: views/newsletter/templates/blocks/divider/widget.hbs:4
1745
  msgid "Divider"
1746
  msgstr ""
1747
 
1748
+ #: views/form/editor.html:237
1749
  msgid "List selection"
1750
  msgstr ""
1751
 
1752
+ #: views/form/editor.html:240
1753
  msgid "Select list(s):"
1754
  msgstr ""
1755
 
1756
+ #: views/form/editor.html:246
1757
  msgid "Random text or HTML"
1758
  msgstr ""
1759
 
1760
+ #: views/form/editor.html:249
1761
  msgid ""
1762
  "Subscribe to our newsletter and join [mailpoet_subscribers_count] other "
1763
  "subscribers."
1764
  msgstr ""
1765
 
1766
+ #: views/form/editor.html:394
1767
  msgid "Edit name"
1768
  msgstr ""
1769
 
1770
+ #: views/form/editor.html:408
1771
  msgid "The form name was successfully updated!"
1772
  msgstr ""
1773
 
1774
+ #: views/form/editor.html:456
1775
  msgid "Form preview"
1776
  msgstr ""
1777
 
1778
+ #: views/form/editor.html:503
1779
  msgid "Saved! The changes are now active in your widget."
1780
  msgstr ""
1781
 
1782
+ #: views/form/editor.html:505
1783
  msgid "Saved! Add this form to %1$sa widget%2$s."
1784
  msgstr ""
1785
 
1786
+ #: views/form/editor.html:578 views/subscribers/importExport/import.html:50
1787
  msgid "Add new field"
1788
  msgstr ""
1789
 
1790
+ #: views/form/editor.html:598 views/form/templates/toolbar/fields.hbs:14
1791
  msgid "Edit field"
1792
  msgstr ""
1793
 
1794
+ #: views/form/editor.html:619
1795
  msgid "This field will be deleted for all your subscribers. Are you sure?"
1796
  msgstr ""
1797
 
1798
+ #: views/form/editor.html:637
1799
  msgid "Removed custom field %$1s"
1800
  msgstr ""
1801
 
1802
+ #: views/form/editor.html:717
1803
  msgid "Edit field settings"
1804
  msgstr ""
1805
 
1837
  #: views/newsletter/templates/blocks/posts/settingsDisplayOptions.hbs:221
1838
  #: views/premium.html:54 views/settings/advanced.html:90
1839
  #: views/settings/advanced.html:130 views/settings/bounce.html:190
1840
+ #: views/settings/mta.html:602 views/settings/signup.html:34
1841
  #: views/subscribers/importExport/export.html:33
1842
  #: views/subscribers/importExport/import/step2.html:63
1843
  msgid "Yes"
1856
  #: views/newsletter/templates/blocks/posts/settingsDisplayOptions.hbs:227
1857
  #: views/premium.html:60 views/premium.html:61 views/settings/advanced.html:101
1858
  #: views/settings/advanced.html:141 views/settings/bounce.html:148
1859
+ #: views/settings/bounce.html:179 views/settings/mta.html:559
1860
+ #: views/settings/mta.html:613 views/settings/signup.html:46
1861
  #: views/subscribers/importExport/export.html:38
1862
  #: views/subscribers/importExport/import/step2.html:67
1863
  msgid "No"
2153
  msgid "%$1d forms have been restored from the trash."
2154
  msgstr ""
2155
 
2156
+ #: views/forms.html:63 views/newsletters.html:79 views/segments.html:49
2157
  #: views/subscribers/subscribers.html:35
2158
  msgid "Edit"
2159
  msgstr ""
2160
 
2161
+ #: views/forms.html:64 views/newsletters.html:80 views/segments.html:41
2162
  msgid "Duplicate"
2163
  msgstr ""
2164
 
2166
  msgid "Form \"%$1s\" has been duplicated."
2167
  msgstr ""
2168
 
2169
+ #: views/forms.html:67 views/newsletters.html:78 views/segments.html:51
2170
  #: views/subscribers/subscribers.html:38
2171
  msgid "Move to trash"
2172
  msgstr ""
2173
 
2174
+ #: views/forms.html:68 views/newsletters.html:92 views/segments.html:48
2175
  #: views/subscribers/subscribers.html:93
2176
  msgid "Add New"
2177
  msgstr ""
2272
  msgid "What will be kept in MailPoet 3"
2273
  msgstr ""
2274
 
2275
+ #: views/mp2migration.html:11
2276
+ msgid ""
2277
+ "All the data from your previous MailPoet will be preserved and left intact, "
2278
+ "rest assured. Get in touch with us if you have issues with the upgrade "
2279
+ "process by using the form %s at the bottom right of all your MailPoet pages."
 
 
 
 
 
2280
  msgstr ""
2281
 
2282
+ #: views/mp2migration.html:25
2283
  msgid "Start upgrade"
2284
  msgstr ""
2285
 
2286
+ #: views/mp2migration.html:26 views/newsletters.html:90
2287
  msgid "Pause"
2288
  msgstr ""
2289
 
2290
+ #: views/mp2migration.html:27
2291
  msgid "No thanks, I'll skip and start from scratch."
2292
  msgstr ""
2293
 
2294
+ #: views/mp2migration.html:37
2295
  msgid "Upgrade completed!"
2296
  msgstr ""
2297
 
2298
+ #: views/mp2migration.html:38
2299
+ msgid ""
2300
+ "Review our <a href=\"%s\" %s>simple checklist</a> to ensure your transition "
2301
+ "to MailPoet 3 is smooth."
2302
+ msgstr ""
2303
+
2304
+ #: views/mp2migration.html:39
2305
  msgid "Go to MailPoet"
2306
  msgstr ""
2307
 
2308
+ #: views/mp2migration.html:44
2309
  msgid "Log..."
2310
  msgstr ""
2311
 
2312
+ #: views/mp2migration.html:68
2313
  msgid "Importing…"
2314
  msgstr ""
2315
 
2744
  msgstr ""
2745
 
2746
  #: views/newsletter/templates/blocks/base/toolsGeneric.hbs:6
2747
+ #: views/newsletters.html:113
2748
  msgid "Delete"
2749
  msgstr ""
2750
 
2957
  msgid "Preview text (usually displayed underneath the subject line in the inbox)"
2958
  msgstr ""
2959
 
2960
+ #: views/newsletter/templates/components/save.hbs:5 views/newsletters.html:228
2961
  msgid "Next"
2962
  msgstr ""
2963
 
3060
  msgid "Current page"
3061
  msgstr ""
3062
 
3063
+ #: views/newsletters.html:61 views/newsletters.html:118
3064
  msgid "Subject"
3065
  msgstr ""
3066
 
3085
  msgstr ""
3086
 
3087
  #: views/newsletters.html:70
3088
+ msgid "Sent on"
3089
  msgstr ""
3090
 
3091
  #: views/newsletters.html:71
3092
+ msgid "1 email was moved to the trash."
3093
  msgstr ""
3094
 
3095
  #: views/newsletters.html:72
3096
+ msgid "%$1d emails were moved to the trash."
3097
  msgstr ""
3098
 
3099
  #: views/newsletters.html:73
3100
+ msgid "1 email was permanently deleted."
3101
  msgstr ""
3102
 
3103
  #: views/newsletters.html:74
3104
+ msgid "%$1d emails were permanently deleted."
3105
  msgstr ""
3106
 
3107
  #: views/newsletters.html:75
3108
+ msgid "1 email has been restored from the Trash."
3109
+ msgstr ""
3110
+
3111
+ #: views/newsletters.html:76
3112
  msgid "%$1d emails have been restored from the Trash."
3113
  msgstr ""
3114
 
3115
+ #: views/newsletters.html:81
3116
  msgid "Email \"%$1s\" has been duplicated."
3117
  msgstr ""
3118
 
3119
+ #: views/newsletters.html:82
3120
  msgid "Not sent yet"
3121
  msgstr ""
3122
 
3123
+ #: views/newsletters.html:83
3124
  msgid "Scheduled for"
3125
  msgstr ""
3126
 
3127
+ #: views/newsletters.html:84
3128
  msgid "Schedule it"
3129
  msgstr ""
3130
 
3131
+ #: views/newsletters.html:86
3132
  msgid "Not Active"
3133
  msgstr ""
3134
 
3135
+ #: views/newsletters.html:87
3136
  msgid "Sent to %$1d of %$2d"
3137
  msgstr ""
3138
 
3139
+ #: views/newsletters.html:88
3140
  msgid "Sent to %$1d subscribers"
3141
  msgstr ""
3142
 
3143
+ #: views/newsletters.html:89
3144
  msgid "Resume"
3145
  msgstr ""
3146
 
3147
+ #: views/newsletters.html:91
3148
  msgid "Paused"
3149
  msgstr ""
3150
 
3151
+ #: views/newsletters.html:94
3152
  msgid "Excellent"
3153
  msgstr ""
3154
 
3155
+ #: views/newsletters.html:95
3156
  msgid "Congrats!"
3157
  msgstr ""
3158
 
3159
+ #: views/newsletters.html:96
3160
  msgid "Good"
3161
  msgstr ""
3162
 
3163
+ #: views/newsletters.html:97
3164
  msgid "Good stuff."
3165
  msgstr ""
3166
 
3167
+ #: views/newsletters.html:98
3168
  msgid "Bad"
3169
  msgstr ""
3170
 
3171
+ #: views/newsletters.html:99
3172
  msgid "Something to improve."
3173
  msgstr ""
3174
 
3175
+ #: views/newsletters.html:100
3176
  msgid ""
3177
  "Above 30% is excellent.\\\\n"
3178
  "Between 10 and 30% is good.\\\\n"
3179
  "Under 10% is bad."
3180
  msgstr ""
3181
 
3182
+ #: views/newsletters.html:101
3183
  msgid ""
3184
  "Above 3% is excellent.\\\\n"
3185
  "Between 1 and 3% is good.\\\\n"
3186
  "Under 1% is bad."
3187
  msgstr ""
3188
 
3189
+ #: views/newsletters.html:102
3190
  msgid ""
3191
  "Under 1% is excellent.\\\\n"
3192
  "Between 1 and 3% is good.\\\\n"
3193
  "Over 3% is bad."
3194
  msgstr ""
3195
 
3196
+ #: views/newsletters.html:103
3197
  msgid "Nice job! Check back in %$1d hour(s) for more stats."
3198
  msgstr ""
3199
 
3200
+ #: views/newsletters.html:104
3201
  msgid "What can I do to improve this?"
3202
  msgstr ""
3203
 
3204
+ #: views/newsletters.html:106
3205
  msgid "This template file appears to be damaged. Please try another one."
3206
  msgstr ""
3207
 
3208
+ #: views/newsletters.html:107
3209
  msgid "Import a template"
3210
  msgstr ""
3211
 
3212
+ #: views/newsletters.html:108
3213
  msgid "Select a .json file to upload"
3214
  msgstr ""
3215
 
3216
+ #: views/newsletters.html:109
3217
  msgid "Upload"
3218
  msgstr ""
3219
 
3220
+ #: views/newsletters.html:110
3221
  msgid "MailPoet's Guide"
3222
  msgstr ""
3223
 
3224
+ #: views/newsletters.html:111
3225
  msgid "This is the standard template that comes with MailPoet."
3226
  msgstr ""
3227
 
3228
+ #: views/newsletters.html:112
3229
  msgid "You are about to delete the template named \"%$1s\"."
3230
  msgstr ""
3231
 
3232
+ #: views/newsletters.html:116
3233
  msgid "Select a responsive template"
3234
  msgstr ""
3235
 
3236
+ #: views/newsletters.html:119
3237
  msgid "Select type of email"
3238
  msgstr ""
3239
 
3240
+ #: views/newsletters.html:121
3241
  msgid ""
3242
  "Send a newsletter with images, buttons, dividers, and social bookmarks. Or, "
3243
  "just send a basic text email."
3244
  msgstr ""
3245
 
3246
+ #: views/newsletters.html:122
3247
  msgid "Create"
3248
  msgstr ""
3249
 
3250
+ #: views/newsletters.html:123
3251
  msgid "Welcome Email"
3252
  msgstr ""
3253
 
3254
+ #: views/newsletters.html:124
3255
  msgid ""
3256
  "Automatically send an email (or series of emails) to new subscribers or "
3257
  "WordPress users. Send a day, a week, or a month after they sign up."
3258
  msgstr ""
3259
 
3260
+ #: views/newsletters.html:125 views/subscribers/subscribers.html:23
3261
  msgid "Get premium version!"
3262
  msgstr ""
3263
 
3264
+ #: views/newsletters.html:126
3265
  msgid "Set up"
3266
  msgstr ""
3267
 
3268
+ #: views/newsletters.html:127
3269
  msgid "Latest Post Notifications"
3270
  msgstr ""
3271
 
3272
+ #: views/newsletters.html:128
3273
  msgid ""
3274
  "Let MailPoet email your subscribers with your latest content. You can send "
3275
  "daily, weekly, monthly, or even immediately after publication."
3276
  msgstr ""
3277
 
3278
+ #: views/newsletters.html:129
3279
  msgid "Select a frequency"
3280
  msgstr ""
3281
 
3282
+ #: views/newsletters.html:130
3283
  msgid ""
3284
  "Insert [newsletter:total] to show number of posts, [newsletter:post_title] "
3285
  "to show the latest post's title & [newsletter:number] to display the issue "
3286
  "number."
3287
  msgstr ""
3288
 
3289
+ #: views/newsletters.html:131 views/settings/mta.html:104
3290
+ #: views/settings/mta.html:668
3291
  msgid "Activate"
3292
  msgstr ""
3293
 
3294
+ #: views/newsletters.html:132
3295
  msgid "Send this Welcome Email when..."
3296
  msgstr ""
3297
 
3298
+ #: views/newsletters.html:134
3299
  msgid "Once a day at..."
3300
  msgstr ""
3301
 
3302
+ #: views/newsletters.html:135
3303
  msgid "Weekly on..."
3304
  msgstr ""
3305
 
3306
+ #: views/newsletters.html:136
3307
  msgid "Monthly on the..."
3308
  msgstr ""
3309
 
3310
+ #: views/newsletters.html:137
3311
  msgid "Monthly every..."
3312
  msgstr ""
3313
 
3314
+ #: views/newsletters.html:138
3315
  msgid "Immediately"
3316
  msgstr ""
3317
 
3318
+ #: views/newsletters.html:139
3319
  msgid "Sunday"
3320
  msgstr ""
3321
 
3322
+ #: views/newsletters.html:140
3323
  msgid "Monday"
3324
  msgstr ""
3325
 
3326
+ #: views/newsletters.html:141
3327
  msgid "Tuesday"
3328
  msgstr ""
3329
 
3330
+ #: views/newsletters.html:142
3331
  msgid "Wednesday"
3332
  msgstr ""
3333
 
3334
+ #: views/newsletters.html:143
3335
  msgid "Thursday"
3336
  msgstr ""
3337
 
3338
+ #: views/newsletters.html:144
3339
  msgid "Friday"
3340
  msgstr ""
3341
 
3342
+ #: views/newsletters.html:145
3343
  msgid "Saturday"
3344
  msgstr ""
3345
 
3346
+ #: views/newsletters.html:146
3347
  msgid "1st"
3348
  msgstr ""
3349
 
3350
+ #: views/newsletters.html:147
3351
  msgid "2nd"
3352
  msgstr ""
3353
 
3354
+ #: views/newsletters.html:148
3355
  msgid "3rd"
3356
  msgstr ""
3357
 
3358
+ #: views/newsletters.html:149
3359
  msgid "%$1dth"
3360
  msgstr ""
3361
 
3362
+ #: views/newsletters.html:153
3363
  msgid "When is this Welcome Email sent?"
3364
  msgstr ""
3365
 
3366
+ #: views/newsletters.html:155
3367
  msgid "When someone subscribes to the list..."
3368
  msgstr ""
3369
 
3370
+ #: views/newsletters.html:156
3371
  msgid "When a new WordPress user is added to your site..."
3372
  msgstr ""
3373
 
3374
+ #: views/newsletters.html:157
3375
  msgid "immediately"
3376
  msgstr ""
3377
 
3378
+ #: views/newsletters.html:158
3379
  msgid "hour(s) later"
3380
  msgstr ""
3381
 
3382
+ #: views/newsletters.html:159
3383
  msgid "day(s) later"
3384
  msgstr ""
3385
 
3386
+ #: views/newsletters.html:160
3387
  msgid "week(s) later"
3388
  msgstr ""
3389
 
3390
+ #: views/newsletters.html:162
3391
  msgid "Subject line"
3392
  msgstr ""
3393
 
3394
+ #: views/newsletters.html:163
3395
  msgid ""
3396
  "Be creative! It's the first thing that your subscribers see. Tempt them to "
3397
  "open your email."
3398
  msgstr ""
3399
 
3400
+ #: views/newsletters.html:164
3401
  msgid "Please specify a subject"
3402
  msgstr ""
3403
 
3404
+ #: views/newsletters.html:166
3405
  msgid "This subscriber segment will be used for this email."
3406
  msgstr ""
3407
 
3408
+ #: views/newsletters.html:167 views/subscribers/subscribers.html:59
3409
  msgid "Select a list"
3410
  msgstr ""
3411
 
3412
+ #: views/newsletters.html:169
3413
  msgid "Sender"
3414
  msgstr ""
3415
 
3416
+ #: views/newsletters.html:170
3417
  msgid "Your name and email"
3418
  msgstr ""
3419
 
3420
+ #: views/newsletters.html:171 views/newsletters.html:175
3421
  msgid "John Doe"
3422
  msgstr ""
3423
 
3424
+ #: views/newsletters.html:172 views/newsletters.html:176
3425
  msgid "john.doe@email.com"
3426
  msgstr ""
3427
 
3428
+ #: views/newsletters.html:173 views/settings/basics.html:29
3429
  #: views/settings/signup.html:85
3430
  msgid "Reply-to"
3431
  msgstr ""
3432
 
3433
+ #: views/newsletters.html:174
3434
  msgid ""
3435
  "When your subscribers reply to your emails, their emails will go to this "
3436
  "address."
3437
  msgstr ""
3438
 
3439
+ #: views/newsletters.html:177
3440
  msgid "Email was updated successfully!"
3441
  msgstr ""
3442
 
3443
+ #: views/newsletters.html:178
3444
  msgid "Email was added successfully!"
3445
  msgstr ""
3446
 
3447
+ #: views/newsletters.html:179
3448
  msgid ""
3449
  "An error occurred while trying to send. <a href=\"%$1s\">Please check your "
3450
  "settings</a>."
3451
  msgstr ""
3452
 
3453
+ #: views/newsletters.html:180
3454
  msgid "Final Step: Last Details"
3455
  msgstr ""
3456
 
3457
+ #: views/newsletters.html:181
3458
  msgid "Save as draft and close"
3459
  msgstr ""
3460
 
3461
+ #: views/newsletters.html:182
3462
  msgid "or simply"
3463
  msgstr ""
3464
 
3465
+ #: views/newsletters.html:183
3466
  msgid "go back to the Design page"
3467
  msgstr ""
3468
 
3469
+ #: views/newsletters.html:184
3470
  msgid "Your website’s time is"
3471
  msgstr ""
3472
 
3473
+ #: views/newsletters.html:185
3474
  msgid "Please enter the scheduled date."
3475
  msgstr ""
3476
 
3477
+ #: views/newsletters.html:186
3478
  msgid "Schedule"
3479
  msgstr ""
3480
 
3481
+ #: views/newsletters.html:188
3482
  msgid "Close"
3483
  msgstr ""
3484
 
3485
+ #: views/newsletters.html:189
3486
  msgid "Today"
3487
  msgstr ""
3488
 
3489
+ #: views/newsletters.html:202
3490
  msgid "Jan"
3491
  msgstr ""
3492
 
3493
+ #: views/newsletters.html:203
3494
  msgid "Feb"
3495
  msgstr ""
3496
 
3497
+ #: views/newsletters.html:204
3498
  msgid "Mar"
3499
  msgstr ""
3500
 
3501
+ #: views/newsletters.html:205
3502
  msgid "Apr"
3503
  msgstr ""
3504
 
3505
+ #: views/newsletters.html:207
3506
  msgid "Jun"
3507
  msgstr ""
3508
 
3509
+ #: views/newsletters.html:208
3510
  msgid "Jul"
3511
  msgstr ""
3512
 
3513
+ #: views/newsletters.html:209
3514
  msgid "Aug"
3515
  msgstr ""
3516
 
3517
+ #: views/newsletters.html:210
3518
  msgid "Sep"
3519
  msgstr ""
3520
 
3521
+ #: views/newsletters.html:211
3522
  msgid "Oct"
3523
  msgstr ""
3524
 
3525
+ #: views/newsletters.html:212
3526
  msgid "Nov"
3527
  msgstr ""
3528
 
3529
+ #: views/newsletters.html:213
3530
  msgid "Dec"
3531
  msgstr ""
3532
 
3533
+ #: views/newsletters.html:214
3534
  msgid "Sun"
3535
  msgstr ""
3536
 
3537
+ #: views/newsletters.html:215
3538
  msgid "Mon"
3539
  msgstr ""
3540
 
3541
+ #: views/newsletters.html:216
3542
  msgid "Tue"
3543
  msgstr ""
3544
 
3545
+ #: views/newsletters.html:217
3546
  msgid "Wed"
3547
  msgstr ""
3548
 
3549
+ #: views/newsletters.html:218
3550
  msgid "Thu"
3551
  msgstr ""
3552
 
3553
+ #: views/newsletters.html:219
3554
  msgid "Fri"
3555
  msgstr ""
3556
 
3557
+ #: views/newsletters.html:220
3558
  msgid "Sat"
3559
  msgstr ""
3560
 
3561
+ #: views/newsletters.html:229
3562
  msgid "Previous"
3563
  msgstr ""
3564
 
3565
+ #: views/newsletters.html:230
3566
  msgid "The newsletter is being sent..."
3567
  msgstr ""
3568
 
3569
+ #: views/newsletters.html:231
3570
  msgid "The newsletter has been scheduled."
3571
  msgstr ""
3572
 
3573
+ #: views/newsletters.html:232
3574
  msgid "Your Welcome Email is now activated!"
3575
  msgstr ""
3576
 
3577
+ #: views/newsletters.html:233
3578
  msgid "Your Welcome Email could not be activated, please check the settings."
3579
  msgstr ""
3580
 
3581
+ #: views/newsletters.html:234
3582
  msgid "Your post notification is now active!"
3583
  msgstr ""
3584
 
3585
+ #: views/newsletters.html:235
3586
  msgid "Your Post Notification could not be activated, check the settings."
3587
  msgstr ""
3588
 
3589
+ #: views/newsletters.html:236
3590
  msgid "This newsletter is sent when someone subscribes to the list: \"%$1s\""
3591
  msgstr ""
3592
 
3593
+ #: views/newsletters.html:237
3594
  msgid "This newsletter is sent when a new WordPress user is added to your site"
3595
  msgstr ""
3596
 
3597
+ #: views/newsletters.html:238
3598
  msgid ""
3599
  "This newsletter is sent when a new WordPress user with the role \"%$1s\" is "
3600
  "added to your site"
3601
  msgstr ""
3602
 
3603
+ #: views/newsletters.html:239
3604
  msgid "%$1d hour(s) later"
3605
  msgstr ""
3606
 
3607
+ #: views/newsletters.html:240
3608
  msgid "%$1d day(s) later"
3609
  msgstr ""
3610
 
3611
+ #: views/newsletters.html:241
3612
  msgid "%$1d week(s) later"
3613
  msgstr ""
3614
 
3615
+ #: views/newsletters.html:242
3616
  msgid "Send daily at %$1s"
3617
  msgstr ""
3618
 
3619
+ #: views/newsletters.html:243
3620
  msgid "Send weekly on %$1s at %$2s"
3621
  msgstr ""
3622
 
3623
+ #: views/newsletters.html:244
3624
  msgid "Send monthly on the %$1s at %$2s"
3625
  msgstr ""
3626
 
3627
+ #: views/newsletters.html:245
3628
  msgid "Send every %$1s %$2s of the month at %$3s"
3629
  msgstr ""
3630
 
3631
+ #: views/newsletters.html:246
3632
  msgid "Send immediately"
3633
  msgstr ""
3634
 
3635
+ #: views/newsletters.html:247
3636
  msgid "if there's new content to %$1s."
3637
  msgstr ""
3638
 
3639
+ #: views/newsletters.html:248
3640
  msgid "You need to select a list to send to."
3641
  msgstr ""
3642
 
 
 
 
 
3643
  #: views/newsletters.html:250
3644
+ msgid "Back to Post notifications"
3645
  msgstr ""
3646
 
3647
  #: views/newsletters.html:251
4129
  msgid "Hostname"
4130
  msgstr ""
4131
 
4132
+ #: views/settings/bounce.html:50 views/settings/mta.html:508
4133
  msgid "Login"
4134
  msgstr ""
4135
 
4136
+ #: views/settings/bounce.html:67 views/settings/mta.html:531
4137
  msgid "Password"
4138
  msgstr ""
4139
 
4185
  msgid "Is it working? Try to connect"
4186
  msgstr ""
4187
 
4188
+ #: views/settings/mta.html:75
4189
  msgid "You're now sending with MailPoet!"
4190
  msgstr ""
4191
 
4192
+ #: views/settings/mta.html:77
4193
  msgid "Great, you're all set up. Your emails will now be sent quickly and reliably!"
4194
  msgstr ""
4195
 
4196
+ #: views/settings/mta.html:84
4197
  msgid "Solve all of your sending problems!"
4198
  msgstr ""
4199
 
4200
+ #: views/settings/mta.html:86
4201
  msgid ""
4202
  "Let MailPoet send your emails and get the Premium features for as little as "
4203
  "10 dollars or euros per month."
4204
  msgstr ""
4205
 
4206
+ #: views/settings/mta.html:92 views/welcome.html:50
4207
  msgid "Find out more"
4208
  msgstr ""
4209
 
4210
+ #: views/settings/mta.html:96 views/settings/mta.html:119
 
4211
  msgid "Activated"
4212
  msgstr ""
4213
 
4214
+ #: views/settings/mta.html:111
4215
+ msgid "Other"
4216
  msgstr ""
4217
 
4218
+ #: views/settings/mta.html:113
4219
+ msgid "Send with your website or third party"
4220
  msgstr ""
4221
 
4222
+ #: views/settings/mta.html:115
4223
  msgid ""
4224
+ "Choose to send emails through your website (not recommended) or a third "
4225
+ "party sender."
4226
  msgstr ""
4227
 
4228
+ #: views/settings/mta.html:125
4229
  msgid "Configure"
4230
  msgstr ""
4231
 
4232
+ #: views/settings/mta.html:131
4233
+ msgid ""
4234
+ "Need help to pick? [link]Check out the comparison table of sending "
4235
+ "methods[/link]."
4236
  msgstr ""
4237
 
4238
+ #: views/settings/mta.html:145
4239
+ msgid "Method"
4240
  msgstr ""
4241
 
4242
+ #: views/settings/mta.html:155
4243
+ msgid "Your web host / web server"
4244
  msgstr ""
4245
 
4246
+ #: views/settings/mta.html:164
4247
+ msgid "SMTP"
 
 
4248
  msgstr ""
4249
 
4250
+ #: views/settings/mta.html:167
4251
+ msgid "Select your provider"
4252
  msgstr ""
4253
 
4254
+ #: views/settings/mta.html:192
4255
+ msgid "Your web host"
4256
  msgstr ""
4257
 
4258
+ #: views/settings/mta.html:208
4259
+ msgid "Select your web host"
4260
+ msgstr ""
4261
+
4262
+ #: views/settings/mta.html:231
4263
+ msgid "Sending frequency"
4264
+ msgstr ""
4265
+
4266
+ #: views/settings/mta.html:242
4267
+ msgid "Recommended"
4268
  msgstr ""
4269
 
4270
+ #: views/settings/mta.html:251
4271
+ msgid "I'll set my own frequency"
4272
  msgstr ""
4273
 
4274
+ #: views/settings/mta.html:275
4275
  msgid "emails"
4276
  msgstr ""
4277
 
4278
+ #: views/settings/mta.html:292
4279
  msgid "recommended"
4280
  msgstr ""
4281
 
4282
+ #: views/settings/mta.html:301
4283
  msgid ""
4284
  "<strong>Warning!</strong> Sending more than the recommended amount of "
4285
  "emails? You may break the terms of your web host or provider!"
4286
  msgstr ""
4287
 
4288
+ #: views/settings/mta.html:303
4289
  msgid ""
4290
  "Please ask your host for the maximum number of emails you are allowed to "
4291
  "send per day."
4292
  msgstr ""
4293
 
4294
+ #: views/settings/mta.html:317
 
 
 
 
 
 
 
 
 
 
 
 
4295
  msgid "SMTP Hostname"
4296
  msgstr ""
4297
 
4298
+ #: views/settings/mta.html:320 views/settings/mta.html:461
4299
  msgid "e.g.: smtp.mydomain.com"
4300
  msgstr ""
4301
 
4302
+ #: views/settings/mta.html:342
4303
  msgid "SMTP Port"
4304
  msgstr ""
4305
 
4306
+ #: views/settings/mta.html:369
4307
  msgid "Region"
4308
  msgstr ""
4309
 
4310
+ #: views/settings/mta.html:404
4311
  msgid "Access Key"
4312
  msgstr ""
4313
 
4314
+ #: views/settings/mta.html:431
4315
  msgid "Secret Key"
4316
  msgstr ""
4317
 
4318
+ #: views/settings/mta.html:458
4319
  msgid "Domain"
4320
  msgstr ""
4321
 
4322
+ #: views/settings/mta.html:484
4323
  msgid "API Key"
4324
  msgstr ""
4325
 
4326
+ #: views/settings/mta.html:554
4327
  msgid "Secure Connection"
4328
  msgstr ""
4329
 
4330
+ #: views/settings/mta.html:585
4331
  msgid "Authentication"
4332
  msgstr ""
4333
 
4334
+ #: views/settings/mta.html:588
4335
  msgid ""
4336
  "Leave this option set to Yes. Only a tiny portion of SMTP services prefer "
4337
  "Authentication to be turned off."
4338
  msgstr ""
4339
 
4340
+ #: views/settings/mta.html:627
4341
  msgid "SPF Signature (Highly recommended!)"
4342
  msgstr ""
4343
 
4344
+ #: views/settings/mta.html:630
4345
  msgid ""
4346
  "This improves your delivery rate by verifying that you're allowed to send "
4347
  "emails from your domain."
4348
  msgstr ""
4349
 
4350
+ #: views/settings/mta.html:635
4351
  msgid ""
4352
  "SPF is set up in your DNS. Read your host's support documentation for more "
4353
  "information."
4354
  msgstr ""
4355
 
4356
+ #: views/settings/mta.html:643
4357
  msgid "Test the sending method"
4358
  msgstr ""
4359
 
4360
+ #: views/settings/mta.html:657
4361
  msgid "Send a test email"
4362
  msgstr ""
4363
 
4364
+ #: views/settings/mta.html:673
4365
  msgid "or Cancel"
4366
  msgstr ""
4367
 
4368
+ #: views/settings/mta.html:712
4369
  msgid ""
4370
  "The email could not be sent. Make sure the option \"Email notifications\" "
4371
  "has a FROM email address in the Basics tab."
4372
  msgstr ""
4373
 
4374
+ #: views/settings/mta.html:725
4375
  msgid "This is a Sending Method Test"
4376
  msgstr ""
4377
 
4378
+ #: views/settings/mta.html:727 views/settings/mta.html:728
4379
  msgid "Yup, it works! You can start blasting away emails to the moon."
4380
  msgstr ""
4381
 
4382
+ #: views/settings/mta.html:737
4383
  msgid "The email has been sent! Check your inbox."
4384
  msgstr ""
4385
 
4386
+ #: views/settings/mta.html:781
4387
  msgid "You have selected an invalid sending method."
4388
  msgstr ""
4389
 
5026
  "newsletter. Sign up below!"
5027
  msgstr ""
5028
 
5029
+ #: lib/API/JSON/v1/Services.php:137
5030
+ msgctxt "Error code (inside parentheses)"
5031
+ msgid "code: %s"
5032
+ msgstr ""
5033
+
5034
  #: lib/Config/Menu.php:80
5035
  msgctxt "newsletters per page (screen options)"
5036
  msgid "Number of newsletters per page"
5066
  msgid "Cancel"
5067
  msgstr ""
5068
 
5069
+ #: views/newsletters.html:114 views/subscribers/importExport/export.html:52
5070
  #: views/subscribers/importExport/export.html:63
5071
  #: views/subscribers/importExport/import/step1.html:95
5072
  #: views/subscribers/importExport/import/step2.html:41
5074
  msgid "Select"
5075
  msgstr ""
5076
 
5077
+ #: views/newsletters.html:150
5078
  msgctxt "e.g. monthly every last Monday"
5079
  msgid "last"
5080
  msgstr ""
5081
 
5082
+ #: views/newsletters.html:151
5083
  msgctxt "Button label: Next step"
5084
  msgid "Next"
5085
  msgstr ""
5086
 
5087
+ #: views/newsletters.html:221
5088
  msgctxt "Sunday - one letter abbreviation"
5089
  msgid "S"
5090
  msgstr ""
5091
 
5092
+ #: views/newsletters.html:222
5093
  msgctxt "Monday - one letter abbreviation"
5094
  msgid "M"
5095
  msgstr ""
5096
 
5097
+ #: views/newsletters.html:223
5098
  msgctxt "Tuesday - one letter abbreviation"
5099
  msgid "T"
5100
  msgstr ""
5101
 
5102
+ #: views/newsletters.html:224
5103
  msgctxt "Wednesday - one letter abbreviation"
5104
  msgid "W"
5105
  msgstr ""
5106
 
5107
+ #: views/newsletters.html:225
5108
  msgctxt "Thursday - one letter abbreviation"
5109
  msgid "T"
5110
  msgstr ""
5111
 
5112
+ #: views/newsletters.html:226
5113
  msgctxt "Friday - one letter abbreviation"
5114
  msgid "F"
5115
  msgstr ""
5116
 
5117
+ #: views/newsletters.html:227
5118
  msgctxt "Saturday - one letter abbreviation"
5119
  msgid "S"
5120
  msgstr ""
lib/API/JSON/v1/Services.php CHANGED
@@ -60,8 +60,8 @@ class Services extends APIEndpoint {
60
  default:
61
  $code = !empty($result['code']) ? $result['code'] : Bridge::CHECK_ERROR_UNKNOWN;
62
  $error = sprintf(
63
- __('Error validating MailPoet Sending Service key, please try again later (code: %s)', 'mailpoet'),
64
- $code
65
  );
66
  break;
67
  }
@@ -116,12 +116,28 @@ class Services extends APIEndpoint {
116
  default:
117
  $code = !empty($result['code']) ? $result['code'] : Bridge::CHECK_ERROR_UNKNOWN;
118
  $error = sprintf(
119
- __('Error validating Premium key, please try again later (code: %s)', 'mailpoet'),
120
- $code
121
  );
122
  break;
123
  }
124
 
125
  return $this->errorResponse(array(APIError::BAD_REQUEST => $error));
126
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
127
  }
60
  default:
61
  $code = !empty($result['code']) ? $result['code'] : Bridge::CHECK_ERROR_UNKNOWN;
62
  $error = sprintf(
63
+ __('Error validating MailPoet Sending Service key, please try again later (%s)', 'mailpoet'),
64
+ $this->getErrorDescriptionByCode($code)
65
  );
66
  break;
67
  }
116
  default:
117
  $code = !empty($result['code']) ? $result['code'] : Bridge::CHECK_ERROR_UNKNOWN;
118
  $error = sprintf(
119
+ __('Error validating Premium key, please try again later (%s)', 'mailpoet'),
120
+ $this->getErrorDescriptionByCode($code)
121
  );
122
  break;
123
  }
124
 
125
  return $this->errorResponse(array(APIError::BAD_REQUEST => $error));
126
  }
127
+
128
+ private function getErrorDescriptionByCode($code) {
129
+ switch($code) {
130
+ case Bridge::CHECK_ERROR_UNAVAILABLE:
131
+ $text = __('Service unavailable', 'mailpoet');
132
+ break;
133
+ case Bridge::CHECK_ERROR_UNKNOWN:
134
+ $text = __('Contact your hosting support to check the connection between your host and https://bridge.mailpoet.com', 'mailpoet');
135
+ break;
136
+ default:
137
+ $text = sprintf(_x('code: %s', 'Error code (inside parentheses)', 'mailpoet'), $code);
138
+ break;
139
+ }
140
+
141
+ return $text;
142
+ }
143
  }
lib/Config/Database.php CHANGED
@@ -69,6 +69,7 @@ class Database {
69
  $subscriber_segment = Env::$db_prefix . 'subscriber_segment';
70
  $subscriber_custom_field = Env::$db_prefix . 'subscriber_custom_field';
71
  $newsletter_segment = Env::$db_prefix . 'newsletter_segment';
 
72
  $sending_queues = Env::$db_prefix . 'sending_queues';
73
  $newsletters = Env::$db_prefix . 'newsletters';
74
  $newsletter_templates = Env::$db_prefix . 'newsletter_templates';
@@ -90,6 +91,7 @@ class Database {
90
  define('MP_SUBSCRIBERS_TABLE', $subscribers);
91
  define('MP_SUBSCRIBER_SEGMENT_TABLE', $subscriber_segment);
92
  define('MP_SUBSCRIBER_CUSTOM_FIELD_TABLE', $subscriber_custom_field);
 
93
  define('MP_SENDING_QUEUES_TABLE', $sending_queues);
94
  define('MP_NEWSLETTERS_TABLE', $newsletters);
95
  define('MP_NEWSLETTER_TEMPLATES_TABLE', $newsletter_templates);
69
  $subscriber_segment = Env::$db_prefix . 'subscriber_segment';
70
  $subscriber_custom_field = Env::$db_prefix . 'subscriber_custom_field';
71
  $newsletter_segment = Env::$db_prefix . 'newsletter_segment';
72
+ $scheduled_tasks = Env::$db_prefix . 'scheduled_tasks';
73
  $sending_queues = Env::$db_prefix . 'sending_queues';
74
  $newsletters = Env::$db_prefix . 'newsletters';
75
  $newsletter_templates = Env::$db_prefix . 'newsletter_templates';
91
  define('MP_SUBSCRIBERS_TABLE', $subscribers);
92
  define('MP_SUBSCRIBER_SEGMENT_TABLE', $subscriber_segment);
93
  define('MP_SUBSCRIBER_CUSTOM_FIELD_TABLE', $subscriber_custom_field);
94
+ define('MP_SCHEDULED_TASKS_TABLE', $scheduled_tasks);
95
  define('MP_SENDING_QUEUES_TABLE', $sending_queues);
96
  define('MP_NEWSLETTERS_TABLE', $newsletters);
97
  define('MP_NEWSLETTER_TEMPLATES_TABLE', $newsletter_templates);
lib/Config/MP2Migrator.php CHANGED
@@ -161,6 +161,7 @@ class MP2Migrator {
161
  $this->importCustomFields();
162
  $this->importSubscribers();
163
  $this->importForms();
 
164
 
165
  if(!$this->importStopped()) {
166
  Setting::setValue('mailpoet_migration_complete', true);
@@ -270,14 +271,6 @@ class MP2Migrator {
270
  $total_count += $forms_count;
271
  $result .= sprintf(_n('%d form', '%d forms', $forms_count, 'mailpoet'), $forms_count) . "\n";
272
 
273
- // TODO to reactivate during the next phases
274
- /*
275
- // Emails
276
- $emails_count = \ORM::for_table(MP2_EMAIL_TABLE)->count();
277
- $total_count += $emails_count;
278
- $result .= sprintf(_n('%d newsletter', '%d newsletters', $emails_count, 'mailpoet'), $emails_count) . "\n";
279
- */
280
-
281
  $this->progressbar->setTotalCount($total_count);
282
 
283
  return $result;
@@ -961,4 +954,190 @@ class MP2Migrator {
961
  return $mp3_values;
962
  }
963
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
964
  }
161
  $this->importCustomFields();
162
  $this->importSubscribers();
163
  $this->importForms();
164
+ $this->importSettings();
165
 
166
  if(!$this->importStopped()) {
167
  Setting::setValue('mailpoet_migration_complete', true);
271
  $total_count += $forms_count;
272
  $result .= sprintf(_n('%d form', '%d forms', $forms_count, 'mailpoet'), $forms_count) . "\n";
273
 
 
 
 
 
 
 
 
 
274
  $this->progressbar->setTotalCount($total_count);
275
 
276
  return $result;
954
  return $mp3_values;
955
  }
956
 
957
+ /**
958
+ * Import the settings
959
+ *
960
+ */
961
+ private function importSettings() {
962
+ $encoded_options = get_option('wysija');
963
+ $options = unserialize(base64_decode($encoded_options));
964
+
965
+ // Sender
966
+ $sender = Setting::getValue('sender');
967
+ $sender['name'] = isset($options['from_name']) ? $options['from_name'] : '';
968
+ $sender['address'] = isset($options['from_email']) ? $options['from_email'] : '';
969
+ Setting::setValue('sender', $sender);
970
+
971
+ // Reply To
972
+ $reply_to = Setting::getValue('reply_to');
973
+ $reply_to['name'] = isset($options['replyto_name']) ? $options['replyto_name'] : '';
974
+ $reply_to['address'] = isset($options['replyto_email']) ? $options['replyto_email'] : '';
975
+ Setting::setValue('reply_to', $reply_to);
976
+
977
+ // Bounce
978
+ $bounce = Setting::getValue('bounce');
979
+ $bounce['address'] = isset($options['bounce_email']) ? $options['bounce_email'] : '';
980
+ Setting::setValue('bounce', $bounce);
981
+
982
+ // Notification
983
+ $notification = Setting::getValue('notification');
984
+ $notification['address'] = isset($options['emails_notified']) ? $options['emails_notified'] : '';
985
+ Setting::setValue('notification', $notification);
986
+
987
+ // Subscribe
988
+ $subscribe = Setting::getValue('subscribe');
989
+ $subscribe['on_comment']['enabled'] = isset($options['commentform']) ? $options['commentform'] : '0';
990
+ $subscribe['on_comment']['label'] = isset($options['commentform_linkname']) ? $options['commentform_linkname'] : '';
991
+ $subscribe['on_comment']['segments'] = isset($options['commentform_lists'])? $this->getMappedSegmentIds($options['commentform_lists']) : array();
992
+ $subscribe['on_register']['enabled'] = isset($options['registerform']) ? $options['registerform'] : '0';
993
+ $subscribe['on_register']['label'] = isset($options['registerform_linkname']) ? $options['registerform_linkname'] : '';
994
+ $subscribe['on_register']['segments'] = isset($options['registerform_lists'])? $this->getMappedSegmentIds($options['registerform_lists']) : array();
995
+ Setting::setValue('subscribe', $subscribe);
996
+
997
+ // Subscription
998
+ $subscription = Setting::getValue('subscription');
999
+ $subscription['pages']['unsubscribe'] = isset($options['unsubscribe_page']) ? $options['unsubscribe_page'] : '';
1000
+ $subscription['pages']['confirmation'] = isset($options['confirmation_page']) ? $options['confirmation_page'] : '';
1001
+ $subscription['pages']['manage'] = isset($options['subscriptions_page']) ? $options['subscriptions_page'] : '';
1002
+ $subscription['segments'] = isset($options['manage_subscriptions_lists'])? $this->getMappedSegmentIds($options['manage_subscriptions_lists']) : array();
1003
+ Setting::setValue('subscription', $subscription);
1004
+
1005
+ // Confirmation email
1006
+ $signup_confirmation = Setting::getValue('signup_confirmation');
1007
+ $signup_confirmation['enabled'] = isset($options['confirm_dbleoptin']) && ($options['confirm_dbleoptin'] == 0) ? 0 : 1;
1008
+ if(isset($options['confirm_email_id'])) {
1009
+ $confirm_email_id = $options['confirm_email_id'];
1010
+ $confirm_email = $this->getEmail($confirm_email_id);
1011
+ if(!empty($confirm_email)) {
1012
+ $signup_confirmation['from']['name'] = isset($confirm_email['from_name']) ? $confirm_email['from_name'] : '';
1013
+ $signup_confirmation['from']['address'] = isset($confirm_email['from_email']) ? $confirm_email['from_email'] : '';
1014
+ $signup_confirmation['reply_to']['name'] = isset($confirm_email['replyto_name']) ? $confirm_email['replyto_name'] : '';
1015
+ $signup_confirmation['reply_to']['address'] = isset($confirm_email['replyto_email']) ? $confirm_email['replyto_email'] : '';
1016
+ $signup_confirmation['subject'] = isset($confirm_email['subject']) ? $confirm_email['subject'] : '';
1017
+ $signup_confirmation['body'] = isset($confirm_email['body']) ? $confirm_email['body'] : '';
1018
+ }
1019
+ }
1020
+ Setting::setValue('signup_confirmation', $signup_confirmation);
1021
+
1022
+ // Analytics
1023
+ $analytics = Setting::getValue('analytics');
1024
+ $analytics['enabled'] = isset($options['analytics']) ? $options['analytics'] : '';
1025
+ Setting::setValue('analytics', $analytics);
1026
+
1027
+ // MTA
1028
+ $mta_group = Setting::getValue('mta_group');
1029
+ $mta_group = isset($options['sending_method']) && ($options['sending_method'] == 'smtp') ? 'smtp' : 'website';
1030
+ Setting::setValue('mta_group', $mta_group);
1031
+
1032
+ $mta = Setting::getValue('mta');
1033
+ $mta['method'] = (isset($options['smtp_host']) && ($options['smtp_host'] == 'smtp.sendgrid.net')) ? 'SendGrid' : (isset($options['sending_method']) && ($options['sending_method'] == 'smtp') ? 'SMTP' : 'PHPMail');
1034
+ $sending_emails_number = isset($options['sending_emails_number']) ? $options['sending_emails_number'] : '';
1035
+ $sending_emails_each = isset($options['sending_emails_each']) ? $options['sending_emails_each'] : '';
1036
+ $mta['frequency']['emails'] = $this->mapFrequencyEmails($sending_emails_number, $sending_emails_each);
1037
+ $mta['frequency']['interval'] = $this->mapFrequencyInterval($sending_emails_each);
1038
+ $mta['host'] = isset($options['smtp_host']) ? $options['smtp_host'] : '';
1039
+ $mta['port'] = isset($options['smtp_port']) ? $options['smtp_port'] : '';
1040
+ $mta['login'] = isset($options['smtp_login']) ? $options['smtp_login'] : '';
1041
+ $mta['password'] = isset($options['smtp_password']) ? $options['smtp_password'] : '';
1042
+ $mta['encryption'] = isset($options['smtp_secure']) ? $options['smtp_secure'] : '';
1043
+ $mta['authentication'] = !isset($options['smtp_auth']) ? '1' : '-1';
1044
+ Setting::setValue('mta', $mta);
1045
+
1046
+ // SMTP Provider
1047
+ if($mta['method'] == 'SendGrid') {
1048
+ Setting::setValue('smtp_provider', 'SendGrid');
1049
+ }
1050
+
1051
+ // Installation date
1052
+ if(isset($options['installed_time'])) {
1053
+ $datetime = new \MailPoet\WP\DateTime();
1054
+ $installed_at = $datetime->formatTime($options['installed_time'], \MailPoet\WP\DateTime::DEFAULT_DATE_TIME_FORMAT);
1055
+ Setting::setValue('installed_at', $installed_at);
1056
+ }
1057
+
1058
+ $this->log(__("Settings imported", 'mailpoet'));
1059
+ }
1060
+
1061
+ /**
1062
+ * Get an email
1063
+ *
1064
+ * @global object $wpdb
1065
+ * @param int $email_id
1066
+ * @return array Email
1067
+ */
1068
+ private function getEmail($email_id) {
1069
+ global $wpdb;
1070
+ $email = array();
1071
+
1072
+ $table = MP2_EMAIL_TABLE;
1073
+ $sql = "
1074
+ SELECT e.*
1075
+ FROM `$table` e
1076
+ WHERE e.email_id = '$email_id'
1077
+ ";
1078
+ $email = $wpdb->get_row($sql, ARRAY_A);
1079
+
1080
+ return $email;
1081
+ }
1082
+
1083
+ /**
1084
+ * Map the Email frequency interval
1085
+ *
1086
+ * @param string $interval_str Interval
1087
+ * @return string Interval
1088
+ */
1089
+ private function mapFrequencyInterval($interval_str) {
1090
+ switch($interval_str) {
1091
+ case 'one_min':
1092
+ $interval = 1;
1093
+ break;
1094
+
1095
+ case 'two_min':
1096
+ $interval = 2;
1097
+ break;
1098
+
1099
+ case 'five_min':
1100
+ $interval = 5;
1101
+ break;
1102
+
1103
+ case 'ten_min':
1104
+ $interval = 10;
1105
+ break;
1106
+
1107
+ default:
1108
+ $interval = 15;
1109
+ }
1110
+ return (string)$interval;
1111
+ }
1112
+
1113
+ /**
1114
+ * Map the Email frequency number
1115
+ *
1116
+ * @param int $emails_number Emails number
1117
+ * @param string $interval_str Interval
1118
+ * @return int Emails number
1119
+ */
1120
+ private function mapFrequencyEmails($emails_number, $interval_str) {
1121
+ if(empty($emails_number)) {
1122
+ $emails_number = 70;
1123
+ } else {
1124
+ switch($interval_str) {
1125
+ case 'thirty_min':
1126
+ $emails_number /= 2;
1127
+ break;
1128
+
1129
+ case 'hourly':
1130
+ case '':
1131
+ $emails_number /= 4;
1132
+ break;
1133
+
1134
+ case 'two_hours':
1135
+ $emails_number /= 8;
1136
+ break;
1137
+ }
1138
+ $emails_number = round($emails_number);
1139
+ }
1140
+ return $emails_number;
1141
+ }
1142
+
1143
  }
lib/Config/Migrator.php CHANGED
@@ -17,6 +17,7 @@ class Migrator {
17
  'segments',
18
  'settings',
19
  'custom_fields',
 
20
  'sending_queues',
21
  'subscribers',
22
  'subscriber_segment',
@@ -104,6 +105,26 @@ class Migrator {
104
  return $this->sqlify(__FUNCTION__, $attributes);
105
  }
106
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
107
  function sendingQueues() {
108
  $attributes = array(
109
  'id mediumint(9) NOT NULL AUTO_INCREMENT,',
@@ -190,6 +211,7 @@ class Migrator {
190
  'reply_to_name varchar(150) NOT NULL DEFAULT "",',
191
  'preheader varchar(250) NOT NULL DEFAULT "",',
192
  'body longtext,',
 
193
  'created_at TIMESTAMP NULL,',
194
  'updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,',
195
  'deleted_at TIMESTAMP NULL,',
17
  'segments',
18
  'settings',
19
  'custom_fields',
20
+ 'scheduled_tasks',
21
  'sending_queues',
22
  'subscribers',
23
  'subscriber_segment',
105
  return $this->sqlify(__FUNCTION__, $attributes);
106
  }
107
 
108
+ function scheduledTasks() {
109
+ $attributes = array(
110
+ 'id mediumint(9) NOT NULL AUTO_INCREMENT,',
111
+ 'type varchar(90) NULL DEFAULT NULL,',
112
+ 'subscribers longtext,',
113
+ 'status varchar(12) NULL DEFAULT NULL,',
114
+ 'priority mediumint(9) NOT NULL DEFAULT 0,',
115
+ 'count_total mediumint(9) NOT NULL DEFAULT 0,',
116
+ 'count_processed mediumint(9) NOT NULL DEFAULT 0,',
117
+ 'count_to_process mediumint(9) NOT NULL DEFAULT 0,',
118
+ 'scheduled_at TIMESTAMP NULL,',
119
+ 'processed_at TIMESTAMP NULL,',
120
+ 'created_at TIMESTAMP NULL,',
121
+ 'updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,',
122
+ 'deleted_at TIMESTAMP NULL,',
123
+ 'PRIMARY KEY (id)',
124
+ );
125
+ return $this->sqlify(__FUNCTION__, $attributes);
126
+ }
127
+
128
  function sendingQueues() {
129
  $attributes = array(
130
  'id mediumint(9) NOT NULL AUTO_INCREMENT,',
211
  'reply_to_name varchar(150) NOT NULL DEFAULT "",',
212
  'preheader varchar(250) NOT NULL DEFAULT "",',
213
  'body longtext,',
214
+ 'sent_at TIMESTAMP NULL,',
215
  'created_at TIMESTAMP NULL,',
216
  'updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,',
217
  'deleted_at TIMESTAMP NULL,',
lib/Config/Populator.php CHANGED
@@ -3,7 +3,9 @@ namespace MailPoet\Config;
3
 
4
  use MailPoet\Cron\CronTrigger;
5
  use MailPoet\Mailer\MailerLog;
 
6
  use MailPoet\Models\Segment;
 
7
  use MailPoet\Segments\WP;
8
  use MailPoet\Models\Setting;
9
  use MailPoet\Settings\Pages;
@@ -26,36 +28,38 @@ class Populator {
26
  'newsletter_templates',
27
  );
28
  $this->templates = array(
29
- "NewsletterBlank1Column",
30
- "NewsletterBlank12Column",
31
- "NewsletterBlank121Column",
32
- "NewsletterBlank13Column",
33
- "PostNotificationsBlank1Column",
34
- "WelcomeBlank1Column",
35
- "WelcomeBlank12Column",
36
- "SimpleText",
37
- "BurgerJoint",
38
- "AppWelcome",
39
- "WorldCup",
40
- "FoodBox",
41
- "Discount",
42
- "KickOff",
43
- "TakeAHike",
44
- "FestivalEvent",
45
- "PieceOfCake",
46
- "Shoes",
47
- "ScienceWeekly",
48
- "ChocolateStore",
49
- "Faith",
50
- "TravelNomads",
51
- "CoffeeShop",
52
- "NewsDay",
53
- "YogaStudio",
54
  );
55
  }
56
 
57
  function up() {
58
  $this->convertExistingDataToUTF8();
 
 
59
 
60
  array_map(array($this, 'populate'), $this->models);
61
 
@@ -327,8 +331,10 @@ class Populator {
327
  * character set, which usually defaults to latin1, but stored UTF-8 data.
328
  * This method converts existing incorrectly stored data that uses the
329
  * default character set, into a new character set that is used by WordPress.
 
 
330
  */
331
- public function convertExistingDataToUTF8() {
332
  global $wpdb;
333
 
334
  if(!version_compare(get_option('mailpoet_db_version'), '3.0.0-beta.32', '<=')) {
@@ -360,7 +366,6 @@ class Populator {
360
  'forms' => array('name', 'body', 'settings', 'styles'),
361
  );
362
 
363
-
364
  foreach($tables as $table => $columns) {
365
  $query = "UPDATE `%s` SET %s WHERE %s";
366
  $columns_query = array();
@@ -386,4 +391,75 @@ class Populator {
386
  }
387
  }
388
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
389
  }
3
 
4
  use MailPoet\Cron\CronTrigger;
5
  use MailPoet\Mailer\MailerLog;
6
+ use MailPoet\Models\Newsletter;
7
  use MailPoet\Models\Segment;
8
+ use MailPoet\Models\SendingQueue;
9
  use MailPoet\Segments\WP;
10
  use MailPoet\Models\Setting;
11
  use MailPoet\Settings\Pages;
28
  'newsletter_templates',
29
  );
30
  $this->templates = array(
31
+ 'NewsletterBlank1Column',
32
+ 'NewsletterBlank12Column',
33
+ 'NewsletterBlank121Column',
34
+ 'NewsletterBlank13Column',
35
+ 'PostNotificationsBlank1Column',
36
+ 'WelcomeBlank1Column',
37
+ 'WelcomeBlank12Column',
38
+ 'SimpleText',
39
+ 'BurgerJoint',
40
+ 'AppWelcome',
41
+ 'WorldCup',
42
+ 'FoodBox',
43
+ 'Discount',
44
+ 'KickOff',
45
+ 'TakeAHike',
46
+ 'FestivalEvent',
47
+ 'PieceOfCake',
48
+ 'Shoes',
49
+ 'ScienceWeekly',
50
+ 'ChocolateStore',
51
+ 'Faith',
52
+ 'TravelNomads',
53
+ 'CoffeeShop',
54
+ 'NewsDay',
55
+ 'YogaStudio',
56
  );
57
  }
58
 
59
  function up() {
60
  $this->convertExistingDataToUTF8();
61
+ $this->migrateSimpleScheduledTasks();
62
+ $this->populateNewsletterSentAtField();
63
 
64
  array_map(array($this, 'populate'), $this->models);
65
 
331
  * character set, which usually defaults to latin1, but stored UTF-8 data.
332
  * This method converts existing incorrectly stored data that uses the
333
  * default character set, into a new character set that is used by WordPress.
334
+ *
335
+ * TODO: remove in final release
336
  */
337
+ function convertExistingDataToUTF8() {
338
  global $wpdb;
339
 
340
  if(!version_compare(get_option('mailpoet_db_version'), '3.0.0-beta.32', '<=')) {
366
  'forms' => array('name', 'body', 'settings', 'styles'),
367
  );
368
 
 
369
  foreach($tables as $table => $columns) {
370
  $query = "UPDATE `%s` SET %s WHERE %s";
371
  $columns_query = array();
391
  }
392
  }
393
 
394
+ /*
395
+ * This migrates simple scheduled tasks from sending queues table to scheduled tasks table
396
+ *
397
+ * TODO: remove in final release
398
+ */
399
+ public function migrateSimpleScheduledTasks() {
400
+ global $wpdb;
401
+
402
+ // perform once for versions below 3.0.0-beta.36.2.1
403
+ if(version_compare(get_option('mailpoet_db_version'), '3.0.0-beta.36.2.1', '>=')) {
404
+ return;
405
+ }
406
+
407
+ $column_list = array(
408
+ 'id',
409
+ 'type',
410
+ 'subscribers',
411
+ 'status',
412
+ 'priority',
413
+ 'count_total',
414
+ 'count_processed',
415
+ 'count_to_process',
416
+ 'scheduled_at',
417
+ 'processed_at',
418
+ 'created_at',
419
+ 'updated_at',
420
+ 'deleted_at'
421
+ );
422
+
423
+ $task_types = array(
424
+ 'bounce',
425
+ 'sending_service_key_check',
426
+ 'premium_key_check'
427
+ );
428
+
429
+ $wpdb->query(sprintf(
430
+ 'INSERT IGNORE INTO %s SELECT %s FROM %s WHERE %s',
431
+ MP_SCHEDULED_TASKS_TABLE,
432
+ '`' . join('`, `', $column_list) . '`',
433
+ MP_SENDING_QUEUES_TABLE,
434
+ '`type` IN("' . join('" , "', $task_types) . '")'
435
+ ));
436
+
437
+ $wpdb->query(sprintf(
438
+ 'DELETE FROM %s WHERE %s',
439
+ MP_SENDING_QUEUES_TABLE,
440
+ '`type` IN("' . join('" , "', $task_types) . '")'
441
+ ));
442
+ }
443
+
444
+ /*
445
+ * This populates existing newsletters' sent_at field with processed_at field data from
446
+ * corresponding sending queue.
447
+ *
448
+ * TODO: remove in final release
449
+ */
450
+ function populateNewsletterSentAtField() {
451
+ global $wpdb;
452
+
453
+ // perform once for versions below 3.0.0-beta.36.2.1
454
+ if(version_compare(get_option('mailpoet_db_version'), '3.0.0-beta.36.2.1', '>=')) {
455
+ return;
456
+ }
457
+
458
+ $query = "UPDATE `%s` newsletters JOIN `%s` queues ON newsletters.id = queues.newsletter_id SET newsletters.sent_at = queues.processed_at";
459
+ $wpdb->query(sprintf(
460
+ $query,
461
+ Newsletter::$_table,
462
+ SendingQueue::$_table
463
+ ));
464
+ }
465
  }
lib/Config/RequirementsChecker.php CHANGED
@@ -66,7 +66,8 @@ class RequirementsChecker {
66
  if(!is_dir($paths['cache_path']) && !wp_mkdir_p($paths['cache_path'])) {
67
  $error = Helpers::replaceLinkTags(
68
  __('MailPoet requires write permissions inside the /wp-content/uploads folder. Please read our [link]instructions[/link] on how to resolve this issue.', 'mailpoet'),
69
- '//beta.docs.mailpoet.com/article/152-minimum-requirements-for-mailpoet-3#folder_permissions'
 
70
  );
71
  return $this->processError($error);
72
  }
@@ -86,7 +87,8 @@ class RequirementsChecker {
86
  if(extension_loaded('pdo') && extension_loaded('pdo_mysql')) return true;
87
  $error = Helpers::replaceLinkTags(
88
  __('MailPoet requires a PDO_MYSQL PHP extension. Please read our [link]instructions[/link] on how to resolve this issue.', 'mailpoet'),
89
- '//beta.docs.mailpoet.com/article/152-minimum-requirements-for-mailpoet-3#php_extension'
 
90
  );
91
  return $this->processError($error);
92
  }
@@ -102,7 +104,8 @@ class RequirementsChecker {
102
  if(extension_loaded('xml')) return true;
103
  $error = Helpers::replaceLinkTags(
104
  __('MailPoet requires an XML PHP extension. Please read our [link]instructions[/link] on how to resolve this issue.', 'mailpoet'),
105
- '//beta.docs.mailpoet.com/article/152-minimum-requirements-for-mailpoet-3#php_extension'
 
106
  );
107
  return $this->processError($error);
108
  }
@@ -111,7 +114,8 @@ class RequirementsChecker {
111
  if(extension_loaded('zip')) return true;
112
  $error = Helpers::replaceLinkTags(
113
  __('MailPoet requires a ZIP PHP extension. Please read our [link]instructions[/link] on how to resolve this issue.', 'mailpoet'),
114
- '//beta.docs.mailpoet.com/article/152-minimum-requirements-for-mailpoet-3#php_extension'
 
115
  );
116
  return $this->processError($error);
117
  }
66
  if(!is_dir($paths['cache_path']) && !wp_mkdir_p($paths['cache_path'])) {
67
  $error = Helpers::replaceLinkTags(
68
  __('MailPoet requires write permissions inside the /wp-content/uploads folder. Please read our [link]instructions[/link] on how to resolve this issue.', 'mailpoet'),
69
+ '//beta.docs.mailpoet.com/article/152-minimum-requirements-for-mailpoet-3#folder_permissions',
70
+ array('target' => '_blank')
71
  );
72
  return $this->processError($error);
73
  }
87
  if(extension_loaded('pdo') && extension_loaded('pdo_mysql')) return true;
88
  $error = Helpers::replaceLinkTags(
89
  __('MailPoet requires a PDO_MYSQL PHP extension. Please read our [link]instructions[/link] on how to resolve this issue.', 'mailpoet'),
90
+ '//beta.docs.mailpoet.com/article/152-minimum-requirements-for-mailpoet-3#php_extension',
91
+ array('target' => '_blank')
92
  );
93
  return $this->processError($error);
94
  }
104
  if(extension_loaded('xml')) return true;
105
  $error = Helpers::replaceLinkTags(
106
  __('MailPoet requires an XML PHP extension. Please read our [link]instructions[/link] on how to resolve this issue.', 'mailpoet'),
107
+ '//beta.docs.mailpoet.com/article/152-minimum-requirements-for-mailpoet-3#php_extension',
108
+ array('target' => '_blank')
109
  );
110
  return $this->processError($error);
111
  }
114
  if(extension_loaded('zip')) return true;
115
  $error = Helpers::replaceLinkTags(
116
  __('MailPoet requires a ZIP PHP extension. Please read our [link]instructions[/link] on how to resolve this issue.', 'mailpoet'),
117
+ '//beta.docs.mailpoet.com/article/152-minimum-requirements-for-mailpoet-3#php_extension',
118
+ array('target' => '_blank')
119
  );
120
  return $this->processError($error);
121
  }
lib/Config/ServicesChecker.php CHANGED
@@ -27,7 +27,8 @@ class ServicesChecker {
27
  if($display_error_notice) {
28
  $error = Helpers::replaceLinkTags(
29
  __('All sending is currently paused! Your key to send with MailPoet is invalid. [link]Visit MailPoet.com to purchase a key[/link]', 'mailpoet'),
30
- 'https://account.mailpoet.com?s=' . Subscriber::getTotalSubscribers()
 
31
  );
32
  WPNotice::displayError($error);
33
  }
@@ -40,7 +41,8 @@ class ServicesChecker {
40
  $date = $date_time->formatDate(strtotime($mss_key['data']['expire_at']));
41
  $error = Helpers::replaceLinkTags(
42
  __('Your newsletters are awesome! Don\'t forget to [link]upgrade your MailPoet email plan[/link] by %s to keep sending them to your subscribers.', 'mailpoet'),
43
- 'https://account.mailpoet.com?s=' . Subscriber::getTotalSubscribers()
 
44
  );
45
  $error = sprintf($error, $date);
46
  WPNotice::displayWarning($error);
@@ -70,7 +72,8 @@ class ServicesChecker {
70
  if($display_error_notice) {
71
  $error = Helpers::replaceLinkTags(
72
  __('Warning! Your License Key is either invalid or expired. [link]Renew your License now[/link] to enjoy automatic updates and Premium support.', 'mailpoet'),
73
- 'https://account.mailpoet.com'
 
74
  );
75
  WPNotice::displayError($error);
76
  }
@@ -83,7 +86,8 @@ class ServicesChecker {
83
  $date = $date_time->formatDate(strtotime($premium_key['data']['expire_at']));
84
  $error = Helpers::replaceLinkTags(
85
  __('Your License Key is expiring! Don\'t forget to [link]renew your license[/link] by %s to keep enjoying automatic updates and Premium support.', 'mailpoet'),
86
- 'https://account.mailpoet.com'
 
87
  );
88
  $error = sprintf($error, $date);
89
  WPNotice::displayWarning($error);
27
  if($display_error_notice) {
28
  $error = Helpers::replaceLinkTags(
29
  __('All sending is currently paused! Your key to send with MailPoet is invalid. [link]Visit MailPoet.com to purchase a key[/link]', 'mailpoet'),
30
+ 'https://account.mailpoet.com?s=' . Subscriber::getTotalSubscribers(),
31
+ array('target' => '_blank')
32
  );
33
  WPNotice::displayError($error);
34
  }
41
  $date = $date_time->formatDate(strtotime($mss_key['data']['expire_at']));
42
  $error = Helpers::replaceLinkTags(
43
  __('Your newsletters are awesome! Don\'t forget to [link]upgrade your MailPoet email plan[/link] by %s to keep sending them to your subscribers.', 'mailpoet'),
44
+ 'https://account.mailpoet.com?s=' . Subscriber::getTotalSubscribers(),
45
+ array('target' => '_blank')
46
  );
47
  $error = sprintf($error, $date);
48
  WPNotice::displayWarning($error);
72
  if($display_error_notice) {
73
  $error = Helpers::replaceLinkTags(
74
  __('Warning! Your License Key is either invalid or expired. [link]Renew your License now[/link] to enjoy automatic updates and Premium support.', 'mailpoet'),
75
+ 'https://account.mailpoet.com',
76
+ array('target' => '_blank')
77
  );
78
  WPNotice::displayError($error);
79
  }
86
  $date = $date_time->formatDate(strtotime($premium_key['data']['expire_at']));
87
  $error = Helpers::replaceLinkTags(
88
  __('Your License Key is expiring! Don\'t forget to [link]renew your license[/link] by %s to keep enjoying automatic updates and Premium support.', 'mailpoet'),
89
+ 'https://account.mailpoet.com',
90
+ array('target' => '_blank')
91
  );
92
  $error = sprintf($error, $date);
93
  WPNotice::displayWarning($error);
lib/Cron/Triggers/WordPress.php CHANGED
@@ -28,20 +28,20 @@ class WordPress {
28
  // sending service
29
  $mp_sending_enabled = Bridge::isMPSendingServiceEnabled();
30
  // bounce sync
31
- $bounce_due_queues = BounceWorker::getAllDueQueues();
32
- $bounce_future_queues = BounceWorker::getFutureQueues();
33
  // sending service key check
34
- $sskeycheck_due_queues = SendingServiceKeyCheckWorker::getAllDueQueues();
35
- $sskeycheck_future_queues = SendingServiceKeyCheckWorker::getFutureQueues();
36
  // premium key check
37
  $premium_key_specified = Bridge::isPremiumKeySpecified();
38
- $premium_keycheck_due_queues = PremiumKeyCheckWorker::getAllDueQueues();
39
- $premium_keycheck_future_queues = PremiumKeyCheckWorker::getFutureQueues();
40
  // check requirements for each worker
41
  $sending_queue_active = (($scheduled_queues || $running_queues) && !$sending_limit_reached && !$sending_is_paused);
42
- $bounce_sync_active = ($mp_sending_enabled && ($bounce_due_queues || !$bounce_future_queues));
43
- $sending_service_key_check_active = ($mp_sending_enabled && ($sskeycheck_due_queues || !$sskeycheck_future_queues));
44
- $premium_key_check_active = ($premium_key_specified && ($premium_keycheck_due_queues || !$premium_keycheck_future_queues));
45
 
46
  return ($sending_queue_active || $bounce_sync_active || $sending_service_key_check_active || $premium_key_check_active);
47
  }
28
  // sending service
29
  $mp_sending_enabled = Bridge::isMPSendingServiceEnabled();
30
  // bounce sync
31
+ $bounce_due_tasks = BounceWorker::getAllDueTasks();
32
+ $bounce_future_tasks = BounceWorker::getFutureTasks();
33
  // sending service key check
34
+ $msskeycheck_due_tasks = SendingServiceKeyCheckWorker::getAllDueTasks();
35
+ $msskeycheck_future_tasks = SendingServiceKeyCheckWorker::getFutureTasks();
36
  // premium key check
37
  $premium_key_specified = Bridge::isPremiumKeySpecified();
38
+ $premium_keycheck_due_tasks = PremiumKeyCheckWorker::getAllDueTasks();
39
+ $premium_keycheck_future_tasks = PremiumKeyCheckWorker::getFutureTasks();
40
  // check requirements for each worker
41
  $sending_queue_active = (($scheduled_queues || $running_queues) && !$sending_limit_reached && !$sending_is_paused);
42
+ $bounce_sync_active = ($mp_sending_enabled && ($bounce_due_tasks || !$bounce_future_tasks));
43
+ $sending_service_key_check_active = ($mp_sending_enabled && ($msskeycheck_due_tasks || !$msskeycheck_future_tasks));
44
+ $premium_key_check_active = ($premium_key_specified && ($premium_keycheck_due_tasks || !$premium_keycheck_future_tasks));
45
 
46
  return ($sending_queue_active || $bounce_sync_active || $sending_service_key_check_active || $premium_key_check_active);
47
  }
lib/Cron/Workers/Bounce.php CHANGED
@@ -3,7 +3,7 @@ namespace MailPoet\Cron\Workers;
3
 
4
  use MailPoet\Cron\CronHelper;
5
  use MailPoet\Mailer\Mailer;
6
- use MailPoet\Models\SendingQueue;
7
  use MailPoet\Models\Subscriber;
8
  use MailPoet\Services\Bridge;
9
  use MailPoet\Services\Bridge\API;
@@ -32,7 +32,7 @@ class Bounce extends SimpleWorker {
32
  return Bridge::isMPSendingServiceEnabled();
33
  }
34
 
35
- function prepareQueue(SendingQueue $queue) {
36
  $subscribers = Subscriber::select('id')
37
  ->whereNull('deleted_at')
38
  ->whereIn('status', array(
@@ -43,30 +43,30 @@ class Bounce extends SimpleWorker {
43
  $subscribers = Helpers::arrayColumn($subscribers, 'id');
44
 
45
  if(empty($subscribers)) {
46
- $queue->delete();
47
  return false;
48
  }
49
 
50
- // update current queue
51
- $queue->subscribers = serialize(
52
  array(
53
  'to_process' => $subscribers
54
  )
55
  );
56
- $queue->count_total = $queue->count_to_process = count($subscribers);
57
 
58
- return parent::prepareQueue($queue);
59
  }
60
 
61
- function processQueue(SendingQueue $queue) {
62
- $queue->subscribers = $queue->getSubscribers();
63
- if(empty($queue->subscribers['to_process'])) {
64
- $queue->delete();
65
  return false;
66
  }
67
 
68
  $subscriber_batches = array_chunk(
69
- $queue->subscribers['to_process'],
70
  self::BATCH_SIZE
71
  );
72
 
@@ -82,7 +82,7 @@ class Bounce extends SimpleWorker {
82
 
83
  $this->processEmails($subscriber_emails);
84
 
85
- $queue->updateProcessedSubscribers($subscribers_to_process_ids);
86
  }
87
 
88
  return true;
3
 
4
  use MailPoet\Cron\CronHelper;
5
  use MailPoet\Mailer\Mailer;
6
+ use MailPoet\Models\ScheduledTask;
7
  use MailPoet\Models\Subscriber;
8
  use MailPoet\Services\Bridge;
9
  use MailPoet\Services\Bridge\API;
32
  return Bridge::isMPSendingServiceEnabled();
33
  }
34
 
35
+ function prepareTask(ScheduledTask $task) {
36
  $subscribers = Subscriber::select('id')
37
  ->whereNull('deleted_at')
38
  ->whereIn('status', array(
43
  $subscribers = Helpers::arrayColumn($subscribers, 'id');
44
 
45
  if(empty($subscribers)) {
46
+ $task->delete();
47
  return false;
48
  }
49
 
50
+ // update current task
51
+ $task->subscribers = serialize(
52
  array(
53
  'to_process' => $subscribers
54
  )
55
  );
56
+ $task->count_total = $task->count_to_process = count($subscribers);
57
 
58
+ return parent::prepareTask($task);
59
  }
60
 
61
+ function processTask(ScheduledTask $task) {
62
+ $task->subscribers = $task->getSubscribers();
63
+ if(empty($task->subscribers['to_process'])) {
64
+ $task->delete();
65
  return false;
66
  }
67
 
68
  $subscriber_batches = array_chunk(
69
+ $task->subscribers['to_process'],
70
  self::BATCH_SIZE
71
  );
72
 
82
 
83
  $this->processEmails($subscriber_emails);
84
 
85
+ $task->updateProcessedSubscribers($subscribers_to_process_ids);
86
  }
87
 
88
  return true;
lib/Cron/Workers/KeyCheck/KeyCheckWorker.php CHANGED
@@ -3,7 +3,7 @@ namespace MailPoet\Cron\Workers\KeyCheck;
3
 
4
  use MailPoet\Cron\CronHelper;
5
  use MailPoet\Cron\Workers\SimpleWorker;
6
- use MailPoet\Models\SendingQueue;
7
  use MailPoet\Services\Bridge;
8
 
9
  if(!defined('ABSPATH')) exit;
@@ -19,7 +19,7 @@ abstract class KeyCheckWorker extends SimpleWorker {
19
  }
20
  }
21
 
22
- function processQueueStrategy(SendingQueue $queue) {
23
  try {
24
  $result = $this->checkKey();
25
  } catch (\Exception $e) {
@@ -27,7 +27,7 @@ abstract class KeyCheckWorker extends SimpleWorker {
27
  }
28
 
29
  if(empty($result['code']) || $result['code'] == Bridge::CHECK_ERROR_UNAVAILABLE) {
30
- $this->reschedule($queue, self::UNAVAILABLE_SERVICE_RESCHEDULE_TIMEOUT);
31
  return false;
32
  }
33
 
3
 
4
  use MailPoet\Cron\CronHelper;
5
  use MailPoet\Cron\Workers\SimpleWorker;
6
+ use MailPoet\Models\ScheduledTask;
7
  use MailPoet\Services\Bridge;
8
 
9
  if(!defined('ABSPATH')) exit;
19
  }
20
  }
21
 
22
+ function processTaskStrategy(ScheduledTask $task) {
23
  try {
24
  $result = $this->checkKey();
25
  } catch (\Exception $e) {
27
  }
28
 
29
  if(empty($result['code']) || $result['code'] == Bridge::CHECK_ERROR_UNAVAILABLE) {
30
+ $this->reschedule($task, self::UNAVAILABLE_SERVICE_RESCHEDULE_TIMEOUT);
31
  return false;
32
  }
33
 
lib/Cron/Workers/SendingQueue/SendingQueue.php CHANGED
@@ -70,7 +70,7 @@ class SendingQueue {
70
  );
71
  $queue->removeNonexistentSubscribers($subscibers_to_remove);
72
  if(!count($queue->subscribers['to_process'])) {
73
- $this->newsletter_task->markNewsletterAsSent($newsletter);
74
  continue;
75
  }
76
  }
@@ -80,7 +80,7 @@ class SendingQueue {
80
  $found_subscribers
81
  );
82
  if($queue->status === SendingQueueModel::STATUS_COMPLETED) {
83
- $this->newsletter_task->markNewsletterAsSent($newsletter);
84
  }
85
  $this->enforceSendingAndExecutionLimits();
86
  }
70
  );
71
  $queue->removeNonexistentSubscribers($subscibers_to_remove);
72
  if(!count($queue->subscribers['to_process'])) {
73
+ $this->newsletter_task->markNewsletterAsSent($newsletter, $queue);
74
  continue;
75
  }
76
  }
80
  $found_subscribers
81
  );
82
  if($queue->status === SendingQueueModel::STATUS_COMPLETED) {
83
+ $this->newsletter_task->markNewsletterAsSent($newsletter, $queue);
84
  }
85
  $this->enforceSendingAndExecutionLimits();
86
  }
lib/Cron/Workers/SendingQueue/Tasks/Newsletter.php CHANGED
@@ -125,12 +125,14 @@ class Newsletter {
125
  );
126
  }
127
 
128
- function markNewsletterAsSent($newsletter) {
129
  // if it's a standard or notification history newsletter, update its status
130
  if($newsletter->type === NewsletterModel::TYPE_STANDARD ||
131
  $newsletter->type === NewsletterModel::TYPE_NOTIFICATION_HISTORY
132
  ) {
133
- $newsletter->setStatus(NewsletterModel::STATUS_SENT);
 
 
134
  }
135
  }
136
 
125
  );
126
  }
127
 
128
+ function markNewsletterAsSent($newsletter, $queue) {
129
  // if it's a standard or notification history newsletter, update its status
130
  if($newsletter->type === NewsletterModel::TYPE_STANDARD ||
131
  $newsletter->type === NewsletterModel::TYPE_NOTIFICATION_HISTORY
132
  ) {
133
+ $newsletter->status = NewsletterModel::STATUS_SENT;
134
+ $newsletter->sent_at = $queue->processed_at;
135
+ $newsletter->save();
136
  }
137
  }
138
 
lib/Cron/Workers/SimpleWorker.php CHANGED
@@ -3,7 +3,7 @@ namespace MailPoet\Cron\Workers;
3
 
4
  use Carbon\Carbon;
5
  use MailPoet\Cron\CronHelper;
6
- use MailPoet\Models\SendingQueue;
7
 
8
  if(!defined('ABSPATH')) exit;
9
 
@@ -32,45 +32,44 @@ abstract class SimpleWorker {
32
  $this->init();
33
  }
34
 
35
- $scheduled_queues = self::getScheduledQueues();
36
- $running_queues = self::getRunningQueues();
37
 
38
- if(!$scheduled_queues && !$running_queues) {
39
  self::schedule();
40
  return false;
41
  }
42
 
43
- foreach($scheduled_queues as $i => $queue) {
44
- $this->prepareQueue($queue);
45
  }
46
- foreach($running_queues as $i => $queue) {
47
- $this->processQueue($queue);
48
  }
49
 
50
  return true;
51
  }
52
 
53
  static function schedule() {
54
- $already_scheduled = SendingQueue::where('type', static::TASK_TYPE)
55
  ->whereNull('deleted_at')
56
- ->where('status', SendingQueue::STATUS_SCHEDULED)
57
  ->findMany();
58
  if($already_scheduled) {
59
  return false;
60
  }
61
- $queue = SendingQueue::create();
62
- $queue->type = static::TASK_TYPE;
63
- $queue->status = SendingQueue::STATUS_SCHEDULED;
64
- $queue->priority = SendingQueue::PRIORITY_LOW;
65
- $queue->scheduled_at = self::getNextRunDate();
66
- $queue->newsletter_id = 0;
67
- $queue->save();
68
- return $queue;
69
  }
70
 
71
- function prepareQueue(SendingQueue $queue) {
72
- $queue->status = null;
73
- $queue->save();
74
 
75
  // abort if execution limit is reached
76
  CronHelper::enforceExecutionLimit($this->timer);
@@ -78,32 +77,32 @@ abstract class SimpleWorker {
78
  return true;
79
  }
80
 
81
- function processQueue(SendingQueue $queue) {
82
  // abort if execution limit is reached
83
  CronHelper::enforceExecutionLimit($this->timer);
84
 
85
- if($this->processQueueStrategy($queue)) {
86
- $this->complete($queue);
87
  return true;
88
  }
89
 
90
  return false;
91
  }
92
 
93
- function processQueueStrategy(SendingQueue $queue) {
94
  return true;
95
  }
96
 
97
- function complete(SendingQueue $queue) {
98
- $queue->processed_at = current_time('mysql');
99
- $queue->status = SendingQueue::STATUS_COMPLETED;
100
- $queue->save();
101
  }
102
 
103
- function reschedule(SendingQueue $queue, $timeout) {
104
  $scheduled_at = Carbon::createFromTimestamp(current_time('timestamp'));
105
- $queue->scheduled_at = $scheduled_at->addMinutes($timeout);
106
- $queue->save();
107
  }
108
 
109
  static function getNextRunDate() {
@@ -114,30 +113,30 @@ abstract class SimpleWorker {
114
  return $date;
115
  }
116
 
117
- static function getScheduledQueues($future = false) {
118
  $dateWhere = ($future) ? 'whereGt' : 'whereLte';
119
- return SendingQueue::where('type', static::TASK_TYPE)
120
  ->$dateWhere('scheduled_at', Carbon::createFromTimestamp(current_time('timestamp')))
121
  ->whereNull('deleted_at')
122
- ->where('status', SendingQueue::STATUS_SCHEDULED)
123
  ->findMany();
124
  }
125
 
126
- static function getRunningQueues() {
127
- return SendingQueue::where('type', static::TASK_TYPE)
128
  ->whereLte('scheduled_at', Carbon::createFromTimestamp(current_time('timestamp')))
129
  ->whereNull('deleted_at')
130
  ->whereNull('status')
131
  ->findMany();
132
  }
133
 
134
- static function getAllDueQueues() {
135
- $scheduled_queues = self::getScheduledQueues();
136
- $running_queues = self::getRunningQueues();
137
- return array_merge((array)$scheduled_queues, (array)$running_queues);
138
  }
139
 
140
- static function getFutureQueues() {
141
- return self::getScheduledQueues(true);
142
  }
143
  }
3
 
4
  use Carbon\Carbon;
5
  use MailPoet\Cron\CronHelper;
6
+ use MailPoet\Models\ScheduledTask;
7
 
8
  if(!defined('ABSPATH')) exit;
9
 
32
  $this->init();
33
  }
34
 
35
+ $scheduled_tasks = self::getScheduledTasks();
36
+ $running_tasks = self::getRunningTasks();
37
 
38
+ if(!$scheduled_tasks && !$running_tasks) {
39
  self::schedule();
40
  return false;
41
  }
42
 
43
+ foreach($scheduled_tasks as $i => $task) {
44
+ $this->prepareTask($task);
45
  }
46
+ foreach($running_tasks as $i => $task) {
47
+ $this->processTask($task);
48
  }
49
 
50
  return true;
51
  }
52
 
53
  static function schedule() {
54
+ $already_scheduled = ScheduledTask::where('type', static::TASK_TYPE)
55
  ->whereNull('deleted_at')
56
+ ->where('status', ScheduledTask::STATUS_SCHEDULED)
57
  ->findMany();
58
  if($already_scheduled) {
59
  return false;
60
  }
61
+ $task = ScheduledTask::create();
62
+ $task->type = static::TASK_TYPE;
63
+ $task->status = ScheduledTask::STATUS_SCHEDULED;
64
+ $task->priority = ScheduledTask::PRIORITY_LOW;
65
+ $task->scheduled_at = self::getNextRunDate();
66
+ $task->save();
67
+ return $task;
 
68
  }
69
 
70
+ function prepareTask(ScheduledTask $task) {
71
+ $task->status = null;
72
+ $task->save();
73
 
74
  // abort if execution limit is reached
75
  CronHelper::enforceExecutionLimit($this->timer);
77
  return true;
78
  }
79
 
80
+ function processTask(ScheduledTask $task) {
81
  // abort if execution limit is reached
82
  CronHelper::enforceExecutionLimit($this->timer);
83
 
84
+ if($this->processTaskStrategy($task)) {
85
+ $this->complete($task);
86
  return true;
87
  }
88
 
89
  return false;
90
  }
91
 
92
+ function processTaskStrategy(ScheduledTask $task) {
93
  return true;
94
  }
95
 
96
+ function complete(ScheduledTask $task) {
97
+ $task->processed_at = current_time('mysql');
98
+ $task->status = ScheduledTask::STATUS_COMPLETED;
99
+ $task->save();
100
  }
101
 
102
+ function reschedule(ScheduledTask $task, $timeout) {
103
  $scheduled_at = Carbon::createFromTimestamp(current_time('timestamp'));
104
+ $task->scheduled_at = $scheduled_at->addMinutes($timeout);
105
+ $task->save();
106
  }
107
 
108
  static function getNextRunDate() {
113
  return $date;
114
  }
115
 
116
+ static function getScheduledTasks($future = false) {
117
  $dateWhere = ($future) ? 'whereGt' : 'whereLte';
118
+ return ScheduledTask::where('type', static::TASK_TYPE)
119
  ->$dateWhere('scheduled_at', Carbon::createFromTimestamp(current_time('timestamp')))
120
  ->whereNull('deleted_at')
121
+ ->where('status', ScheduledTask::STATUS_SCHEDULED)
122
  ->findMany();
123
  }
124
 
125
+ static function getRunningTasks() {
126
+ return ScheduledTask::where('type', static::TASK_TYPE)
127
  ->whereLte('scheduled_at', Carbon::createFromTimestamp(current_time('timestamp')))
128
  ->whereNull('deleted_at')
129
  ->whereNull('status')
130
  ->findMany();
131
  }
132
 
133
+ static function getAllDueTasks() {
134
+ $scheduled_tasks = self::getScheduledTasks();
135
+ $running_tasks = self::getRunningTasks();
136
+ return array_merge((array)$scheduled_tasks, (array)$running_tasks);
137
  }
138
 
139
+ static function getFutureTasks() {
140
+ return self::getScheduledTasks(true);
141
  }
142
  }
lib/Form/Widget.php CHANGED
@@ -84,6 +84,13 @@ class Widget extends \WP_Widget {
84
  window.location =
85
  "<?php echo $form_edit_url; ?>" + response.data.id;
86
  }
 
 
 
 
 
 
 
87
  });
88
  return false;
89
  }
84
  window.location =
85
  "<?php echo $form_edit_url; ?>" + response.data.id;
86
  }
87
+ }).fail((response) => {
88
+ if(response.errors.length > 0) {
89
+ MailPoet.Notice.error(
90
+ response.errors.map((error) => { return error.message; }),
91
+ { scroll: true }
92
+ );
93
+ }
94
  });
95
  return false;
96
  }
lib/Models/Newsletter.php CHANGED
@@ -772,15 +772,22 @@ class Newsletter extends Model {
772
  }
773
 
774
  static function listingQuery($data = array()) {
775
- return self::select(array(
 
776
  'id',
777
  'subject',
778
  'hash',
779
  'type',
780
  'status',
 
781
  'updated_at',
782
  'deleted_at'
783
- ))
 
 
 
 
 
784
  ->filter('filterBy', $data)
785
  ->filter('groupBy', $data)
786
  ->filter('search', $data['search']);
772
  }
773
 
774
  static function listingQuery($data = array()) {
775
+ $query = self::select(
776
+ array(
777
  'id',
778
  'subject',
779
  'hash',
780
  'type',
781
  'status',
782
+ 'sent_at',
783
  'updated_at',
784
  'deleted_at'
785
+ )
786
+ );
787
+ if($data['sort_by'] === 'sent_at') {
788
+ $query = $query->orderByExpr('ISNULL(sent_at) DESC');
789
+ }
790
+ return $query
791
  ->filter('filterBy', $data)
792
  ->filter('groupBy', $data)
793
  ->filter('search', $data['search']);
lib/Models/ScheduledTask.php ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace MailPoet\Models;
3
+
4
+ if(!defined('ABSPATH')) exit;
5
+
6
+ class ScheduledTask extends Model {
7
+ public static $_table = MP_SCHEDULED_TASKS_TABLE;
8
+ const STATUS_COMPLETED = 'completed';
9
+ const STATUS_SCHEDULED = 'scheduled';
10
+ const PRIORITY_HIGH = 1;
11
+ const PRIORITY_MEDIUM = 5;
12
+ const PRIORITY_LOW = 10;
13
+
14
+ function complete() {
15
+ $this->set('status', self::STATUS_COMPLETED);
16
+ $this->save();
17
+ return ($this->getErrors() === false && $this->id() > 0);
18
+ }
19
+
20
+ function save() {
21
+ if(!is_serialized($this->subscribers)) {
22
+ $this->set('subscribers', serialize($this->subscribers));
23
+ }
24
+ // set the default priority to medium
25
+ if(!$this->priority) {
26
+ $this->priority = self::PRIORITY_MEDIUM;
27
+ }
28
+ parent::save();
29
+ $this->subscribers = $this->getSubscribers();
30
+ return $this;
31
+ }
32
+
33
+ function getSubscribers() {
34
+ if(!is_serialized($this->subscribers)) {
35
+ return $this->subscribers;
36
+ }
37
+ $subscribers = unserialize($this->subscribers);
38
+ if(empty($subscribers['processed'])) {
39
+ $subscribers['processed'] = array();
40
+ }
41
+ return $subscribers;
42
+ }
43
+
44
+ function isSubscriberProcessed($subscriber_id) {
45
+ $subscribers = $this->getSubscribers();
46
+ return in_array($subscriber_id, $subscribers['processed']);
47
+ }
48
+
49
+ function asArray() {
50
+ $model = parent::asArray();
51
+ $model['subscribers'] = (is_serialized($this->subscribers))
52
+ ? unserialize($this->subscribers)
53
+ : $this->subscribers;
54
+ return $model;
55
+ }
56
+
57
+ function removeNonexistentSubscribers($subscribers_to_remove) {
58
+ $subscribers = $this->getSubscribers();
59
+ $subscribers['to_process'] = array_values(
60
+ array_diff(
61
+ $subscribers['to_process'],
62
+ $subscribers_to_remove
63
+ )
64
+ );
65
+ $this->subscribers = $subscribers;
66
+ $this->updateCount();
67
+ }
68
+
69
+ function updateProcessedSubscribers($processed_subscribers) {
70
+ $subscribers = $this->getSubscribers();
71
+ $subscribers['processed'] = array_merge(
72
+ $subscribers['processed'],
73
+ $processed_subscribers
74
+ );
75
+ $subscribers['to_process'] = array_values(
76
+ array_diff(
77
+ $subscribers['to_process'],
78
+ $processed_subscribers
79
+ )
80
+ );
81
+ $this->subscribers = $subscribers;
82
+ $this->updateCount();
83
+ }
84
+
85
+ function updateCount() {
86
+ $this->subscribers = $this->getSubscribers();
87
+ $this->count_processed = count($this->subscribers['processed']);
88
+ $this->count_to_process = count($this->subscribers['to_process']);
89
+ $this->count_total = $this->count_processed + $this->count_to_process;
90
+ if(!$this->count_to_process) {
91
+ $this->processed_at = current_time('mysql');
92
+ $this->status = self::STATUS_COMPLETED;
93
+ }
94
+ return $this->save();
95
+ }
96
+ }
lib/Models/Subscriber.php CHANGED
@@ -104,16 +104,11 @@ class Subscriber extends Model {
104
  );
105
 
106
  // replace activation link
107
- $body = str_replace(
108
- array(
109
- '[activation_link]',
110
- '[/activation_link]'
111
- ),
112
- array(
113
- '<a href="'.esc_attr(Subscription\Url::getConfirmationUrl($this)).'">',
114
- '</a>'
115
- ),
116
- $body
117
  );
118
 
119
  // build email data
104
  );
105
 
106
  // replace activation link
107
+ $body = Helpers::replaceLinkTags(
108
+ $body,
109
+ Subscription\Url::getConfirmationUrl($this),
110
+ array('target' => '_blank'),
111
+ 'activation_link'
 
 
 
 
 
112
  );
113
 
114
  // build email data
lib/Newsletter/Scheduler/Scheduler.php CHANGED
@@ -73,6 +73,10 @@ class Scheduler {
73
  }
74
 
75
  static function createWelcomeNotificationQueue($newsletter, $subscriber_id) {
 
 
 
 
76
  $queue = SendingQueue::create();
77
  $queue->newsletter_id = $newsletter->id;
78
  $queue->subscribers = serialize(
73
  }
74
 
75
  static function createWelcomeNotificationQueue($newsletter, $subscriber_id) {
76
+ $previously_scheduled_notification = SendingQueue::where('newsletter_id', $newsletter->id)
77
+ ->whereLike('subscribers', '%' . serialize(array($subscriber_id)) . '%')
78
+ ->findOne();
79
+ if(!empty($previously_scheduled_notification)) return;
80
  $queue = SendingQueue::create();
81
  $queue->newsletter_id = $newsletter->id;
82
  $queue->subscribers = serialize(
lib/Subscription/Pages.php CHANGED
@@ -57,7 +57,7 @@ class Pages {
57
  }
58
 
59
  function confirm() {
60
- if($this->subscriber === false) {
61
  return false;
62
  }
63
 
@@ -95,6 +95,7 @@ class Pages {
95
  }
96
  }
97
  }
 
98
  function setPageTitle($page_title = '') {
99
  global $post;
100
 
@@ -205,7 +206,6 @@ class Pages {
205
  }
206
  }
207
 
208
-
209
  private function getConfirmContent() {
210
  if($this->isPreview() || $this->subscriber !== false) {
211
  return __("Yup, we've added you to our email list. You'll hear from us shortly.", 'mailpoet');
@@ -374,16 +374,16 @@ class Pages {
374
  // check if subscriber's associated WP user is the currently logged in WP user
375
  $wp_current_user = wp_get_current_user();
376
  if($wp_current_user->user_email === $subscriber->email) {
377
- $form_html .= str_replace(
378
- array('[link]', '[/link]'),
379
- array('<a href="'.get_edit_profile_url().'" target="_blank">', '</a>'),
380
- __('[link]Edit your profile[/link] to update your email.', 'mailpoet')
381
  );
382
  } else {
383
- $form_html .= str_replace(
384
- array('[link]', '[/link]'),
385
- array('<a href="'.wp_login_url().'" target="_blank">', '</a>'),
386
- __('[link]Log in to your account[/link] to update your email.', 'mailpoet')
387
  );
388
  }
389
  } else {
57
  }
58
 
59
  function confirm() {
60
+ if($this->subscriber === false || $this->subscriber->status === Subscriber::STATUS_SUBSCRIBED) {
61
  return false;
62
  }
63
 
95
  }
96
  }
97
  }
98
+
99
  function setPageTitle($page_title = '') {
100
  global $post;
101
 
206
  }
207
  }
208
 
 
209
  private function getConfirmContent() {
210
  if($this->isPreview() || $this->subscriber !== false) {
211
  return __("Yup, we've added you to our email list. You'll hear from us shortly.", 'mailpoet');
374
  // check if subscriber's associated WP user is the currently logged in WP user
375
  $wp_current_user = wp_get_current_user();
376
  if($wp_current_user->user_email === $subscriber->email) {
377
+ $form_html .= Helpers::replaceLinkTags(
378
+ __('[link]Edit your profile[/link] to update your email.', 'mailpoet'),
379
+ get_edit_profile_url(),
380
+ array('target' => '_blank')
381
  );
382
  } else {
383
+ $form_html .= Helpers::replaceLinkTags(
384
+ __('[link]Log in to your account[/link] to update your email.', 'mailpoet'),
385
+ wp_login_url(),
386
+ array('target' => '_blank')
387
  );
388
  }
389
  } else {
lib/Twig/Filters.php CHANGED
@@ -17,33 +17,9 @@ class Filters extends \Twig_Extension {
17
  'intval'
18
  ),
19
  new \Twig_SimpleFilter(
20
- 'replaceLink',
21
- array(
22
- $this,
23
- 'replaceLink'
24
- )
25
  )
26
  );
27
  }
28
-
29
- function replaceLink($source, $link = false, $attributes = array()) {
30
- if(!$link) return $source;
31
- $attributes = array_map(function($key) use ($attributes) {
32
- if(is_bool($attributes[$key])) {
33
- return $attributes[$key] ? $key : '';
34
- }
35
- return sprintf('%s="%s"', $key, $attributes[$key]);
36
- }, array_keys($attributes));
37
- $source = str_replace(
38
- '[link]',
39
- sprintf(
40
- '<a %s href="%s">',
41
- join(' ', $attributes),
42
- $link
43
- ),
44
- $source
45
- );
46
- $source = str_replace('[/link]', '</a>', $source);
47
- return preg_replace('/\s+/', ' ', $source);
48
- }
49
  }
17
  'intval'
18
  ),
19
  new \Twig_SimpleFilter(
20
+ 'replaceLinkTags',
21
+ 'MailPoet\Util\Helpers::replaceLinkTags'
 
 
 
22
  )
23
  );
24
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  }
lib/Util/Helpers.php CHANGED
@@ -5,14 +5,23 @@ class Helpers {
5
  const DIVIDER = '***MailPoet***';
6
  const LINK_TAG = 'link';
7
 
8
- static function replaceLinkTags($text, $link, $target = '_blank') {
9
- $text = str_replace(
10
- '[' . self::LINK_TAG . ']',
11
- sprintf('<a href="%s" target="%s">', $link, $target),
12
- $text
 
 
 
 
 
 
 
 
 
13
  );
14
- $text = str_replace('[/' . self::LINK_TAG . ']', '</a>', $text);
15
- return $text;
16
  }
17
 
18
  static function getMaxPostSize($bytes = false) {
@@ -136,5 +145,5 @@ class Helpers {
136
  static function splitObject($object = array()) {
137
  return explode(self::DIVIDER, $object);
138
  }
139
-
140
  }
5
  const DIVIDER = '***MailPoet***';
6
  const LINK_TAG = 'link';
7
 
8
+ static function replaceLinkTags($source, $link = false, $attributes = array(), $link_tag = false) {
9
+ if(!$link) return $source;
10
+ $link_tag = ($link_tag) ? $link_tag : self::LINK_TAG;
11
+ $attributes = array_map(function($key) use ($attributes) {
12
+ return sprintf('%s="%s"', $key, $attributes[$key]);
13
+ }, array_keys($attributes));
14
+ $source = str_replace(
15
+ '[' . $link_tag . ']',
16
+ sprintf(
17
+ '<a %s href="%s">',
18
+ join(' ', $attributes),
19
+ $link
20
+ ),
21
+ $source
22
  );
23
+ $source = str_replace('[/' . $link_tag . ']', '</a>', $source);
24
+ return preg_replace('/\s+/', ' ', $source);
25
  }
26
 
27
  static function getMaxPostSize($bytes = false) {
145
  static function splitObject($object = array()) {
146
  return explode(self::DIVIDER, $object);
147
  }
148
+
149
  }
lib/Util/ProgressBar.php CHANGED
@@ -65,7 +65,7 @@ if(!class_exists('ProgressBar', false)) {
65
  * @param int $count Count
66
  */
67
  public function setTotalCount($count) {
68
- if($count != $this->total_count) {
69
  $this->total_count = $count;
70
  $this->current_count = 0;
71
  $this->saveProgress();
@@ -93,6 +93,14 @@ if(!class_exists('ProgressBar', false)) {
93
  )));
94
  }
95
 
 
 
 
 
 
 
 
 
96
  }
97
 
98
  }
65
  * @param int $count Count
66
  */
67
  public function setTotalCount($count) {
68
+ if(($count != $this->total_count) || ($count == 0)) {
69
  $this->total_count = $count;
70
  $this->current_count = 0;
71
  $this->saveProgress();
93
  )));
94
  }
95
 
96
+ /**
97
+ * Delete the progress file
98
+ *
99
+ */
100
+ public function deleteProgressFile() {
101
+ unlink($this->filename);
102
+ }
103
+
104
  }
105
 
106
  }
mailpoet.php CHANGED
@@ -4,7 +4,7 @@ if(!defined('ABSPATH')) exit;
4
 
5
  /*
6
  * Plugin Name: MailPoet
7
- * Version: 3.0.0-beta.36.2.0
8
  * Plugin URI: http://www.mailpoet.com
9
  * Description: Create and send beautiful email newsletters, autoresponders, and post notifications without leaving WordPress. This is a beta version of our brand new plugin!
10
  * Author: MailPoet
@@ -21,7 +21,7 @@ if(!defined('ABSPATH')) exit;
21
  */
22
 
23
  $mailpoet_plugin = array(
24
- 'version' => '3.0.0-beta.36.2.0',
25
  'filename' => __FILE__,
26
  'path' => dirname(__FILE__),
27
  'autoloader' => dirname(__FILE__) . '/vendor/autoload.php',
4
 
5
  /*
6
  * Plugin Name: MailPoet
7
+ * Version: 3.0.0-beta.36.3.0
8
  * Plugin URI: http://www.mailpoet.com
9
  * Description: Create and send beautiful email newsletters, autoresponders, and post notifications without leaving WordPress. This is a beta version of our brand new plugin!
10
  * Author: MailPoet
21
  */
22
 
23
  $mailpoet_plugin = array(
24
+ 'version' => '3.0.0-beta.36.3.0',
25
  'filename' => __FILE__,
26
  'path' => dirname(__FILE__),
27
  'autoloader' => dirname(__FILE__) . '/vendor/autoload.php',
readme.txt CHANGED
@@ -3,38 +3,39 @@ Contributors: mailpoet, wysija
3
  Tags: newsletter, email, welcome email, post notification, autoresponder, signup, subscription, SMTP
4
  Requires at least: 4.6
5
  Tested up to: 4.8
6
- Stable tag: 3.0.0-beta.36.2.0
7
  Create and send beautiful emails and newsletters from WordPress.
8
 
9
  == Description ==
10
 
11
- Try the new MailPoet! This is a beta version of our completely new email newsletter plugin. [Or test the demo.](http://demo3.mailpoet.com/launch/)
12
 
13
  = What's new? =
14
 
15
- * New email designer
16
  * Responsive templates
17
- * Send with MailPoet's Sending Service
18
- * Fast user interface
19
- * Easier initial configuration
20
- * Weekly releases since November 2016
 
21
 
22
- = Check out this 2 minute video. =
 
 
23
 
24
- [vimeo https://vimeo.com/183339372]
25
 
26
- = Use at your own risk! =
27
 
28
- Use [the current stable MailPoet](https://wordpress.org/plugins/wysija-newsletters/) instead of this beta version if you are not a power user.
29
-
30
- * Report bugs!
31
- * Not RTL optimized, but it works
32
  * Multisite works but is not officially supported
33
- * Migration script from MailPoet 2.X to this version coming soon.
34
 
35
- = Premium version =
36
 
37
- Not available yet. Limited stats in free version.
38
 
39
  = Translations =
40
 
@@ -46,6 +47,7 @@ Not available yet. Limited stats in free version.
46
  * Portuguese (BR and PT)
47
  * British
48
  * Russian
 
49
  * Persian (IR)
50
 
51
  We welcome translators to translate directly on [our Transifex project](https://www.transifex.com/wysija/mp3/). Please note that any translations submitted via the "Translating WordPress" web site will not work!
@@ -91,6 +93,12 @@ Our [support site](https://beta.docs.mailpoet.com) has plenty of articles. You c
91
 
92
  == Changelog ==
93
 
 
 
 
 
 
 
94
  = 3.0.0-beta.36.2.0 - 2017-07-04 =
95
  * Added: 13 new default templates to choose from;
96
  * Added: a new help page in the menu to help us help you better;
3
  Tags: newsletter, email, welcome email, post notification, autoresponder, signup, subscription, SMTP
4
  Requires at least: 4.6
5
  Tested up to: 4.8
6
+ Stable tag: 3.0.0-beta.36.3.0
7
  Create and send beautiful emails and newsletters from WordPress.
8
 
9
  == Description ==
10
 
11
+ Try the new MailPoet! This is a beta version of our completely new email newsletter plugin.
12
 
13
  = What's new? =
14
 
15
+ * New designer
16
  * Responsive templates
17
+ * Send with MailPoet (optional)
18
+ * Improved user experience
19
+ * Easier configuration
20
+ * Solid reliability
21
+ * Import subscribers, lists, forms and settings from old MailPoet
22
 
23
+ = See it in action. =
24
+ [Test the demo](http://demo3.mailpoet.com/launch/) or [see the 2 min. video](https://vimeo.com/223581490)
25
+ [vimeo https://vimeo.com/223581490]
26
 
27
+ = What is a beta? =
28
 
29
+ We consider this version to be a release candidate. In other words, it's pretty solid. Use [the current stable MailPoet](https://wordpress.org/plugins/wysija-newsletters/) instead of this beta version if you are not comfortable in reporting issues.
30
 
31
+ * Weekly releases with bug fixes and improvements
32
+ * Report bugs directly from the user interface
33
+ * Not optimized for right-to-left (RTL) languages, but it works
 
34
  * Multisite works but is not officially supported
 
35
 
36
+ = Premium version available =
37
 
38
+ [Get in touch](www.mailpoet.com/support/sales-pre-sales-questions/) if you are an existing customer and you want to switch.
39
 
40
  = Translations =
41
 
47
  * Portuguese (BR and PT)
48
  * British
49
  * Russian
50
+ * Japanese
51
  * Persian (IR)
52
 
53
  We welcome translators to translate directly on [our Transifex project](https://www.transifex.com/wysija/mp3/). Please note that any translations submitted via the "Translating WordPress" web site will not work!
93
 
94
  == Changelog ==
95
 
96
+ = 3.0.0-beta.36.3.0 - 2017-07-11 =
97
+ * Added: migration script for MailPoet 2 users now imports settings;
98
+ * Fixed: emails are sorted by date sent instead of modified date; thanks Scott
99
+ * Fixed: cursor doesn't get stuck on "move" icon when editing text;
100
+ * Fixed: repeated subscriptions don't duplicate welcome notifications; thanks Luc
101
+
102
  = 3.0.0-beta.36.2.0 - 2017-07-04 =
103
  * Added: 13 new default templates to choose from;
104
  * Added: a new help page in the menu to help us help you better;
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit427aa6596e1fab12f4c1b25cfbd72e61::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInitb11a845052e8e6ed50a7c81deac5e0dc::getLoader();
vendor/composer/ClassLoader.php CHANGED
@@ -55,6 +55,7 @@ class ClassLoader
55
  private $classMap = array();
56
  private $classMapAuthoritative = false;
57
  private $missingClasses = array();
 
58
 
59
  public function getPrefixes()
60
  {
@@ -271,6 +272,26 @@ class ClassLoader
271
  return $this->classMapAuthoritative;
272
  }
273
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
274
  /**
275
  * Registers this instance as an autoloader.
276
  *
@@ -313,11 +334,6 @@ class ClassLoader
313
  */
314
  public function findFile($class)
315
  {
316
- // work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731
317
- if ('\\' == $class[0]) {
318
- $class = substr($class, 1);
319
- }
320
-
321
  // class map lookup
322
  if (isset($this->classMap[$class])) {
323
  return $this->classMap[$class];
@@ -325,6 +341,12 @@ class ClassLoader
325
  if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
326
  return false;
327
  }
 
 
 
 
 
 
328
 
329
  $file = $this->findFileWithExtension($class, '.php');
330
 
@@ -333,6 +355,10 @@ class ClassLoader
333
  $file = $this->findFileWithExtension($class, '.hh');
334
  }
335
 
 
 
 
 
336
  if (false === $file) {
337
  // Remember that this class does not exist.
338
  $this->missingClasses[$class] = true;
@@ -348,9 +374,13 @@ class ClassLoader
348
 
349
  $first = $class[0];
350
  if (isset($this->prefixLengthsPsr4[$first])) {
351
- foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) {
352
- if (0 === strpos($class, $prefix)) {
353
- foreach ($this->prefixDirsPsr4[$prefix] as $dir) {
 
 
 
 
354
  if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
355
  return $file;
356
  }
55
  private $classMap = array();
56
  private $classMapAuthoritative = false;
57
  private $missingClasses = array();
58
+ private $apcuPrefix;
59
 
60
  public function getPrefixes()
61
  {
272
  return $this->classMapAuthoritative;
273
  }
274
 
275
+ /**
276
+ * APCu prefix to use to cache found/not-found classes, if the extension is enabled.
277
+ *
278
+ * @param string|null $apcuPrefix
279
+ */
280
+ public function setApcuPrefix($apcuPrefix)
281
+ {
282
+ $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
283
+ }
284
+
285
+ /**
286
+ * The APCu prefix in use, or null if APCu caching is not enabled.
287
+ *
288
+ * @return string|null
289
+ */
290
+ public function getApcuPrefix()
291
+ {
292
+ return $this->apcuPrefix;
293
+ }
294
+
295
  /**
296
  * Registers this instance as an autoloader.
297
  *
334
  */
335
  public function findFile($class)
336
  {
 
 
 
 
 
337
  // class map lookup
338
  if (isset($this->classMap[$class])) {
339
  return $this->classMap[$class];
341
  if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
342
  return false;
343
  }
344
+ if (null !== $this->apcuPrefix) {
345
+ $file = apcu_fetch($this->apcuPrefix.$class, $hit);
346
+ if ($hit) {
347
+ return $file;
348
+ }
349
+ }
350
 
351
  $file = $this->findFileWithExtension($class, '.php');
352
 
355
  $file = $this->findFileWithExtension($class, '.hh');
356
  }
357
 
358
+ if (null !== $this->apcuPrefix) {
359
+ apcu_add($this->apcuPrefix.$class, $file);
360
+ }
361
+
362
  if (false === $file) {
363
  // Remember that this class does not exist.
364
  $this->missingClasses[$class] = true;
374
 
375
  $first = $class[0];
376
  if (isset($this->prefixLengthsPsr4[$first])) {
377
+ $subPath = $class;
378
+ while (false !== $lastPos = strrpos($subPath, '\\')) {
379
+ $subPath = substr($subPath, 0, $lastPos);
380
+ $search = $subPath.'\\';
381
+ if (isset($this->prefixDirsPsr4[$search])) {
382
+ foreach ($this->prefixDirsPsr4[$search] as $dir) {
383
+ $length = $this->prefixLengthsPsr4[$first][$search];
384
  if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
385
  return $file;
386
  }
vendor/composer/autoload_classmap.php CHANGED
@@ -150,6 +150,7 @@ return array(
150
  'MailPoet\\Models\\NewsletterPost' => $baseDir . '/lib/Models/NewsletterPost.php',
151
  'MailPoet\\Models\\NewsletterSegment' => $baseDir . '/lib/Models/NewsletterSegment.php',
152
  'MailPoet\\Models\\NewsletterTemplate' => $baseDir . '/lib/Models/NewsletterTemplate.php',
 
153
  'MailPoet\\Models\\Segment' => $baseDir . '/lib/Models/Segment.php',
154
  'MailPoet\\Models\\SendingQueue' => $baseDir . '/lib/Models/SendingQueue.php',
155
  'MailPoet\\Models\\Setting' => $baseDir . '/lib/Models/Setting.php',
150
  'MailPoet\\Models\\NewsletterPost' => $baseDir . '/lib/Models/NewsletterPost.php',
151
  'MailPoet\\Models\\NewsletterSegment' => $baseDir . '/lib/Models/NewsletterSegment.php',
152
  'MailPoet\\Models\\NewsletterTemplate' => $baseDir . '/lib/Models/NewsletterTemplate.php',
153
+ 'MailPoet\\Models\\ScheduledTask' => $baseDir . '/lib/Models/ScheduledTask.php',
154
  'MailPoet\\Models\\Segment' => $baseDir . '/lib/Models/Segment.php',
155
  'MailPoet\\Models\\SendingQueue' => $baseDir . '/lib/Models/SendingQueue.php',
156
  'MailPoet\\Models\\Setting' => $baseDir . '/lib/Models/Setting.php',
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit427aa6596e1fab12f4c1b25cfbd72e61
6
  {
7
  private static $loader;
8
 
@@ -19,15 +19,15 @@ class ComposerAutoloaderInit427aa6596e1fab12f4c1b25cfbd72e61
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInit427aa6596e1fab12f4c1b25cfbd72e61', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInit427aa6596e1fab12f4c1b25cfbd72e61', 'loadClassLoader'));
25
 
26
- $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION');
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
- call_user_func(\Composer\Autoload\ComposerStaticInit427aa6596e1fab12f4c1b25cfbd72e61::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
@@ -48,19 +48,19 @@ class ComposerAutoloaderInit427aa6596e1fab12f4c1b25cfbd72e61
48
  $loader->register(true);
49
 
50
  if ($useStaticLoader) {
51
- $includeFiles = Composer\Autoload\ComposerStaticInit427aa6596e1fab12f4c1b25cfbd72e61::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
- composerRequire427aa6596e1fab12f4c1b25cfbd72e61($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
- function composerRequire427aa6596e1fab12f4c1b25cfbd72e61($fileIdentifier, $file)
64
  {
65
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
66
  require $file;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInitb11a845052e8e6ed50a7c81deac5e0dc
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInitb11a845052e8e6ed50a7c81deac5e0dc', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInitb11a845052e8e6ed50a7c81deac5e0dc', 'loadClassLoader'));
25
 
26
+ $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
+ call_user_func(\Composer\Autoload\ComposerStaticInitb11a845052e8e6ed50a7c81deac5e0dc::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
48
  $loader->register(true);
49
 
50
  if ($useStaticLoader) {
51
+ $includeFiles = Composer\Autoload\ComposerStaticInitb11a845052e8e6ed50a7c81deac5e0dc::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
+ composerRequireb11a845052e8e6ed50a7c81deac5e0dc($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
+ function composerRequireb11a845052e8e6ed50a7c81deac5e0dc($fileIdentifier, $file)
64
  {
65
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
66
  require $file;
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit427aa6596e1fab12f4c1b25cfbd72e61
8
  {
9
  public static $files = array (
10
  '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
@@ -232,6 +232,7 @@ class ComposerStaticInit427aa6596e1fab12f4c1b25cfbd72e61
232
  'MailPoet\\Models\\NewsletterPost' => __DIR__ . '/../..' . '/lib/Models/NewsletterPost.php',
233
  'MailPoet\\Models\\NewsletterSegment' => __DIR__ . '/../..' . '/lib/Models/NewsletterSegment.php',
234
  'MailPoet\\Models\\NewsletterTemplate' => __DIR__ . '/../..' . '/lib/Models/NewsletterTemplate.php',
 
235
  'MailPoet\\Models\\Segment' => __DIR__ . '/../..' . '/lib/Models/Segment.php',
236
  'MailPoet\\Models\\SendingQueue' => __DIR__ . '/../..' . '/lib/Models/SendingQueue.php',
237
  'MailPoet\\Models\\Setting' => __DIR__ . '/../..' . '/lib/Models/Setting.php',
@@ -648,10 +649,10 @@ class ComposerStaticInit427aa6596e1fab12f4c1b25cfbd72e61
648
  public static function getInitializer(ClassLoader $loader)
649
  {
650
  return \Closure::bind(function () use ($loader) {
651
- $loader->prefixLengthsPsr4 = ComposerStaticInit427aa6596e1fab12f4c1b25cfbd72e61::$prefixLengthsPsr4;
652
- $loader->prefixDirsPsr4 = ComposerStaticInit427aa6596e1fab12f4c1b25cfbd72e61::$prefixDirsPsr4;
653
- $loader->prefixesPsr0 = ComposerStaticInit427aa6596e1fab12f4c1b25cfbd72e61::$prefixesPsr0;
654
- $loader->classMap = ComposerStaticInit427aa6596e1fab12f4c1b25cfbd72e61::$classMap;
655
 
656
  }, null, ClassLoader::class);
657
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInitb11a845052e8e6ed50a7c81deac5e0dc
8
  {
9
  public static $files = array (
10
  '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
232
  'MailPoet\\Models\\NewsletterPost' => __DIR__ . '/../..' . '/lib/Models/NewsletterPost.php',
233
  'MailPoet\\Models\\NewsletterSegment' => __DIR__ . '/../..' . '/lib/Models/NewsletterSegment.php',
234
  'MailPoet\\Models\\NewsletterTemplate' => __DIR__ . '/../..' . '/lib/Models/NewsletterTemplate.php',
235
+ 'MailPoet\\Models\\ScheduledTask' => __DIR__ . '/../..' . '/lib/Models/ScheduledTask.php',
236
  'MailPoet\\Models\\Segment' => __DIR__ . '/../..' . '/lib/Models/Segment.php',
237
  'MailPoet\\Models\\SendingQueue' => __DIR__ . '/../..' . '/lib/Models/SendingQueue.php',
238
  'MailPoet\\Models\\Setting' => __DIR__ . '/../..' . '/lib/Models/Setting.php',
649
  public static function getInitializer(ClassLoader $loader)
650
  {
651
  return \Closure::bind(function () use ($loader) {
652
+ $loader->prefixLengthsPsr4 = ComposerStaticInitb11a845052e8e6ed50a7c81deac5e0dc::$prefixLengthsPsr4;
653
+ $loader->prefixDirsPsr4 = ComposerStaticInitb11a845052e8e6ed50a7c81deac5e0dc::$prefixDirsPsr4;
654
+ $loader->prefixesPsr0 = ComposerStaticInitb11a845052e8e6ed50a7c81deac5e0dc::$prefixesPsr0;
655
+ $loader->classMap = ComposerStaticInitb11a845052e8e6ed50a7c81deac5e0dc::$classMap;
656
 
657
  }, null, ClassLoader::class);
658
  }
vendor/composer/installed.json CHANGED
@@ -14,7 +14,7 @@
14
  "reference": "b0c1bda3be5a35da44ba1ac28cc61c67d2ada465",
15
  "shasum": ""
16
  },
17
- "time": "2015-11-28 21:47:43",
18
  "type": "library",
19
  "installation-source": "dist",
20
  "autoload": {
@@ -55,7 +55,7 @@
55
  "require-dev": {
56
  "phpunit/phpunit": "^5.6"
57
  },
58
- "time": "2016-12-14 06:28:26",
59
  "type": "library",
60
  "installation-source": "dist",
61
  "autoload": {
@@ -116,7 +116,7 @@
116
  "j4mie/idiorm": "1.5.*",
117
  "php": ">=5.2.0"
118
  },
119
- "time": "2014-09-23 10:49:36",
120
  "type": "library",
121
  "installation-source": "dist",
122
  "autoload": {
@@ -180,7 +180,7 @@
180
  "require-dev": {
181
  "phpunit/phpunit": "~4.0|~5.0"
182
  },
183
- "time": "2017-01-23 04:29:33",
184
  "type": "library",
185
  "installation-source": "dist",
186
  "autoload": {
@@ -226,7 +226,7 @@
226
  "suggest": {
227
  "ext-mbstring": "For best performance"
228
  },
229
- "time": "2016-11-14 01:06:16",
230
  "type": "library",
231
  "extra": {
232
  "branch-alias": {
@@ -299,7 +299,7 @@
299
  "symfony/config": "",
300
  "symfony/yaml": ""
301
  },
302
- "time": "2017-03-04 12:20:59",
303
  "type": "library",
304
  "extra": {
305
  "branch-alias": {
@@ -355,7 +355,7 @@
355
  "friendsofphp/php-cs-fixer": "~2",
356
  "phpunit/phpunit": "~4.0 || ~5.0"
357
  },
358
- "time": "2017-01-16 07:55:07",
359
  "type": "library",
360
  "extra": {
361
  "branch-alias": {
@@ -408,7 +408,7 @@
408
  "require-dev": {
409
  "phpunit/phpunit": "*"
410
  },
411
- "time": "2016-07-19 19:14:21",
412
  "type": "library",
413
  "installation-source": "dist",
414
  "autoload": {
@@ -457,7 +457,7 @@
457
  "phpunit/phpunit": ">=4.0",
458
  "soundasleep/component-tests": "dev-master"
459
  },
460
- "time": "2016-06-09 04:56:16",
461
  "type": "library",
462
  "installation-source": "dist",
463
  "autoload": {
@@ -510,7 +510,7 @@
510
  "mockery/mockery": "~0.9.1",
511
  "symfony/phpunit-bridge": "~3.2"
512
  },
513
- "time": "2017-02-13 07:52:53",
514
  "type": "library",
515
  "extra": {
516
  "branch-alias": {
@@ -565,7 +565,7 @@
565
  "suggest": {
566
  "ext-xml": "For best performance"
567
  },
568
- "time": "2016-11-14 01:06:16",
569
  "type": "library",
570
  "extra": {
571
  "branch-alias": {
@@ -625,7 +625,7 @@
625
  "require-dev": {
626
  "htmlawed/htmlawed": "dev-master"
627
  },
628
- "time": "2016-01-14 20:55:00",
629
  "type": "library",
630
  "installation-source": "dist",
631
  "autoload": {
@@ -681,7 +681,7 @@
681
  "symfony/debug": "~2.7",
682
  "symfony/phpunit-bridge": "~3.2"
683
  },
684
- "time": "2017-02-27 00:07:03",
685
  "type": "library",
686
  "extra": {
687
  "branch-alias": {
14
  "reference": "b0c1bda3be5a35da44ba1ac28cc61c67d2ada465",
15
  "shasum": ""
16
  },
17
+ "time": "2015-11-28T21:47:43+00:00",
18
  "type": "library",
19
  "installation-source": "dist",
20
  "autoload": {
55
  "require-dev": {
56
  "phpunit/phpunit": "^5.6"
57
  },
58
+ "time": "2016-12-14T06:28:26+00:00",
59
  "type": "library",
60
  "installation-source": "dist",
61
  "autoload": {
116
  "j4mie/idiorm": "1.5.*",
117
  "php": ">=5.2.0"
118
  },
119
+ "time": "2014-09-23T10:49:36+00:00",
120
  "type": "library",
121
  "installation-source": "dist",
122
  "autoload": {
180
  "require-dev": {
181
  "phpunit/phpunit": "~4.0|~5.0"
182
  },
183
+ "time": "2017-01-23T04:29:33+00:00",
184
  "type": "library",
185
  "installation-source": "dist",
186
  "autoload": {
226
  "suggest": {
227
  "ext-mbstring": "For best performance"
228
  },
229
+ "time": "2016-11-14T01:06:16+00:00",
230
  "type": "library",
231
  "extra": {
232
  "branch-alias": {
299
  "symfony/config": "",
300
  "symfony/yaml": ""
301
  },
302
+ "time": "2017-03-04T12:20:59+00:00",
303
  "type": "library",
304
  "extra": {
305
  "branch-alias": {
355
  "friendsofphp/php-cs-fixer": "~2",
356
  "phpunit/phpunit": "~4.0 || ~5.0"
357
  },
358
+ "time": "2017-01-16T07:55:07+00:00",
359
  "type": "library",
360
  "extra": {
361
  "branch-alias": {
408
  "require-dev": {
409
  "phpunit/phpunit": "*"
410
  },
411
+ "time": "2016-07-19T19:14:21+00:00",
412
  "type": "library",
413
  "installation-source": "dist",
414
  "autoload": {
457
  "phpunit/phpunit": ">=4.0",
458
  "soundasleep/component-tests": "dev-master"
459
  },
460
+ "time": "2016-06-09T04:56:16+00:00",
461
  "type": "library",
462
  "installation-source": "dist",
463
  "autoload": {
510
  "mockery/mockery": "~0.9.1",
511
  "symfony/phpunit-bridge": "~3.2"
512
  },
513
+ "time": "2017-02-13T07:52:53+00:00",
514
  "type": "library",
515
  "extra": {
516
  "branch-alias": {
565
  "suggest": {
566
  "ext-xml": "For best performance"
567
  },
568
+ "time": "2016-11-14T01:06:16+00:00",
569
  "type": "library",
570
  "extra": {
571
  "branch-alias": {
625
  "require-dev": {
626
  "htmlawed/htmlawed": "dev-master"
627
  },
628
+ "time": "2016-01-14T20:55:00+00:00",
629
  "type": "library",
630
  "installation-source": "dist",
631
  "autoload": {
681
  "symfony/debug": "~2.7",
682
  "symfony/phpunit-bridge": "~3.2"
683
  },
684
+ "time": "2017-02-27T00:07:03+00:00",
685
  "type": "library",
686
  "extra": {
687
  "branch-alias": {
views/form/editor.html CHANGED
@@ -128,32 +128,26 @@
128
  <div>
129
  <!-- Form export links -->
130
  <p>
131
- <%= __("Add this form to your sidebar or footer on the [link]Widgets page[/link].")
132
- | replace({
133
- '[link]': '<a href="widgets.php" target="_blank">',
134
- '[/link]': '</a>'
135
- })
136
- | raw
137
  %>
138
  </p>
139
  <p>
140
- <%= __("Copy and paste this [link]shortcode[/link] on to a post or page.")
141
- | replace({
142
- '[link]': '<a href="javascript:;" class="mailpoet_form_export_toggle" data-type="shortcode">',
143
- '[/link]': '</a>'
144
- })
145
- | raw
146
  %>
147
  </p>
148
  <p>
149
  <%= __('%sPHP%s and %siFrame%s versions are also available.')
150
- | format(
151
  '<a href="javascript:;" class="mailpoet_form_export_toggle" data-type="php">',
152
  '</a>',
153
  '<a href="javascript:;" class="mailpoet_form_export_toggle" data-type="iframe">',
154
  '</a>'
155
  )
156
- | raw
157
  %>
158
  </p>
159
 
128
  <div>
129
  <!-- Form export links -->
130
  <p>
131
+ <%= __('Add this form to your sidebar or footer on the [link]Widgets page[/link].')
132
+ |replaceLinkTags('widgets.php', {'target' : '_blank'})
133
+ |raw
 
 
 
134
  %>
135
  </p>
136
  <p>
137
+ <%= __('Copy and paste this [link]shortcode[/link] on to a post or page.')
138
+ |replaceLinkTags('javascript:;', {'class' : 'mailpoet_form_export_toggle', 'data-type' : 'shortcode'})
139
+ |raw
 
 
 
140
  %>
141
  </p>
142
  <p>
143
  <%= __('%sPHP%s and %siFrame%s versions are also available.')
144
+ |format(
145
  '<a href="javascript:;" class="mailpoet_form_export_toggle" data-type="php">',
146
  '</a>',
147
  '<a href="javascript:;" class="mailpoet_form_export_toggle" data-type="iframe">',
148
  '</a>'
149
  )
150
+ |raw
151
  %>
152
  </p>
153
 
views/forms.html CHANGED
@@ -6,7 +6,7 @@
6
  <div>
7
  <p class="mailpoet_sending_methods_help help">
8
  <%= __('<strong>Tip:</strong> we have a [link]list of plugins[/link] that work with MailPoet if you need fancier forms.')
9
- |replaceLink('http://beta.docs.mailpoet.com/article/198-list-of-forms-plugins-that-work-with-mailpoet?utm_source=plugin&utm_medium=settings&utm_campaign=helpdocs', {'target' : '_blank'})
10
  |raw
11
  %>
12
  </p>
6
  <div>
7
  <p class="mailpoet_sending_methods_help help">
8
  <%= __('<strong>Tip:</strong> we have a [link]list of plugins[/link] that work with MailPoet if you need fancier forms.')
9
+ |replaceLinkTags('http://beta.docs.mailpoet.com/article/198-list-of-forms-plugins-that-work-with-mailpoet?utm_source=plugin&utm_medium=settings&utm_campaign=helpdocs', {'target' : '_blank'})
10
  |raw
11
  %>
12
  </p>
views/mp2migration.html CHANGED
@@ -8,13 +8,14 @@
8
  <p class="about-text"><strong><%= __('This new version is quite an upgrade.') %></strong> <%= __('Since this new version is completely new, we first need to update your database before we begin.') %></p>
9
 
10
  <h3><%= __('What will be kept in MailPoet 3') %></h3>
 
11
  <ul>
12
- <li><strong><%= __('Subscribers and lists') %> <img draggable="false" class="emoji" alt="✔" src="https://s.w.org/images/core/emoji/2.2.1/svg/2714.svg"></strong></li>
13
- <li><strong><%= __('Forms') %> <img draggable="false" class="emoji" alt="✔" src="https://s.w.org/images/core/emoji/2.2.1/svg/2714.svg"></strong></li>
14
- <li><%= __('Settings') %> (<%= __('soon') %>!)</li>
15
- <li><%= __('Archive of sent newsletters') %> (<%= __('soon') %>!)</li>
 
16
  </ul>
17
-
18
  <div style="position: absolute; top: .2em; right: 0;"></div>
19
  <hr />
20
 
@@ -28,18 +29,21 @@
28
  <br />
29
  </div>
30
 
31
- <div id="progressbar" class="mailpoet_progress mailpoet_progress_complete">
32
  <span id="progresslabel" class="mailpoet_progress_label">0%</span>
33
  </div>
34
 
35
  <div id="upgrade-completed" style="display: none">
36
  <h3><%= __('Upgrade completed!') %></h3>
 
37
  <input type="button" name="goto-welcome" id="goto-welcome" class="button button-primary" value="<%= __('Go to MailPoet') %>" />
38
  </div>
39
 
40
  <br />
41
- <small><strong><%= __('Log...') %></strong></small>
42
- <div id="logger"></div>
 
 
43
 
44
  </div>
45
 
8
  <p class="about-text"><strong><%= __('This new version is quite an upgrade.') %></strong> <%= __('Since this new version is completely new, we first need to update your database before we begin.') %></p>
9
 
10
  <h3><%= __('What will be kept in MailPoet 3') %></h3>
11
+ <p><%= __('All the data from your previous MailPoet will be preserved and left intact, rest assured. Get in touch with us if you have issues with the upgrade process by using the form %s at the bottom right of all your MailPoet pages.') | format('<img width="30" style="margin:0" src="' ~ image_url('welcome_template/beacon.png') ~ '" alt="Beacon" />') | raw %></p>
12
  <ul>
13
+ <li><strong>Subscribers and lists <img draggable="false" class="emoji" alt="✔" src="https://s.w.org/images/core/emoji/2.2.1/svg/2714.svg"></strong></li>
14
+ <li><strong>Forms <img draggable="false" class="emoji" alt="✔" src="https://s.w.org/images/core/emoji/2.2.1/svg/2714.svg"></strong></li>
15
+ <li><strong>Settings <img draggable="false" class="emoji" alt="✔" src="https://s.w.org/images/core/emoji/2.2.1/svg/2714.svg"></strong></li>
16
+ <li>Archive of sent newsletters (will not be migrated)</li>
17
+ <li>Statistics (will not be migrated)</li>
18
  </ul>
 
19
  <div style="position: absolute; top: .2em; right: 0;"></div>
20
  <hr />
21
 
29
  <br />
30
  </div>
31
 
32
+ <div id="progressbar" class="mailpoet_progress mailpoet_progress_complete" style="display: none">
33
  <span id="progresslabel" class="mailpoet_progress_label">0%</span>
34
  </div>
35
 
36
  <div id="upgrade-completed" style="display: none">
37
  <h3><%= __('Upgrade completed!') %></h3>
38
+ <p><%= __('Review our <a href="%s" %s>simple checklist</a> to ensure your transition to MailPoet 3 is smooth.') | format('http://beta.docs.mailpoet.com/article/199-checklist-for-those-migrating-from-mailpoet-version-2?utm_source=plugin&utm_medium=migration&utm_campaign=migrationchecklist', 'target="_blank"') | raw %></p>
39
  <input type="button" name="goto-welcome" id="goto-welcome" class="button button-primary" value="<%= __('Go to MailPoet') %>" />
40
  </div>
41
 
42
  <br />
43
+ <div id="logger-container" style="display: none">
44
+ <small><strong><%= __('Log...') %></strong></small>
45
+ <div id="logger"></div>
46
+ </div>
47
 
48
  </div>
49
 
views/newsletters.html CHANGED
@@ -67,6 +67,7 @@
67
  'viewHistory': __('View history'),
68
  'createdOn': __('Created on'),
69
  'lastModifiedOn': __('Last modified on'),
 
70
  'oneNewsletterTrashed': __('1 email was moved to the trash.'),
71
  'multipleNewslettersTrashed': __('%$1d emails were moved to the trash.'),
72
  'oneNewsletterDeleted': __('1 email was permanently deleted.'),
@@ -247,7 +248,6 @@
247
  'sendingToSegmentsNotSpecified': __('You need to select a list to send to.'),
248
 
249
  'backToPostNotifications': __('Back to Post notifications'),
250
- 'sentOn': __('Sent on'),
251
  'noSubscribers': __('No subscribers!'),
252
 
253
  'mailerSendErrorNotice': __('Sending is paused because %$1s prevents MailPoet from delivering emails with the following error: %$2s'),
67
  'viewHistory': __('View history'),
68
  'createdOn': __('Created on'),
69
  'lastModifiedOn': __('Last modified on'),
70
+ 'sentOn': __('Sent on'),
71
  'oneNewsletterTrashed': __('1 email was moved to the trash.'),
72
  'multipleNewslettersTrashed': __('%$1d emails were moved to the trash.'),
73
  'oneNewsletterDeleted': __('1 email was permanently deleted.'),
248
  'sendingToSegmentsNotSpecified': __('You need to select a list to send to.'),
249
 
250
  'backToPostNotifications': __('Back to Post notifications'),
 
251
  'noSubscribers': __('No subscribers!'),
252
 
253
  'mailerSendErrorNotice': __('Sending is paused because %$1s prevents MailPoet from delivering emails with the following error: %$2s'),
views/premium.html CHANGED
@@ -88,7 +88,7 @@
88
  </tbody>
89
  </table>
90
  <p><%= __("Spammers are ineligible to use the MailPoet Sending Service. We reserve the right to cancel any sending plan if we detect more than 5% hard bounces. [link]Customers are required to clean their lists before joining MailPoet[/link].")
91
- |replaceLink('http://beta.docs.mailpoet.com/article/127-checklist-before-importing-subscribers?utm_source=plugin&utm_medium=premium&utm_campaign=clean-lists', {'target' : '_blank'})
92
  |raw
93
  %></p>
94
  </div>
@@ -134,11 +134,11 @@
134
  <br>
135
  <div style="width: 65%; margin: 0 auto;">
136
  <p style="text-align: center"><%= __("Already a Premium customer? [link]Add your Key in the Settings page[/link].")
137
- |replaceLink(admin_url('admin.php?page=mailpoet-settings#premium'), {'target' : '_blank'})
138
  |raw
139
  %></p>
140
  <p style="text-align: center"><%= __("Don't need to use our sending service? Not a problem; we understand. You can also [link]buy the Premium[/link] features separately. Prices start at $100 per year for 1 website, $249 for 4 sites and $499 for an unlimited number of sites.")
141
- |replaceLink('https://account.mailpoet.com/premium?utm_source=plugin&utm_medium=premium&utm_campaign=buy-premium', {'target' : '_blank'})
142
  |raw
143
  %></p>
144
  </div>
88
  </tbody>
89
  </table>
90
  <p><%= __("Spammers are ineligible to use the MailPoet Sending Service. We reserve the right to cancel any sending plan if we detect more than 5% hard bounces. [link]Customers are required to clean their lists before joining MailPoet[/link].")
91
+ |replaceLinkTags('http://beta.docs.mailpoet.com/article/127-checklist-before-importing-subscribers?utm_source=plugin&utm_medium=premium&utm_campaign=clean-lists', {'target' : '_blank'})
92
  |raw
93
  %></p>
94
  </div>
134
  <br>
135
  <div style="width: 65%; margin: 0 auto;">
136
  <p style="text-align: center"><%= __("Already a Premium customer? [link]Add your Key in the Settings page[/link].")
137
+ |replaceLinkTags(admin_url('admin.php?page=mailpoet-settings#premium'), {'target' : '_blank'})
138
  |raw
139
  %></p>
140
  <p style="text-align: center"><%= __("Don't need to use our sending service? Not a problem; we understand. You can also [link]buy the Premium[/link] features separately. Prices start at $100 per year for 1 website, $249 for 4 sites and $499 for an unlimited number of sites.")
141
+ |replaceLinkTags('https://account.mailpoet.com/premium?utm_source=plugin&utm_medium=premium&utm_campaign=buy-premium', {'target' : '_blank'})
142
  |raw
143
  %></p>
144
  </div>
views/settings/advanced.html CHANGED
@@ -60,7 +60,7 @@
60
  checked="checked"
61
  <% endif %>
62
  /><%= __("MailPoet's own script. Doesn't work with [link]these hosts[/link].")
63
- |replaceLink('http://docs.mailpoet.com/article/131-hosts-which-mailpoet-task-scheduler-wont-work', {'target' : '_blank'})
64
  |raw
65
  %>
66
  </label>
60
  checked="checked"
61
  <% endif %>
62
  /><%= __("MailPoet's own script. Doesn't work with [link]these hosts[/link].")
63
+ |replaceLinkTags('http://docs.mailpoet.com/article/131-hosts-which-mailpoet-task-scheduler-wont-work', {'target' : '_blank'})
64
  |raw
65
  %>
66
  </label>
views/settings/mta.html CHANGED
@@ -1,4 +1,4 @@
1
- <% set intervals = [1, 2, 5, 10, 15] %>
2
  <% set default_frequency = {
3
  'website': {
4
  'emails': 25,
@@ -17,6 +17,12 @@
17
  name="mta_group"
18
  value="<%= settings.mta_group %>"
19
  />
 
 
 
 
 
 
20
  <!-- mta: method -->
21
  <input
22
  type="hidden"
@@ -92,495 +98,522 @@
92
 
93
  <div class="mailpoet_actions">
94
  <button
 
95
  class="mailpoet_sending_service_activate button-secondary"
96
  <% if(settings.mta_group == 'mailpoet' or not(mss_key_valid)) %> disabled="disabled"<% endif %>
97
  ><%= __('Activate') %></button>
98
  </div>
99
  </li>
100
  <li
101
- data-group="website"
102
- <% if(settings.mta_group == 'website') %>class="mailpoet_active"<% endif %>
103
- >
104
- <h3><%= __('Your web host / web server') %></h3>
105
-
106
- <p class="mailpoet_description">
107
- <strong><%= __('Free, but not recommended') %></strong>
108
- <br />
109
- <%= __('Web hosts generally have a bad reputation as a sender. Your newsletter will probably be considered spam.') %>
110
- </p>
111
-
112
- <div class="mailpoet_status">
113
- <span><%= __('Activated') %></span>
114
- </div>
115
-
116
- <div class="mailpoet_actions">
117
- <a
118
- class="button-secondary"
119
- href="#mta/website"><%= __('Configure') %></a>
120
- </div>
121
- </li>
122
- <li
123
- data-group="smtp"
124
- <% if(settings.mta_group == 'smtp') %>class="mailpoet_active"<% endif %>
125
  >
126
- <h3><%= __('Third-party') %></h3>
127
-
128
- <p class="mailpoet_description">
129
- <strong><%= __('For SMTP, SendGrid or Amazon SES') %></strong>
130
- <br />
131
- <%= __('We only recommend using a third-party service if you are a technical user.') %>
132
- </p>
133
-
134
- <div class="mailpoet_status">
135
- <span><%= __('Activated') %></span>
136
- </div>
137
 
138
- <div class="mailpoet_actions">
139
- <a
140
- class="button-secondary"
141
- href="#mta/smtp"><%= __('Configure') %></a>
142
- </div>
143
  </li>
144
  </ul>
145
 
146
  <p class="mailpoet_sending_methods_help help">
147
  <%= __("Need help to pick? [link]Check out the comparison table of sending methods[/link].")
148
- |replaceLink('http://beta.docs.mailpoet.com/article/181-comparison-table-of-sending-methods', {'target' : '_blank'})
149
  |raw
150
  %>
151
  </p>
152
 
153
  <div id="mailpoet_sending_method_setup">
154
- <!-- Sending Method: Website -->
155
- <div
156
- class="mailpoet_sending_method"
157
- data-group="website"
158
- style="display:none;"
159
- >
160
- <table class="form-table">
161
- <tbody>
162
- <th scope="row">
163
- <label for="mailpoet_web_host">
164
- <%= __('Sending frequency') %>
165
- </label>
166
- </th>
167
- <td>
168
- <p>
169
- <!-- sending frequency -->
170
- <select
171
- id="mailpoet_web_host"
172
- name="web_host"
173
- >
174
- <option value="auto">
175
- <%= __('Safe default values') %>
176
- </option>
177
- <option
178
- value="manual"
179
- <% if(settings.web_host == 'manual') %>
180
- selected="selected"
181
- <% endif %>
182
- >
183
- <%= __("I'll set my own frequency") %>
184
- </option>
185
 
186
- <!-- web hosts -->
187
- <optgroup
188
- label="<%= __("Input your host's recommended sending frequency") %>"
189
- >
190
- <% for host_key, host in hosts.web %>
191
- <option
192
- value="<%= host_key %>"
193
- data-emails="<%= host.emails %>"
194
- data-interval="<%= host.interval %>"
195
- <% if(settings.web_host == host_key) %>
196
- selected="selected"
197
- <% endif %>
198
- ><%= host.name %></option>
199
- <% endfor %>
200
- </optgroup>
201
- </select>
202
- &nbsp;
203
- <!-- website: sending frequency -->
204
- <span id="mailpoet_website_sending_frequency"></span>
205
- </p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
206
 
207
- <!-- website: manual sending frequency -->
208
- <div id="mailpoet_sending_frequency_manual" style="display:none;">
209
- <p>
210
- <input
211
- id="website_frequency_emails"
212
- type="number"
213
- min="1"
214
- max="1000"
215
- <% if(settings.mta_group == 'website') %>
216
- value="<%= settings.mta.frequency.emails %>"
217
- <% else %>
218
- value="<%= default_frequency.website.emails %>"
219
- <% endif %>
220
- />
221
- <%= __('emails') %>
222
- <select id="website_frequency_interval">
223
- <% for interval in intervals %>
224
- <option
225
- value="<%= interval %>"
226
- <%
227
- if not(settings.mta.frequency.interval)
228
- and (interval == default_frequency.website.interval)
229
- %>
230
- selected="selected"
231
- <% endif %>
232
- <% if(settings.mta.frequency.interval == interval) %>
233
- selected="selected"
234
- <% endif %>
235
- >
236
- <%= sending_frequency(interval) %>
237
- <% if(interval == default_frequency.website.interval) %>
238
- (<%= __('recommended') %>)
239
- <% endif %>
240
- </option>
241
- <% endfor %>
242
- </select>
243
- <span id="mailpoet_website_daily_emails"></span>
244
- </p>
245
- <br />
246
- <p>
247
- <%= __('<strong>Warning!</strong> Sending more than the recommended amount of emails? You may break the terms of your web host or provider!') %>'
248
- <br />
249
- <%= __('Please ask your host for the maximum number of emails you are allowed to send per day.') %>
250
- </p>
251
- </div>
252
- </td>
253
- </tr>
254
- </tbody>
255
- </table>
256
- </div>
257
 
258
- <!-- Sending Method: SMTP -->
259
- <div class="mailpoet_sending_method" data-group="smtp" style="display:none;">
260
- <table class="form-table">
261
- <tbody>
262
- <tr>
263
- <th scope="row">
264
- <label for="mailpoet_smtp_provider">
265
- <%= __('Provider') %>
266
- </label>
267
- </th>
268
- <td>
269
- <!-- smtp provider -->
270
  <select
271
- id="mailpoet_smtp_provider"
272
- name="smtp_provider"
273
  >
274
- <option data-interval="5" data-emails="100" value="manual">
275
- <%= __('Custom SMTP') %>
 
 
 
 
 
 
 
 
 
276
  </option>
277
- <!-- providers -->
278
- <optgroup label="<%= __('Select your provider') %>">
279
- <% for host_key, host in hosts.smtp %>
280
- <option
281
- value="<%= host_key %>"
282
- data-emails="<%= host.emails %>"
283
- data-interval="<%= host.interval %>"
284
- data-fields="<%= host.fields | join(',') %>"
285
- <% if(settings.smtp_provider == host_key) %>
286
- selected="selected"
287
- <% endif %>
288
- ><%= host.name %></option>
289
- <% endfor %>
290
- </optgroup>
291
  </select>
292
- </td>
293
- </tr>
294
- <tr>
295
- <th scope="row">
296
- <label for="mailpoet_smtp_provider">
297
- <%= __('Sending frequency') %>
298
- </label>
299
- </th>
300
- <td>
301
- <!-- smtp: sending frequency -->
302
  <p>
303
  <input
304
- id="smtp_frequency_emails"
305
  type="number"
306
  min="1"
307
  max="1000"
308
- <% if(settings.mta_group == 'smtp') %>
309
- value="<%= settings.mta.frequency.emails %>"
310
- <% else %>
311
- value="<%= default_frequency.smtp.emails %>"
312
- <% endif %>
313
  />
314
  <%= __('emails') %>
315
- <select id="smtp_frequency_interval">
316
  <% for interval in intervals %>
317
- <option
318
- value="<%= interval %>"
319
- <%
320
- if not(settings.mta.frequency.interval)
321
- and (interval == default_frequency.smtp.interval)
322
- %>
323
- selected="selected"
324
- <% endif %>
325
- <% if(settings.mta.frequency.interval == interval) %>
326
- selected="selected"
327
- <% endif %>
328
- >
329
- <%= sending_frequency(interval) %>
330
- <% if(interval == default_frequency.smtp.interval) %>
331
- (<%= __('recommended') %>)
332
- <% endif %>
333
- </option>
334
  <% endfor %>
335
  </select>
336
- <span id="mailpoet_smtp_daily_emails"></span>
337
  </p>
338
- </td>
339
- </tr>
340
- <!-- smtp: host -->
341
- <tr class="mailpoet_smtp_field" data-field="host">
342
- <th scope="row">
343
- <label for="settings[mta_host]">
344
- <%= __('SMTP Hostname') %>
345
- </label>
346
- <p class="description">
347
- <%= __('e.g.: smtp.mydomain.com') %>
348
  </p>
349
- </th>
350
- <td>
351
- <input
352
- type="text"
353
- class="regular-text"
354
- id="settings[mta_host]"
355
- name="mta[host]"
356
- value="<%= settings.mta.host %>" />
357
- </td>
358
- </tr>
359
- <!-- smtp: port -->
360
- <tr class="mailpoet_smtp_field" data-field="port">
361
- <th scope="row">
362
- <label for="settings[mta_port]">
363
- <%= __('SMTP Port') %>
364
- </label>
365
- </th>
366
- <td>
367
- <input
368
- type="number"
369
- max="65535"
370
- min="1"
371
- maxlength="5"
372
- style="width:5em;"
373
- id="settings[mta_port]"
374
- name="mta[port]"
375
- value="<%= settings.mta.port %>"
376
- />
377
- </td>
378
- </tr>
379
-
380
- <!-- smtp: amazon region -->
381
- <tr class="mailpoet_smtp_field" data-field="region">
382
- <th scope="row">
383
- <label for="settings[mta_region]">
384
- <%= __('Region') %>
385
- </label>
386
- </th>
387
- <td>
388
- <select
389
- id="settings[mta_region]"
390
- name="mta[region]"
391
- value="<% if(settings.mta_group == 'smtp') %>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
392
  <%=- settings.mta.region -%>
393
  <% endif %>"
 
 
 
 
 
 
 
394
  >
395
- <% for region, server in hosts.smtp.AmazonSES.regions %>
396
- <option
397
- value="<%= server %>"
398
- <% if(settings.mta.region == server) %>
399
- selected="selected"
400
- <% endif %>
401
- >
402
- <%= region %>
403
- </option>
404
- <% endfor %>
405
- </select>
406
- </td>
407
- </tr>
408
-
409
- <!-- smtp: amazon access_key -->
410
- <tr class="mailpoet_smtp_field" data-field="access_key">
411
- <th scope="row">
412
- <label for="settings[mta_access_key]">
413
- <%= __('Access Key') %>
414
- </label>
415
- </th>
416
- <td>
417
- <input
418
- type="text"
419
- class="regular-text"
420
- id="settings[mta_access_key]"
421
 
422
- name="mta[access_key]"
423
- value="<% if(settings.mta_group == 'smtp') %>
424
  <%=- settings.mta.access_key -%>
425
  <% endif %>"
426
- />
427
- </td>
428
- </tr>
429
-
430
- <!-- smtp: amazon secret_key -->
431
- <tr class="mailpoet_smtp_field" data-field="secret_key">
432
- <th scope="row">
433
- <label for="settings[mta_secret_key]">
434
- <%= __('Secret Key') %>
435
- </label>
436
- </th>
437
- <td>
438
- <input
439
- type="text"
440
- class="regular-text"
441
- id="settings[mta_secret_key]"
442
 
443
- name="mta[secret_key]"
444
- value="<% if(settings.mta_group == 'smtp') %>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
445
  <%=- settings.mta.secret_key -%>
446
  <% endif %>"
447
- />
448
- </td>
449
- </tr>
450
-
451
- <!-- smtp: domain -->
452
- <tr class="mailpoet_smtp_field" data-field="domain">
453
- <th scope="row">
454
- <label for="settings[mta_domain]">
455
- <%= __('Domain') %>
456
- </label>
457
- <p class="description">
458
- <%= __('e.g.: smtp.mydomain.com') %>
459
- </p>
460
- </th>
461
- <td>
462
- <input
463
- type="text"
464
- class="regular-text"
465
- id="settings[mta_domain]"
466
- name="mta[domain]"
467
- value="<%= settings.mta.domain %>" />
468
- </td>
469
- </tr>
470
-
471
- <!-- smtp: api key -->
472
- <tr class="mailpoet_smtp_field" data-field="api_key">
473
- <th scope="row">
474
- <label for="settings[mta_api_key]">
475
- <%= __('API Key') %>
476
- </label>
477
- </th>
478
- <td>
479
- <input
480
- type="text"
481
- class="regular-text"
482
- id="settings[mta_api_key]"
483
- name="mta[api_key]"
484
- value="<%=- settings.mta.api_key -%>"
485
- />
486
- </td>
487
- </tr>
488
-
489
- <!-- smtp: login -->
490
- <tr id="mta_login" class="mailpoet_smtp_field" data-field="login">
491
- <th scope="row">
492
- <label for="settings[mta_login]">
493
- <%= __('Login') %>
494
- </label>
495
- </th>
496
- <td>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
497
  <input
498
- type="text"
499
- class="regular-text"
500
- id="settings[mta_login]"
501
- name="mta[login]"
502
- value="<%= settings.mta.login %>"
503
- />
504
- </td>
505
- </tr>
506
- <!-- smtp: password -->
507
- <tr id="mta_password" class="mailpoet_smtp_field" data-field="password">
508
- <th scope="row">
509
- <label for="settings[mta_password]">
510
- <%= __('Password') %>
511
- </label>
512
- </th>
513
- <td>
514
  <input
515
- type="password"
516
- class="regular-text"
517
- id="settings[mta_password]"
518
- name="mta[password]"
519
- value="<%= settings.mta.password %>"
520
- />
521
- </td>
522
- </tr>
523
- <!-- smtp: security protocol -->
524
- <tr class="mailpoet_smtp_field" data-field="encryption">
525
- <th scope="row">
526
- <label for="settings[mta_encryption]">
527
- <%= __('Secure Connection') %>
528
- </label>
529
- </th>
530
- <td>
531
- <select id="settings[mta_encryption]" name="mta[encryption]">
532
- <option value=""><%= __('No') %></option>
533
- <option
534
- value="ssl"
535
- <% if(settings.mta.encryption == 'ssl') %>
536
- selected="selected"
537
- <% endif %>
538
- >SSL</option>
539
- <option
540
- value="tls"
541
- <% if(settings.mta.encryption == 'tls') %>
542
- selected="selected"
543
- <% endif %>
544
- >TLS</option>
545
- </select>
546
- </td>
547
- </tr>
548
- <!-- smtp: authentication -->
549
- <tr class="mailpoet_smtp_field" data-field="authentication">
550
- <th scope="row">
551
- <label>
552
- <%= __('Authentication') %>
553
- </label>
554
- <p class="description">
555
- <%= __('Leave this option set to Yes. Only a tiny portion of SMTP services prefer Authentication to be turned off.') %>
556
- </p>
557
- </th>
558
- <td>
559
- <label>
560
- <input
561
- type="radio"
562
- value="1"
563
- name="mta[authentication]"
564
- <%
565
- if not(settings.mta.authentication)
566
- or (settings.mta.authentication == "1") %>
567
- checked="checked"
568
- <% endif %>
569
- /><%= __('Yes') %>
570
- </label>
571
- &nbsp;
572
- <label>
573
- <input
574
- type="radio"
575
- value="-1"
576
- name="mta[authentication]"
577
- <% if(settings.mta.authentication == "-1") %>
578
- checked="checked"
579
- <% endif %>
580
- /><%= __('No') %>
581
- </label>
582
- </td>
583
- </tr>
584
  </tbody>
585
  </table>
586
  </div>
@@ -665,18 +698,12 @@
665
 
666
  // testing sending method
667
  $('#mailpoet_mta_test').on('click', function() {
668
- // get form data
669
- var data = $('#mailpoet_settings_form').serializeObject();
670
  // get test email and include it in data
671
  var recipient = $('#mailpoet_mta_test_email').val();
672
 
673
  var settings = jQuery('#mailpoet_settings_form').serializeObject();
674
  var mailer = settings.mta;
675
- mailer.method = getMethodFromGroup(
676
- ($('.mailpoet_sending_method:visible').data('group') !== undefined)
677
- ? $('.mailpoet_sending_method:visible').data('group')
678
- : $('#mta_group').val()
679
- );
680
 
681
  // check that we have a from address
682
  if(settings.sender.address.length === 0) {
@@ -721,27 +748,19 @@
721
  });
722
 
723
  // sending frequency update based on selected provider
724
- $('#mailpoet_smtp_provider').on('change keyup', setProviderForm);
725
  $('#mailpoet_web_host').on('change keyup', renderHostSendingFrequency);
726
 
727
  // update manual sending frequency when values are changed
728
- $('#website_frequency_emails').on('change keyup', function() {
729
- updateSendingFrequency('website');
730
- });
731
- $('#website_frequency_interval').on('change keyup', function() {
732
- updateSendingFrequency('website');
733
- });
734
-
735
- $('#smtp_frequency_emails').on('change keyup', function() {
736
- updateSendingFrequency('smtp');
737
  });
738
- $('#smtp_frequency_interval').on('change keyup', function() {
739
- updateSendingFrequency('smtp');
740
  });
741
 
742
  // save configuration of a sending method
743
- $('.mailpoet_sending_service_activate').on('click', function(e) {
744
- e.preventDefault();
745
  saveSendingMethodConfiguration('mailpoet');
746
  });
747
  $('.mailpoet_mta_setup_save').on('click', function() {
@@ -749,10 +768,12 @@
749
  var group = $('.mailpoet_sending_method:visible').data('group');
750
  saveSendingMethodConfiguration(group);
751
  });
 
 
 
 
752
 
753
  function saveSendingMethodConfiguration(group) {
754
- var emails = $('#'+group+'_frequency_emails').val(),
755
- interval = $('#'+group+'_frequency_interval').val();
756
 
757
  // set sending method
758
  if(group === undefined) {
@@ -763,10 +784,6 @@
763
  // set new sending method active
764
  setSendingMethodGroup(group);
765
 
766
- // update sending frequency values
767
- $('#mta_frequency_emails').val(emails);
768
- $('#mta_frequency_interval').val(interval);
769
-
770
  // enforce signup confirmation depending on selected group
771
  setSignupConfirmation(group);
772
 
@@ -810,10 +827,7 @@
810
  $('.mailpoet_sending_methods li[data-group="'+group+'"]')
811
  .addClass('mailpoet_active');
812
 
813
- // set smtp method value
814
- $('#mta_group').val(group);
815
-
816
- var method = getMethodFromGroup(group);
817
 
818
  $('#mta_method').val(method);
819
 
@@ -889,15 +903,90 @@
889
 
890
  function renderSMTPSendingFrequency() {
891
  // set sending frequency
 
 
892
  setSendingFrequency({
893
  output: '#mailpoet_smtp_daily_emails',
894
  only_daily: true,
895
- emails: $('#smtp_frequency_emails').val(),
896
- interval: $('#smtp_frequency_interval').val()
897
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
898
  }
899
 
900
  function renderHostSendingFrequency() {
 
901
  var host = $(this).find('option:selected').first();
902
  var emails =
903
  host.data('emails') || <%= default_frequency.website.emails %>;
@@ -907,11 +996,6 @@
907
  host.data('fields') || '';
908
 
909
  if(host.val() === 'manual' ) {
910
- // hide sending frequency
911
- $('#mailpoet_website_sending_frequency').hide();
912
- // show manual sending frequency form
913
- $('#mailpoet_sending_frequency_manual').slideDown(200);
914
-
915
  // set sending frequency
916
  setSendingFrequency({
917
  output: '#mailpoet_website_daily_emails',
@@ -920,12 +1004,9 @@
920
  interval: $('#website_frequency_interval').val()
921
  });
922
  } else {
923
- $('#mailpoet_sending_frequency_manual').slideUp(200, function() {
924
- $('#mailpoet_website_sending_frequency').show();
925
 
926
- $('#website_frequency_emails').val(emails);
927
- $('#website_frequency_interval').val(interval);
928
- });
929
 
930
  // set sending frequency
931
  setSendingFrequency({
@@ -934,6 +1015,8 @@
934
  interval: interval
935
  });
936
  }
 
 
937
  }
938
 
939
  function updateSendingFrequency(method) {
1
+ <% set intervals = [1, 2, 5, 10, 15, 30] %>
2
  <% set default_frequency = {
3
  'website': {
4
  'emails': 25,
17
  name="mta_group"
18
  value="<%= settings.mta_group %>"
19
  />
20
+ <input
21
+ type="hidden"
22
+ id="mailpoet_smtp_provider"
23
+ name="mailpoet_smtp_provider"
24
+ value="<%= settings.smtp_provider %>"
25
+ />
26
  <!-- mta: method -->
27
  <input
28
  type="hidden"
98
 
99
  <div class="mailpoet_actions">
100
  <button
101
+ type="button"
102
  class="mailpoet_sending_service_activate button-secondary"
103
  <% if(settings.mta_group == 'mailpoet' or not(mss_key_valid)) %> disabled="disabled"<% endif %>
104
  ><%= __('Activate') %></button>
105
  </div>
106
  </li>
107
  <li
108
+ data-group="other"
109
+ <% if(settings.mta_group == 'smtp' or settings.mta_group == 'website') %>class="mailpoet_active"<% endif %>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
110
  >
111
+ <h3><%= __('Other') %></h3>
112
+ <p class="mailpoet_description">
113
+ <strong><%= __('Send with your website or third party') %></strong>
114
+ <br />
115
+ <%= __('Choose to send emails through your website (not recommended) or a third party sender.') %>
116
+ </p>
117
+
118
+ <div class="mailpoet_status">
119
+ <span><%= __('Activated') %></span>
120
+ </div>
 
121
 
122
+ <div class="mailpoet_actions">
123
+ <a
124
+ class="button-secondary"
125
+ href="#mta/other"><%= __('Configure') %></a>
126
+ </div>
127
  </li>
128
  </ul>
129
 
130
  <p class="mailpoet_sending_methods_help help">
131
  <%= __("Need help to pick? [link]Check out the comparison table of sending methods[/link].")
132
+ |replaceLinkTags('http://beta.docs.mailpoet.com/article/181-comparison-table-of-sending-methods', {'target' : '_blank'})
133
  |raw
134
  %>
135
  </p>
136
 
137
  <div id="mailpoet_sending_method_setup">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
138
 
139
+ <!-- Sending Method: Other -->
140
+ <div class="mailpoet_sending_method" data-group="other" style="display:none;">
141
+ <table class="form-table">
142
+ <tr>
143
+ <th scope="row">
144
+ <label for="mailpoet_smtp_method">
145
+ <%= __('Method') %>
146
+ </label>
147
+ </th>
148
+ <td>
149
+ <!-- smtp provider -->
150
+ <select
151
+ id="mailpoet_smtp_method"
152
+ name="smtp_provider"
153
+ >
154
+ <option data-interval="5" data-emails="25" value="server">
155
+ <%= __('Your web host / web server') %>
156
+ </option>
157
+ <option data-interval="5" data-emails="100" value="manual"
158
+ <%
159
+ if settings.mta_group == "smtp"
160
+ %>
161
+ selected="selected"
162
+ <% endif %>
163
+ >
164
+ <%= __('SMTP') %>
165
+ </option>
166
+ <!-- providers -->
167
+ <optgroup label="<%= __('Select your provider') %>">
168
+ <% for host_key, host in hosts.smtp %>
169
+ <option
170
+ value="<%= host_key %>"
171
+ data-emails="<%= host.emails %>"
172
+ data-interval="<%= host.interval %>"
173
+ data-fields="<%= host.fields | join(',') %>"
174
+ <% if(settings.smtp_provider == host_key) %>
175
+ selected="selected"
176
+ <% endif %>
177
+ ><%= host.name %></option>
178
+ <% endfor %>
179
+ </optgroup>
180
+ </select>
181
+ </td>
182
+ </tr>
183
+ <tr id="mailpoet_sending_method_host"
184
+ <%
185
+ if settings.mta_group == "smtp"
186
+ %>
187
+ style="display:none;"
188
+ <% endif %>
189
+ >
190
+ <th scope="row">
191
+ <label for="mailpoet_web_host">
192
+ <%= __('Your web host') %>
193
+ </label>
194
+ </th>
195
+ <td>
196
+ <p>
197
+ <!-- sending frequency -->
198
+ <select
199
+ id="mailpoet_web_host"
200
+ name="web_host"
201
+ >
202
 
203
+ <!-- web hosts -->
204
+ <option
205
+ value=""
206
+ data-emails="25"
207
+ data-interval="5"
208
+ label="<%= __('Select your web host') %>"
209
+ >
210
+ <% for host_key, host in hosts.web %>
211
+ <option
212
+ value="<%= host_key %>"
213
+ data-emails="<%= host.emails %>"
214
+ data-interval="<%= host.interval %>"
215
+ <% if(settings.web_host == host_key) %>
216
+ selected="selected"
217
+ <% endif %>
218
+ ><%= host.name %></option>
219
+ <% endfor %>
220
+ </select>
221
+ &nbsp;
222
+ <!-- website: sending frequency -->
223
+ <span id="mailpoet_website_sending_frequency"></span>
224
+ </p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
225
 
226
+ </td>
227
+ </tr>
228
+ <tr>
229
+ <th scope="row">
230
+ <label for="mailpoet_web_host">
231
+ <%= __('Sending frequency') %>
232
+ </label>
233
+ </th>
234
+ <td>
235
+ <p>
236
+ <!-- sending frequency -->
 
237
  <select
238
+ id="mailpoet_sending_frequency"
239
+ name="mailpoet_sending_frequency"
240
  >
241
+ <option value="auto">
242
+ <%= __('Recommended') %>
243
+ </option>
244
+ <option value="manual"
245
+ <%
246
+ if not(settings.mailpoet_sending_frequency == 'auto')
247
+ %>
248
+ selected="selected"
249
+ <% endif %>
250
+ >
251
+ <%= __("I'll set my own frequency") %>
252
  </option>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
253
  </select>
254
+ <span id="mailpoet_recommended_daily_emails"></span>
255
+ </p>
256
+ <div id="mailpoet_sending_frequency_manual"
257
+ <%
258
+ if settings.mailpoet_sending_frequency == 'auto'
259
+ %>
260
+ style="display: none"
261
+ <% endif %>
262
+ >
 
263
  <p>
264
  <input
265
+ id="other_frequency_emails"
266
  type="number"
267
  min="1"
268
  max="1000"
269
+ <% if(settings.mta_group == 'website') %>
270
+ value="<%= settings.mta.frequency.emails %>"
271
+ <% else %>
272
+ value="<%= default_frequency.website.emails %>"
273
+ <% endif %>
274
  />
275
  <%= __('emails') %>
276
+ <select id="other_frequency_interval">
277
  <% for interval in intervals %>
278
+ <option
279
+ value="<%= interval %>"
280
+ <%
281
+ if not(settings.mta.frequency.interval)
282
+ and (interval == default_frequency.website.interval)
283
+ %>
284
+ selected="selected"
285
+ <% endif %>
286
+ <% if(settings.mta.frequency.interval == interval) %>
287
+ selected="selected"
288
+ <% endif %>
289
+ >
290
+ <%= sending_frequency(interval) %>
291
+ <% if(interval == default_frequency.website.interval) %>
292
+ (<%= __('recommended') %>)
293
+ <% endif %>
294
+ </option>
295
  <% endfor %>
296
  </select>
297
+ <span id="mailpoet_other_daily_emails"></span>
298
  </p>
299
+ <br />
300
+ <p>
301
+ <%= __('<strong>Warning!</strong> Sending more than the recommended amount of emails? You may break the terms of your web host or provider!') %>'
302
+ <br />
303
+ <%= __('Please ask your host for the maximum number of emails you are allowed to send per day.') %>
 
 
 
 
 
304
  </p>
305
+ </div>
306
+ </td>
307
+ </tr>
308
+ <tr class="mailpoet_smtp_field" data-field="host"
309
+ <%
310
+ if settings.mta_group != "smtp" or settings.smtp_provider != "manual"
311
+ %>
312
+ style="display:none;"
313
+ <% endif %>
314
+ >
315
+ <th scope="row">
316
+ <label for="settings[mta_host]">
317
+ <%= __('SMTP Hostname') %>
318
+ </label>
319
+ <p class="description">
320
+ <%= __('e.g.: smtp.mydomain.com') %>
321
+ </p>
322
+ </th>
323
+ <td>
324
+ <input
325
+ type="text"
326
+ class="regular-text"
327
+ id="settings[mta_host]"
328
+ name="mta[host]"
329
+ value="<%= settings.mta.host %>" />
330
+ </td>
331
+ </tr>
332
+ <!-- smtp: port -->
333
+ <tr class="mailpoet_smtp_field" data-field="port"
334
+ <%
335
+ if settings.mta_group != "smtp" or settings.smtp_provider != "manual"
336
+ %>
337
+ style="display:none;"
338
+ <% endif %>
339
+ >
340
+ <th scope="row">
341
+ <label for="settings[mta_port]">
342
+ <%= __('SMTP Port') %>
343
+ </label>
344
+ </th>
345
+ <td>
346
+ <input
347
+ type="number"
348
+ max="65535"
349
+ min="1"
350
+ maxlength="5"
351
+ style="width:5em;"
352
+ id="settings[mta_port]"
353
+ name="mta[port]"
354
+ value="<%= settings.mta.port %>"
355
+ />
356
+ </td>
357
+ </tr>
358
+
359
+ <!-- smtp: amazon region -->
360
+ <tr class="mailpoet_aws_field" data-field="region"
361
+ <%
362
+ if settings.mta_group != "smtp" or settings.smtp_provider != "AmazonSES"
363
+ %>
364
+ style="display:none;"
365
+ <% endif %>
366
+ >
367
+ <th scope="row">
368
+ <label for="settings[mta_region]">
369
+ <%= __('Region') %>
370
+ </label>
371
+ </th>
372
+ <td>
373
+ <select
374
+ id="settings[mta_region]"
375
+ name="mta[region]"
376
+ value="<% if(settings.mta_group == 'smtp') %>
377
  <%=- settings.mta.region -%>
378
  <% endif %>"
379
+ >
380
+ <% for region, server in hosts.smtp.AmazonSES.regions %>
381
+ <option
382
+ value="<%= server %>"
383
+ <% if(settings.mta.region == server) %>
384
+ selected="selected"
385
+ <% endif %>
386
  >
387
+ <%= region %>
388
+ </option>
389
+ <% endfor %>
390
+ </select>
391
+ </td>
392
+ </tr>
393
+
394
+ <!-- smtp: amazon access_key -->
395
+ <tr class="mailpoet_aws_field" data-field="access_key"
396
+ <%
397
+ if settings.mta_group != "smtp" or settings.smtp_provider != "AmazonSES"
398
+ %>
399
+ style="display:none;"
400
+ <% endif %>
401
+ >
402
+ <th scope="row">
403
+ <label for="settings[mta_access_key]">
404
+ <%= __('Access Key') %>
405
+ </label>
406
+ </th>
407
+ <td>
408
+ <input
409
+ type="text"
410
+ class="regular-text"
411
+ id="settings[mta_access_key]"
 
412
 
413
+ name="mta[access_key]"
414
+ value="<% if(settings.mta_group == 'smtp') %>
415
  <%=- settings.mta.access_key -%>
416
  <% endif %>"
417
+ />
418
+ </td>
419
+ </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
420
 
421
+ <!-- smtp: amazon secret_key -->
422
+ <tr class="mailpoet_aws_field" data-field="secret_key"
423
+ <%
424
+ if settings.mta_group != "smtp" or settings.smtp_provider != "AmazonSES"
425
+ %>
426
+ style="display:none;"
427
+ <% endif %>
428
+ >
429
+ <th scope="row">
430
+ <label for="settings[mta_secret_key]">
431
+ <%= __('Secret Key') %>
432
+ </label>
433
+ </th>
434
+ <td>
435
+ <input
436
+ type="text"
437
+ class="regular-text"
438
+ id="settings[mta_secret_key]"
439
+
440
+ name="mta[secret_key]"
441
+ value="<% if(settings.mta_group == 'smtp') %>
442
  <%=- settings.mta.secret_key -%>
443
  <% endif %>"
444
+ />
445
+ </td>
446
+ </tr>
447
+
448
+ <!-- smtp: domain -->
449
+ <tr class="mailpoet_smtp_field" data-field="domain"
450
+ <%
451
+ if settings.mta_group != "smtp" or settings.smtp_provider != "manual"
452
+ %>
453
+ style="display:none;"
454
+ <% endif %>
455
+ >
456
+ <th scope="row">
457
+ <label for="settings[mta_domain]">
458
+ <%= __('Domain') %>
459
+ </label>
460
+ <p class="description">
461
+ <%= __('e.g.: smtp.mydomain.com') %>
462
+ </p>
463
+ </th>
464
+ <td>
465
+ <input
466
+ type="text"
467
+ class="regular-text"
468
+ id="settings[mta_domain]"
469
+ name="mta[domain]"
470
+ value="<%= settings.mta.domain %>" />
471
+ </td>
472
+ </tr>
473
+
474
+ <!-- smtp: api key -->
475
+ <tr class="mailpoet_sendgrid_field" data-field="api_key"
476
+ <%
477
+ if settings.mta_group != "smtp" or settings.smtp_provider != "SendGrid"
478
+ %>
479
+ style="display:none;"
480
+ <% endif %>
481
+ >
482
+ <th scope="row">
483
+ <label for="settings[mta_api_key]">
484
+ <%= __('API Key') %>
485
+ </label>
486
+ </th>
487
+ <td>
488
+ <input
489
+ type="text"
490
+ class="regular-text"
491
+ id="settings[mta_api_key]"
492
+ name="mta[api_key]"
493
+ value="<%=- settings.mta.api_key -%>"
494
+ />
495
+ </td>
496
+ </tr>
497
+
498
+ <!-- smtp: login -->
499
+ <tr id="mta_login" class="mailpoet_smtp_field" data-field="login"
500
+ <%
501
+ if settings.mta_group != "smtp" or settings.smtp_provider != "manual"
502
+ %>
503
+ style="display:none;"
504
+ <% endif %>
505
+ >
506
+ <th scope="row">
507
+ <label for="settings[mta_login]">
508
+ <%= __('Login') %>
509
+ </label>
510
+ </th>
511
+ <td>
512
+ <input
513
+ type="text"
514
+ class="regular-text"
515
+ id="settings[mta_login]"
516
+ name="mta[login]"
517
+ value="<%= settings.mta.login %>"
518
+ />
519
+ </td>
520
+ </tr>
521
+ <!-- smtp: password -->
522
+ <tr id="mta_password" class="mailpoet_smtp_field" data-field="password"
523
+ <%
524
+ if settings.mta_group != "smtp" or settings.smtp_provider != "manual"
525
+ %>
526
+ style="display:none;"
527
+ <% endif %>
528
+ >
529
+ <th scope="row">
530
+ <label for="settings[mta_password]">
531
+ <%= __('Password') %>
532
+ </label>
533
+ </th>
534
+ <td>
535
+ <input
536
+ type="password"
537
+ class="regular-text"
538
+ id="settings[mta_password]"
539
+ name="mta[password]"
540
+ value="<%= settings.mta.password %>"
541
+ />
542
+ </td>
543
+ </tr>
544
+ <!-- smtp: security protocol -->
545
+ <tr class="mailpoet_smtp_field" data-field="encryption"
546
+ <%
547
+ if settings.mta_group != "smtp" or settings.smtp_provider != "manual"
548
+ %>
549
+ style="display:none;"
550
+ <% endif %>
551
+ >
552
+ <th scope="row">
553
+ <label for="settings[mta_encryption]">
554
+ <%= __('Secure Connection') %>
555
+ </label>
556
+ </th>
557
+ <td>
558
+ <select id="settings[mta_encryption]" name="mta[encryption]">
559
+ <option value=""><%= __('No') %></option>
560
+ <option
561
+ value="ssl"
562
+ <% if(settings.mta.encryption == 'ssl') %>
563
+ selected="selected"
564
+ <% endif %>
565
+ >SSL</option>
566
+ <option
567
+ value="tls"
568
+ <% if(settings.mta.encryption == 'tls') %>
569
+ selected="selected"
570
+ <% endif %>
571
+ >TLS</option>
572
+ </select>
573
+ </td>
574
+ </tr>
575
+ <!-- smtp: authentication -->
576
+ <tr class="mailpoet_smtp_field" data-field="authentication"
577
+ <%
578
+ if settings.mta_group != "smtp" or settings.smtp_provider != "manual"
579
+ %>
580
+ style="display:none;"
581
+ <% endif %>
582
+ >
583
+ <th scope="row">
584
+ <label>
585
+ <%= __('Authentication') %>
586
+ </label>
587
+ <p class="description">
588
+ <%= __('Leave this option set to Yes. Only a tiny portion of SMTP services prefer Authentication to be turned off.') %>
589
+ </p>
590
+ </th>
591
+ <td>
592
+ <label>
593
  <input
594
+ type="radio"
595
+ value="1"
596
+ name="mta[authentication]"
597
+ <%
598
+ if not(settings.mta.authentication)
599
+ or (settings.mta.authentication == "1") %>
600
+ checked="checked"
601
+ <% endif %>
602
+ /><%= __('Yes') %>
603
+ </label>
604
+ &nbsp;
605
+ <label>
 
 
 
 
606
  <input
607
+ type="radio"
608
+ value="-1"
609
+ name="mta[authentication]"
610
+ <% if(settings.mta.authentication == "-1") %>
611
+ checked="checked"
612
+ <% endif %>
613
+ /><%= __('No') %>
614
+ </label>
615
+ </td>
616
+ </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
617
  </tbody>
618
  </table>
619
  </div>
698
 
699
  // testing sending method
700
  $('#mailpoet_mta_test').on('click', function() {
 
 
701
  // get test email and include it in data
702
  var recipient = $('#mailpoet_mta_test_email').val();
703
 
704
  var settings = jQuery('#mailpoet_settings_form').serializeObject();
705
  var mailer = settings.mta;
706
+ mailer.method = getMethodFromGroup($('#mta_group').val());
 
 
 
 
707
 
708
  // check that we have a from address
709
  if(settings.sender.address.length === 0) {
748
  });
749
 
750
  // sending frequency update based on selected provider
 
751
  $('#mailpoet_web_host').on('change keyup', renderHostSendingFrequency);
752
 
753
  // update manual sending frequency when values are changed
754
+ $('#other_frequency_emails').on('change keyup', function() {
755
+ updateSendingFrequency('other');
 
 
 
 
 
 
 
756
  });
757
+ $('#other_frequency_interval').on('change keyup', function() {
758
+ updateSendingFrequency('other');
759
  });
760
 
761
  // save configuration of a sending method
762
+ $('.mailpoet_sending_service_activate').on('click', function() {
763
+ $('#mta_group').val('mailpoet');
764
  saveSendingMethodConfiguration('mailpoet');
765
  });
766
  $('.mailpoet_mta_setup_save').on('click', function() {
768
  var group = $('.mailpoet_sending_method:visible').data('group');
769
  saveSendingMethodConfiguration(group);
770
  });
771
+ $('#mailpoet_smtp_method').on('change keyup', renderHostsSelect);
772
+ $('#mailpoet_sending_frequency').on('change keyup', sendingFrequencyMethodUpdated);
773
+ $('#mailpoet_smtp_method').trigger("change");
774
+ $('#other_frequency_emails').trigger("change");
775
 
776
  function saveSendingMethodConfiguration(group) {
 
 
777
 
778
  // set sending method
779
  if(group === undefined) {
784
  // set new sending method active
785
  setSendingMethodGroup(group);
786
 
 
 
 
 
787
  // enforce signup confirmation depending on selected group
788
  setSignupConfirmation(group);
789
 
827
  $('.mailpoet_sending_methods li[data-group="'+group+'"]')
828
  .addClass('mailpoet_active');
829
 
830
+ var method = getMethodFromGroup($('#mta_group').val());
 
 
 
831
 
832
  $('#mta_method').val(method);
833
 
903
 
904
  function renderSMTPSendingFrequency() {
905
  // set sending frequency
906
+ var emails = $('#smtp_frequency_emails').val();
907
+ var interval = $('#smtp_frequency_interval').val();
908
  setSendingFrequency({
909
  output: '#mailpoet_smtp_daily_emails',
910
  only_daily: true,
911
+ emails: emails,
912
+ interval: interval
913
  });
914
+ $('#mta_frequency_emails').val(emails);
915
+ $('#mta_frequency_interval').val(interval);
916
+ }
917
+
918
+ function sendingFrequencyMethodUpdated() {
919
+ var method = $(this).find('option:selected').first();
920
+ var sendingMethod = $('#mailpoet_smtp_method').find('option:selected').first().val();
921
+ if(method.val() === "manual") {
922
+ $('#mailpoet_sending_frequency_manual').show();
923
+ $('#mailpoet_recommended_daily_emails').hide();
924
+ $('#other_frequency_emails').trigger("change");
925
+ } else {
926
+ $('#mailpoet_sending_frequency_manual').hide();
927
+ if(sendingMethod !== "server") {
928
+ $('#mailpoet_recommended_daily_emails').show();
929
+ }
930
+ $('#mailpoet_smtp_method').trigger("change");
931
+ }
932
+ }
933
+
934
+ function renderHostsSelect() {
935
+ var method = $(this).find('option:selected').first();
936
+ var val = method.val();
937
+
938
+ if(val === "server") {
939
+ $('#mailpoet_sending_method_host').show();
940
+ $('#mta_group').val('website');
941
+ } else {
942
+ $('#mailpoet_sending_method_host').hide();
943
+ }
944
+ if(val === "manual") {
945
+ $('.mailpoet_smtp_field').show();
946
+ $('#mta_group').val('smtp');
947
+ $('#mailpoet_smtp_provider').val('manual');
948
+ } else {
949
+ $('.mailpoet_smtp_field').hide();
950
+ }
951
+ if(val === "AmazonSES") {
952
+ $('.mailpoet_aws_field').show();
953
+ $('#mta_group').val('smtp');
954
+ $('#mailpoet_smtp_provider').val('AmazonSES');
955
+ } else {
956
+ $('.mailpoet_aws_field').hide();
957
+ }
958
+ if(val === "SendGrid") {
959
+ $('.mailpoet_sendgrid_field').show();
960
+ $('#mta_group').val('smtp');
961
+ $('#mailpoet_smtp_provider').val('SendGrid');
962
+ } else {
963
+ $('.mailpoet_sendgrid_field').hide();
964
+ }
965
+ const frequencyMethod = $('#mailpoet_sending_frequency').find('option:selected').first().val();
966
+ if(frequencyMethod === "manual") {
967
+ $('#mailpoet_recommended_daily_emails').hide();
968
+ } else {
969
+ $('#mailpoet_recommended_daily_emails').show();
970
+ }
971
+ var emails = method.data('emails');
972
+ var interval = method.data('interval');
973
+ if(val === "server") {
974
+
975
+ var emails = $('#mailpoet_web_host').find('option:selected').first().data('emails');
976
+ var interval = $('#mailpoet_web_host').find('option:selected').first().data('interval');
977
+ }
978
+ setSendingFrequency({
979
+ output: '#mailpoet_recommended_daily_emails',
980
+ only_daily: false,
981
+ emails: emails,
982
+ interval: interval
983
+ });
984
+ $('#mta_frequency_emails').val(emails);
985
+ $('#mta_frequency_interval').val(interval);
986
  }
987
 
988
  function renderHostSendingFrequency() {
989
+
990
  var host = $(this).find('option:selected').first();
991
  var emails =
992
  host.data('emails') || <%= default_frequency.website.emails %>;
996
  host.data('fields') || '';
997
 
998
  if(host.val() === 'manual' ) {
 
 
 
 
 
999
  // set sending frequency
1000
  setSendingFrequency({
1001
  output: '#mailpoet_website_daily_emails',
1004
  interval: $('#website_frequency_interval').val()
1005
  });
1006
  } else {
 
 
1007
 
1008
+ $('#website_frequency_emails').val(emails);
1009
+ $('#website_frequency_interval').val(interval);
 
1010
 
1011
  // set sending frequency
1012
  setSendingFrequency({
1015
  interval: interval
1016
  });
1017
  }
1018
+ $('#mta_frequency_emails').val(emails);
1019
+ $('#mta_frequency_interval').val(interval);
1020
  }
1021
 
1022
  function updateSendingFrequency(method) {
views/settings/premium.html CHANGED
@@ -57,7 +57,7 @@
57
  </a>
58
  <span>
59
  <%= __('[link]Read guide[/link] on how to install Premium.')
60
- |replaceLink('http://beta.docs.mailpoet.com/article/194-instructions-to-install-the-premium-plugin', {'target' : '_blank'})
61
  |raw
62
  %>
63
  </span>
@@ -82,7 +82,7 @@
82
  >
83
  <span>
84
  <%= __("Don't forget to activate the MailPoet Sending Service in the [link]Send with...[/link] tab above.")
85
- |replaceLink('#mta')
86
  |raw
87
  %>
88
  </span>
57
  </a>
58
  <span>
59
  <%= __('[link]Read guide[/link] on how to install Premium.')
60
+ |replaceLinkTags('http://beta.docs.mailpoet.com/article/194-instructions-to-install-the-premium-plugin', {'target' : '_blank'})
61
  |raw
62
  %>
63
  </span>
82
  >
83
  <span>
84
  <%= __("Don't forget to activate the MailPoet Sending Service in the [link]Send with...[/link] tab above.")
85
+ |replaceLinkTags('#mta')
86
  |raw
87
  %>
88
  </span>
views/subscribers/importExport/import.html CHANGED
@@ -1,5 +1,5 @@
1
  <% set csvDescription = __('This file needs to be formatted in a CSV style (comma-separated-values.) Look at some [link]examples on our support site[/link].') %>
2
- <% set csvKBLink = '<a target="_blank" href="http://docs.mailpoet.com/article/126-importing-subscribers-with-csv-files">' %>
3
  <% extends 'layout.html' %>
4
  <% block content %>
5
  <div id="mailpoet_subscribers_import" class="wrap">
1
  <% set csvDescription = __('This file needs to be formatted in a CSV style (comma-separated-values.) Look at some [link]examples on our support site[/link].') %>
2
+ <% set csvKBLink = 'http://docs.mailpoet.com/article/126-importing-subscribers-with-csv-files' %>
3
  <% extends 'layout.html' %>
4
  <% block content %>
5
  <div id="mailpoet_subscribers_import" class="wrap">
views/subscribers/importExport/import/step1.html CHANGED
@@ -30,7 +30,7 @@
30
  <th scope="row">
31
  <label for="paste_input"> <%= __('Copy and paste your subscribers from Excel/Spreadsheets') %>
32
  <p class="description">
33
- <%= csvDescription|replaceLink(csvKBLink, {'target' : '_blank'})|raw %>
34
  </p>
35
  </label>
36
  </th>
@@ -54,7 +54,7 @@
54
  <label for="file_local">
55
  <%= __('Upload a file') %>
56
  <p class="description">
57
- <%= csvDescription|replaceLink(csvKBLink, {'target' : '_blank'})|raw %>
58
  </p>
59
  </label>
60
  </th>
@@ -114,7 +114,7 @@
114
  <br/>
115
  <%=
116
  __('[link]Read more at our Knowledge Base[/link]')
117
- |replaceLink('http://docs.mailpoet.com/article/127-checklist-before-importing-subscribers', {'target' : '_blank'})
118
  |raw
119
  %>
120
  </p>
30
  <th scope="row">
31
  <label for="paste_input"> <%= __('Copy and paste your subscribers from Excel/Spreadsheets') %>
32
  <p class="description">
33
+ <%= csvDescription|replaceLinkTags(csvKBLink, {'target' : '_blank'})|raw %>
34
  </p>
35
  </label>
36
  </th>
54
  <label for="file_local">
55
  <%= __('Upload a file') %>
56
  <p class="description">
57
+ <%= csvDescription|replaceLinkTags(csvKBLink, {'target' : '_blank'})|raw %>
58
  </p>
59
  </label>
60
  </th>
114
  <br/>
115
  <%=
116
  __('[link]Read more at our Knowledge Base[/link]')
117
+ |replaceLinkTags('http://docs.mailpoet.com/article/127-checklist-before-importing-subscribers', {'target' : '_blank'})
118
  |raw
119
  %>
120
  </p>
views/subscribers/importExport/import/step2.html CHANGED
@@ -46,7 +46,7 @@
46
  <th scope="row">
47
  <%=
48
  __('To add subscribers to a mailing segment, [link]create a list[/link].')
49
- |replaceLink('javascript:;', {'target' : '_blank', 'class' : 'mailpoet_create_segment'})
50
  |raw
51
  %>
52
  </th>
46
  <th scope="row">
47
  <%=
48
  __('To add subscribers to a mailing segment, [link]create a list[/link].')
49
+ |replaceLinkTags('javascript:;', {'target' : '_blank', 'class' : 'mailpoet_create_segment'})
50
  |raw
51
  %>
52
  </th>
views/welcome.html CHANGED
@@ -124,6 +124,13 @@ jQuery(function($) {
124
  data: {
125
  analytics: { enabled: (is_enabled)}
126
  }
 
 
 
 
 
 
 
127
  });
128
 
129
  if (is_enabled) {
124
  data: {
125
  analytics: { enabled: (is_enabled)}
126
  }
127
+ }).fail((response) => {
128
+ if (response.errors.length > 0) {
129
+ MailPoet.Notice.error(
130
+ response.errors.map((error) => { return error.message; }),
131
+ { scroll: true }
132
+ );
133
+ }
134
  });
135
 
136
  if (is_enabled) {