plugin updates
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 92 KiB After Width: | Height: | Size: 92 KiB |
@@ -1 +1 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 32 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><g><g><path d="M18.19,14.262c-0.129,0.001 -0.258,-0.042 -0.366,-0.127c-0.231,-0.184 -0.291,-0.515 -0.137,-0.767c0.038,-0.063 3.788,-6.316 1.853,-9.433c-0.404,-0.651 -0.858,-0.993 -1.348,-1.018c-0.951,-0.042 -1.992,1.022 -2.312,1.438c-0.112,0.142 -0.283,0.226 -0.464,0.226c-0.323,-0 -0.589,-0.266 -0.589,-0.59c0,-0.128 0.042,-0.252 0.119,-0.355c0.063,-0.08 1.536,-1.981 3.305,-1.896c0.898,0.045 1.669,0.574 2.289,1.573c1.45,2.334 0.429,5.813 -0.579,8.159c1.049,-0.727 2.344,-1.442 3.58,-1.635c0.326,-0.048 0.623,0.171 0.674,0.492c0.004,0.03 0.007,0.06 0.007,0.091c-0,0.289 -0.213,0.537 -0.499,0.582c-2.306,0.358 -5.093,3.065 -5.12,3.092c-0.11,0.108 -0.259,0.168 -0.413,0.168l0,0Z" style="fill:#7cb1f4;fill-rule:nonzero;"/><path d="M3.68,9.303c0,0.315 -0.082,0.594 -0.248,0.841c-0.165,0.247 -0.404,0.438 -0.715,0.572c-0.311,0.135 -0.673,0.204 -1.096,0.204c-0.35,-0 -0.639,-0.024 -0.88,-0.068c-0.241,-0.043 -0.485,-0.13 -0.741,-0.248l0,-1.222c0.271,0.135 0.552,0.236 0.842,0.314c0.289,0.079 0.56,0.113 0.805,0.113c0.21,0 0.365,-0.035 0.463,-0.105c0.098,-0.071 0.148,-0.162 0.148,-0.27c0.001,-0.065 -0.02,-0.129 -0.06,-0.182c-0.039,-0.052 -0.103,-0.105 -0.19,-0.158c-0.087,-0.053 -0.32,-0.161 -0.699,-0.326c-0.343,-0.151 -0.599,-0.297 -0.774,-0.438c-0.175,-0.141 -0.298,-0.303 -0.381,-0.486c-0.083,-0.183 -0.124,-0.399 -0.124,-0.65c-0,-0.471 0.176,-0.832 0.528,-1.094c0.353,-0.261 0.837,-0.392 1.452,-0.392c0.544,-0 1.099,0.121 1.664,0.364l-0.435,1.059c-0.491,-0.217 -0.915,-0.326 -1.272,-0.326c-0.185,-0 -0.319,0.031 -0.403,0.094c-0.084,0.062 -0.126,0.14 -0.126,0.235c0,0.099 0.053,0.189 0.16,0.267c0.107,0.079 0.396,0.223 0.868,0.431c0.453,0.197 0.767,0.408 0.943,0.634c0.177,0.225 0.265,0.51 0.265,0.853l0.006,-0.016Zm2.954,1.541l-1.074,-3.656l-0.033,-0l0.076,1.451l0,2.205l-1.258,0l0,-5.076l1.891,0l1.096,3.604l0.028,0l1.077,-3.604l1.894,0l0,5.076l-1.308,0l0,-2.225l0.006,-0.386l0.048,-1.038l-0.032,0l-1.06,3.649l-1.351,0Zm6.85,0l-1.419,0l-0,-3.955l-1.283,0l-0,-1.121l3.982,-0l-0,1.121l-1.279,0l-0.001,3.955Zm5.697,-3.465c0,0.567 -0.174,1.005 -0.519,1.314c-0.346,0.309 -0.842,0.463 -1.476,0.463l-0.399,0l0,1.684l-1.419,0l-0,-5.076l1.818,0c0.663,0 1.161,0.141 1.495,0.421c0.333,0.28 0.5,0.678 0.5,1.195l0,-0.001Zm-2.401,0.66l0.266,-0c0.213,-0 0.383,-0.058 0.505,-0.174c0.122,-0.116 0.189,-0.275 0.189,-0.479c-0,-0.343 -0.197,-0.514 -0.589,-0.514l-0.371,-0l0,1.167Zm7.259,-0.167l2.268,-0l-0,2.736c-0.616,0.203 -1.293,0.305 -2.03,0.305c-0.81,0 -1.436,-0.227 -1.878,-0.68c-0.441,-0.453 -0.663,-1.1 -0.663,-1.941c0,-0.819 0.243,-1.457 0.726,-1.913c0.483,-0.456 1.162,-0.684 2.034,-0.684c0.314,0 0.628,0.031 0.936,0.091c0.296,0.057 0.55,0.137 0.767,0.229l-0.449,1.076c-0.378,-0.18 -0.794,-0.271 -1.247,-0.271c-0.414,0 -0.735,0.131 -0.961,0.391c-0.226,0.26 -0.339,0.633 -0.339,1.116c-0,0.471 0.102,0.836 0.307,1.085c0.205,0.249 0.5,0.373 0.885,0.373c0.211,0 0.405,-0.019 0.582,-0.059l0,-0.795l-0.938,0l0,-1.059Zm7.961,0.427c-0,0.855 -0.216,1.504 -0.65,1.948c-0.434,0.445 -1.069,0.667 -1.905,0.667c-0.825,-0 -1.456,-0.223 -1.896,-0.673c-0.44,-0.45 -0.66,-1.098 -0.66,-1.952c0,-0.841 0.219,-1.49 0.657,-1.935c0.437,-0.445 1.073,-0.669 1.906,-0.669c0.836,0 1.47,0.222 1.901,0.664c0.431,0.441 0.644,1.097 0.644,1.95l0.003,0Zm-3.615,0c-0,0.982 0.353,1.473 1.06,1.473c0.359,-0 0.626,-0.119 0.8,-0.358c0.173,-0.238 0.26,-0.61 0.26,-1.11c-0,-0.507 -0.088,-0.882 -0.264,-1.124c-0.175,-0.242 -0.439,-0.37 -0.789,-0.37c-0.712,-0 -1.067,0.495 -1.067,1.486l-0,0.003Z" style="fill:#222a35;fill-rule:nonzero;"/></g></g></svg>
|
||||
<svg viewBox="0 0 32 16" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2"><path d="M18.19 14.262a.59.59 0 0 1-.503-.894c.038-.063 3.788-6.316 1.853-9.433-.404-.651-.858-.993-1.348-1.018-.951-.042-1.992 1.022-2.312 1.438a.592.592 0 0 1-.464.226.592.592 0 0 1-.47-.945c.063-.08 1.536-1.981 3.305-1.896.898.045 1.669.574 2.289 1.573 1.45 2.334.429 5.813-.579 8.159 1.049-.727 2.344-1.442 3.58-1.635a.59.59 0 0 1 .182 1.165c-2.306.358-5.093 3.065-5.12 3.092a.59.59 0 0 1-.413.168Z" style="fill:#7cb1f4;fill-rule:nonzero"/><path d="M3.68 9.303c0 .315-.082.594-.248.841a1.59 1.59 0 0 1-.715.572 2.724 2.724 0 0 1-1.096.204c-.35 0-.639-.024-.88-.068A3.075 3.075 0 0 1 0 10.604V9.382c.271.135.552.236.842.314.289.079.56.113.805.113.21 0 .365-.035.463-.105a.324.324 0 0 0 .148-.27.295.295 0 0 0-.06-.182.677.677 0 0 0-.19-.158 8.22 8.22 0 0 0-.699-.326C.966 8.617.71 8.471.535 8.33a1.31 1.31 0 0 1-.381-.486 1.56 1.56 0 0 1-.124-.65c0-.471.176-.832.528-1.094.353-.261.837-.392 1.452-.392.544 0 1.099.121 1.664.364l-.435 1.059c-.491-.217-.915-.326-1.272-.326-.185 0-.319.031-.403.094a.281.281 0 0 0-.126.235c0 .099.053.189.16.267.107.079.396.223.868.431.453.197.767.408.943.634.177.225.265.51.265.853l.006-.016Zm2.954 1.541L5.56 7.188h-.033l.076 1.451v2.205H4.345V5.768h1.891l1.096 3.604h.028l1.077-3.604h1.894v5.076H9.023V8.619l.006-.386.048-1.038h-.032l-1.06 3.649H6.634Zm6.85 0h-1.419V6.889h-1.283V5.768h3.982v1.121h-1.279l-.001 3.955Zm5.697-3.465c0 .567-.174 1.005-.519 1.314-.346.309-.842.463-1.476.463h-.399v1.684h-1.419V5.764h1.818c.663 0 1.161.141 1.495.421.333.28.5.678.5 1.195v-.001Zm-2.401.66h.266c.213 0 .383-.058.505-.174a.632.632 0 0 0 .189-.479c0-.343-.197-.514-.589-.514h-.371v1.167Zm7.259-.167h2.268v2.736a6.456 6.456 0 0 1-2.03.305c-.81 0-1.436-.227-1.878-.68-.441-.453-.663-1.1-.663-1.941 0-.819.243-1.457.726-1.913.483-.456 1.162-.684 2.034-.684a4.9 4.9 0 0 1 .936.091 3.8 3.8 0 0 1 .767.229l-.449 1.076a2.865 2.865 0 0 0-1.247-.271c-.414 0-.735.131-.961.391-.226.26-.339.633-.339 1.116 0 .471.102.836.307 1.085.205.249.5.373.885.373.211 0 .405-.019.582-.059v-.795h-.938V7.872ZM32 8.299c0 .855-.216 1.504-.65 1.948-.434.445-1.069.667-1.905.667-.825 0-1.456-.223-1.896-.673-.44-.45-.66-1.098-.66-1.952 0-.841.219-1.49.657-1.935.437-.445 1.073-.669 1.906-.669.836 0 1.47.222 1.901.664.431.441.644 1.097.644 1.95H32Zm-3.615 0c0 .982.353 1.473 1.06 1.473.359 0 .626-.119.8-.358.173-.238.26-.61.26-1.11 0-.507-.088-.882-.264-1.124-.175-.242-.439-.37-.789-.37-.712 0-1.067.495-1.067 1.486v.003Z" style="fill:#222a35;fill-rule:nonzero"/></svg>
|
||||
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 2.6 KiB |
@@ -152,9 +152,11 @@ $generated_i18n_strings = array(
|
||||
__( 'Make sure you\'re getting the most out of WP Mail SMTP. Just check all of the features you\'d like to use, and we\'ll go ahead and enable those for you.', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepConfigureEmailLogs.vue:15
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepHelpImprove.vue:16
|
||||
__( 'Save and Continue', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepConfigureEmailLogs.vue:16
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepHelpImprove.vue:18
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepImport.vue:16
|
||||
__( 'Previous Step', 'wp-mail-smtp' ),
|
||||
|
||||
@@ -179,22 +181,22 @@ $generated_i18n_strings = array(
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepPluginFeatures.vue:23
|
||||
__( 'Create beautiful contact forms with just a few clicks.', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepLicense.vue:23
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepPluginFeatures.vue:24
|
||||
__( 'Detailed Email Logs', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepLicense.vue:31
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepPluginFeatures.vue:25
|
||||
__( 'Keep records of every email that\'s sent out from your website.', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepLicense.vue:34
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepPluginFeatures.vue:26
|
||||
__( 'Instant Email Alerts', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepLicense.vue:35
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepPluginFeatures.vue:27
|
||||
__( 'Get notifications via email, SMS, Slack, or webhook when emails fail to send.', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepLicense.vue:36
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepPluginFeatures.vue:28
|
||||
__( 'Complete Email Reports', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepLicense.vue:37
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepPluginFeatures.vue:29
|
||||
__( 'See the delivery status, track opens and clicks, and create deliverability graphs.', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepPluginFeatures.vue:30
|
||||
@@ -203,16 +205,16 @@ $generated_i18n_strings = array(
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepPluginFeatures.vue:31
|
||||
__( 'Get statistics about emails you\'ve sent.', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepLicense.vue:22
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepPluginFeatures.vue:32
|
||||
__( 'Manage Default Notifications', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepLicense.vue:32
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepPluginFeatures.vue:33
|
||||
__( 'Control which email notifications your WordPress site sends.', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepLicense.vue:21
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepPluginFeatures.vue:34
|
||||
__( 'Multisite Network Settings', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepLicense.vue:33
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepPluginFeatures.vue:35
|
||||
__( 'Save time with powerful WordPress Multisite controls.', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Mailgun.vue:14
|
||||
@@ -221,8 +223,8 @@ $generated_i18n_strings = array(
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Mailgun.vue:15
|
||||
__( 'Domain Name', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/SparkPost.vue:15
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Zoho.vue:16
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/AmazonSES.vue:18
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Mailgun.vue:16
|
||||
__( 'Region', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Mailgun.vue:18
|
||||
@@ -237,47 +239,58 @@ $generated_i18n_strings = array(
|
||||
/* Translators: Link to the Mailgun documentation. */
|
||||
__( 'Define which endpoint you want to use for sending messages. If you are operating under EU laws, you may be required to use EU region. %1$sMore information%2$s on Mailgun.com.', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/SparkPost.vue:18
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Zoho.vue:22
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/AmazonSES.vue:21
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Gmail.vue:21
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Mailgun.vue:23
|
||||
__( 'From Name', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/SparkPost.vue:19
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Zoho.vue:23
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/AmazonSES.vue:22
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Gmail.vue:22
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Mailgun.vue:24
|
||||
__( 'Force From Name', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/SparkPost.vue:20
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/AmazonSES.vue:23
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Gmail.vue:23
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Mailgun.vue:25
|
||||
__( 'From Email', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/SparkPost.vue:21
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/AmazonSES.vue:24
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Gmail.vue:25
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Mailgun.vue:26
|
||||
__( 'Force From Email', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/SparkPost.vue:22
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Zoho.vue:24
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/AmazonSES.vue:25
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Gmail.vue:24
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Mailgun.vue:27
|
||||
__( 'If enabled, the From Name setting above will be used for all emails, ignoring values set by other plugins.', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/SparkPost.vue:23
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/AmazonSES.vue:26
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Gmail.vue:26
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Mailgun.vue:28
|
||||
__( 'If enabled, the From Email setting above will be used for all emails, ignoring values set by other plugins.', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/SparkPost.vue:24
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Zoho.vue:25
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/AmazonSES.vue:27
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Gmail.vue:27
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Mailgun.vue:29
|
||||
__( 'The name that emails are sent from.', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/SparkPost.vue:25
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/AmazonSES.vue:28
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Mailgun.vue:30
|
||||
__( 'The email address that emails are sent from.', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Mailgun.vue:31
|
||||
__( 'Read how to set up Mailgun', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/SparkPost.vue:31
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Mailgun.vue:36
|
||||
__( 'US', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/SparkPost.vue:35
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Mailgun.vue:40
|
||||
__( 'EU', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/Steps.vue:12
|
||||
__( 'Close and exit the Setup Wizard', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/SparkPost.vue:14
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Sendgrid.vue:13
|
||||
__( 'API Key', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Sendgrid.vue:14
|
||||
@@ -311,6 +324,8 @@ $generated_i18n_strings = array(
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepConfigureMailer.vue:14
|
||||
__( 'Below, we\'ll show you all of the settings required to set up this mailer.', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/settings/components/input/SettingsInputNumber.vue:64
|
||||
// Reference: src/modules/settings/components/input/SettingsInputRadio.vue:33
|
||||
// Reference: src/modules/settings/components/input/SettingsInputSelect.vue:38
|
||||
// Reference: src/modules/settings/components/input/SettingsInputSwitch.vue:39
|
||||
// Reference: src/modules/settings/components/input/SettingsInputText.vue:69
|
||||
@@ -343,10 +358,10 @@ $generated_i18n_strings = array(
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepConfigurationFailure.vue:13
|
||||
__( 'Start Troubleshooting', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepConfigurationSuccess.vue:23
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepConfigurationFailure.vue:14
|
||||
__( 'Send us Feedback', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepConfigurationSuccess.vue:24
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepConfigurationFailure.vue:15
|
||||
__( 'Finish Setup', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepImport.vue:12
|
||||
@@ -358,6 +373,7 @@ $generated_i18n_strings = array(
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepImport.vue:14
|
||||
__( 'Import Data and Continue', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepHelpImprove.vue:17
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepImport.vue:15
|
||||
__( 'Skip this Step', 'wp-mail-smtp' ),
|
||||
|
||||
@@ -447,16 +463,16 @@ $generated_i18n_strings = array(
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Zoho.vue:17
|
||||
__( 'The data center location used by your Zoho account.', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Zoho.vue:18
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Gmail.vue:17
|
||||
__( 'Client ID', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Zoho.vue:19
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Gmail.vue:18
|
||||
__( 'Client Secret', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Zoho.vue:20
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Outlook.vue:17
|
||||
__( 'Redirect URI', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Zoho.vue:21
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Gmail.vue:20
|
||||
__( 'Authorization', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Zoho.vue:26
|
||||
@@ -489,7 +505,7 @@ $generated_i18n_strings = array(
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/SmtpCom.vue:28
|
||||
__( 'Read how to set up SMTP.com', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/SmtpCom.vue:29
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Sendinblue.vue:29
|
||||
__( 'Transparency and Disclosure', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/SmtpCom.vue:31
|
||||
@@ -628,10 +644,10 @@ $generated_i18n_strings = array(
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/AmazonSES.vue:30
|
||||
__( 'Amazon SES requires an SSL certificate, and so is not currently compatible with your site. Please contact your host to request a SSL certificate, or check out ', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Outlook.vue:21
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/AmazonSES.vue:31
|
||||
__( 'WPBeginner\'s tutorial on how to set up SSL', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Outlook.vue:22
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/AmazonSES.vue:32
|
||||
__( 'If you\'d prefer not to set up SSL, or need an SMTP solution in the meantime, please go back and select a different mailer option.', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepChooseMailer.vue:13
|
||||
@@ -704,13 +720,13 @@ $generated_i18n_strings = array(
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepLicense.vue:27
|
||||
__( 'Enter your license key below to unlock plugin updates!', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepLicense.vue:28
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Gmail.vue:44
|
||||
__( 'Verify License Key', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepLicense.vue:28
|
||||
__( 'Connect', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepLicense.vue:29
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Gmail.vue:45
|
||||
__( 'The License Key format is incorrect. Please enter a valid key and try again.', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepLicense.vue:30
|
||||
@@ -719,16 +735,16 @@ $generated_i18n_strings = array(
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepLicense.vue:38
|
||||
__( 'Pro badge', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepLicense.vue:39
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Gmail.vue:43
|
||||
__( 'License key input', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepLicense.vue:40
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Gmail.vue:42
|
||||
__( 'Paste your license key here', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepLicense.vue:76
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Gmail.vue:141
|
||||
__( 'Successful Verification!', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepLicense.vue:86
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Gmail.vue:151
|
||||
__( 'Verification Error!', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Gmail.vue:19
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -3,8 +3,9 @@ Contributors: wpforms, jaredatch, smub, slaFFik, capuderg
|
||||
Tags: smtp, email, gmail, outlook, email logs
|
||||
Requires at least: 5.5
|
||||
Tested up to: 6.6
|
||||
Stable tag: 4.1.0
|
||||
Stable tag: 4.1.1
|
||||
Requires PHP: 7.2
|
||||
License: GNU General Public License v3.0 or later
|
||||
|
||||
Make email delivery easy for WordPress. Connect with SMTP, Gmail, Outlook, SendGrid, Mailgun, SES, Zoho, + more. Rated #1 WordPress SMTP Email plugin.
|
||||
|
||||
@@ -392,6 +393,13 @@ By all means please contact us to discuss features or options you'd like to see
|
||||
|
||||
== Changelog ==
|
||||
|
||||
= 4.1.1 - 2024-08-15 =
|
||||
- Changed: Delete `wp-mail-smtp` uploads folder on plugin uninstall, if the "Misc > Uninstall" option is enabled.
|
||||
- Changed: Decreased `PHPMailer` timeout value to 30 seconds from 5 minutes.
|
||||
- Changed: Improved Weekly Summary Email sending.
|
||||
- Fixed: Missing Reply-To support in SMTP2GO mailer.
|
||||
- Fixed: Setup Wizard translations not working correctly.
|
||||
|
||||
= 4.1.0 - 2024-07-17 =
|
||||
- Added: New transactional mailer: SMTP2GO.
|
||||
- Changed: Recurring email queue tasks are now removed after completion.
|
||||
|
||||
@@ -178,6 +178,8 @@ class Processor {
|
||||
$phpmailer->Username = $connection_options->get( $mailer, 'user' );
|
||||
$phpmailer->Password = $connection_options->get( $mailer, 'pass' );
|
||||
}
|
||||
|
||||
$phpmailer->Timeout = 30;
|
||||
// phpcs:enable
|
||||
|
||||
// Maybe set default reply-to header.
|
||||
|
||||
@@ -177,14 +177,35 @@ class Mailer extends MailerAbstract {
|
||||
}
|
||||
|
||||
/**
|
||||
* Doesn't support this.
|
||||
* So we do nothing.
|
||||
* Set the Reply To information for an email.
|
||||
*
|
||||
* @since 4.1.0
|
||||
* @since 4.1.1
|
||||
*
|
||||
* @param array $emails Reply To email addresses.
|
||||
*/
|
||||
public function set_reply_to( $emails ) {}
|
||||
public function set_reply_to( $emails ) {
|
||||
|
||||
if ( empty( $emails ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$data = [];
|
||||
|
||||
foreach ( $emails as $email ) {
|
||||
if ( ! isset( $email[0] ) || ! filter_var( $email[0], FILTER_VALIDATE_EMAIL ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$data[] = $this->address_format( $email );
|
||||
}
|
||||
|
||||
if ( ! empty( $data ) ) {
|
||||
$this->set_body_header(
|
||||
'Reply-To',
|
||||
implode( ',', $data )
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set email subject.
|
||||
@@ -399,7 +420,9 @@ class Mailer extends MailerAbstract {
|
||||
*/
|
||||
public function get_response_error() { // phpcs:ignore Generic.Metrics.NestingLevel.MaxExceeded, Generic.Metrics.CyclomaticComplexity.TooHigh
|
||||
|
||||
$error_text[] = $this->error_message;
|
||||
$error_text = [
|
||||
$this->error_message,
|
||||
];
|
||||
|
||||
if ( ! empty( $this->response ) ) {
|
||||
$body = wp_remote_retrieve_body( $this->response );
|
||||
@@ -482,4 +505,21 @@ class Mailer extends MailerAbstract {
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sanitize email header values.
|
||||
*
|
||||
* @since 4.1.1
|
||||
*
|
||||
* @param string $name Name of the header.
|
||||
* @param string $value Value of the header.
|
||||
*/
|
||||
public function sanitize_header_value( $name, $value ) {
|
||||
|
||||
if ( strtolower( $name ) === 'reply-to' ) {
|
||||
return $value;
|
||||
}
|
||||
|
||||
return parent::sanitize_header_value( $name, $value );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,7 +51,10 @@ class SummaryEmailTask extends Task {
|
||||
$date = new \DateTime( 'next monday 2pm', WP::wp_timezone() );
|
||||
|
||||
// Schedule the task.
|
||||
$this->recurring( $date->getTimestamp(), WEEK_IN_SECONDS )->register();
|
||||
$this
|
||||
->recurring( $date->getTimestamp(), WEEK_IN_SECONDS )
|
||||
->unique()
|
||||
->register();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -64,14 +67,38 @@ class SummaryEmailTask extends Task {
|
||||
public function process( $meta_id ) {
|
||||
|
||||
// Prevent email sending if summary report email is disabled.
|
||||
if ( SummaryReportEmail::is_disabled() ) {
|
||||
if ( SummaryReportEmail::is_disabled() || ! $this->is_allowed() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Update the last sent week at the top to prevent multiple emails in case of task failure and retry.
|
||||
update_option( 'wp_mail_smtp_summary_report_email_last_sent_week', current_time( 'W' ) );
|
||||
|
||||
$reports = wp_mail_smtp()->get_reports();
|
||||
|
||||
$email = $reports->get_summary_report_email();
|
||||
|
||||
$email->send();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the summary report email is allowed to be sent.
|
||||
*
|
||||
* The email is allowed to be sent if it was not sent in the current week.
|
||||
*
|
||||
* @since 4.1.1
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
private function is_allowed() {
|
||||
|
||||
$last_sent_week = get_option( 'wp_mail_smtp_summary_report_email_last_sent_week' );
|
||||
$current_week = current_time( 'W' );
|
||||
|
||||
if ( $last_sent_week === false || ( (int) $current_week !== (int) $last_sent_week ) ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace WPMailSMTP;
|
||||
|
||||
use WP_Error;
|
||||
use WP_Filesystem_Direct;
|
||||
|
||||
/**
|
||||
* WPMailSMTP uploads.
|
||||
@@ -11,6 +12,13 @@ use WP_Error;
|
||||
*/
|
||||
class Uploads {
|
||||
|
||||
/**
|
||||
* Uploads dir name.
|
||||
*
|
||||
* @since 4.1.1
|
||||
*/
|
||||
const ROOT_FOLDER_NAME = 'wp-mail-smtp';
|
||||
|
||||
/**
|
||||
* Get WPMailSMTP upload root path (e.g. /wp-content/uploads/wp-mail-smtp).
|
||||
*
|
||||
@@ -26,7 +34,7 @@ class Uploads {
|
||||
return new WP_Error( 'wp_upload_dir_error', $upload_dir['error'] );
|
||||
}
|
||||
|
||||
$dir = 'wp-mail-smtp';
|
||||
$dir = self::ROOT_FOLDER_NAME;
|
||||
|
||||
$upload_root = trailingslashit( realpath( $upload_dir['basedir'] ) ) . $dir;
|
||||
|
||||
@@ -196,4 +204,34 @@ class Uploads {
|
||||
// Create empty index.html.
|
||||
return file_put_contents( $index_file, '' ); // phpcs:ignore WordPress.WP.AlternativeFunctions
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete the WPMailSMTP uploads directory.
|
||||
*
|
||||
* @since 4.1.1
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function delete_upload_dir() {
|
||||
|
||||
// Get the upload dir.
|
||||
$upload_dir = self::upload_dir();
|
||||
|
||||
// If there is an error, return.
|
||||
if ( is_wp_error( $upload_dir ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$upload_root = $upload_dir['path'];
|
||||
|
||||
// Get WP Filesystembase files.
|
||||
require_once ABSPATH . 'wp-admin/includes/class-wp-filesystem-base.php';
|
||||
require_once ABSPATH . 'wp-admin/includes/class-wp-filesystem-direct.php';
|
||||
|
||||
// Initialize WP_Filesystem_Direct.
|
||||
$wp_filesystem = new WP_Filesystem_Direct( false );
|
||||
|
||||
// Delete the directory.
|
||||
$wp_filesystem->delete( $upload_root, true );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -345,8 +345,8 @@ class WP {
|
||||
$locale['']['plural_forms'] = $translations->headers['Plural-Forms'];
|
||||
}
|
||||
|
||||
foreach ( $translations->entries as $msgid => $entry ) {
|
||||
$locale[ $msgid ] = $entry->translations;
|
||||
foreach ( $translations->entries as $entry ) {
|
||||
$locale[ $entry->singular ] = $entry->translations;
|
||||
}
|
||||
|
||||
return $locale;
|
||||
|
||||
@@ -165,6 +165,9 @@ if ( is_multisite() ) {
|
||||
$meta_table = \WPMailSMTP\Tasks\Meta::get_table_name();
|
||||
$wpdb->query( "DROP TABLE IF EXISTS $meta_table;" ); // phpcs:ignore WordPress.DB
|
||||
|
||||
// Delete current sub-site wp-mail-smtp uploads folder.
|
||||
\WPMailSMTP\Uploads::delete_upload_dir();
|
||||
|
||||
// Restore the current network site back to the original one.
|
||||
restore_current_blog();
|
||||
}
|
||||
@@ -253,5 +256,8 @@ if ( is_multisite() ) {
|
||||
|
||||
$meta_table = \WPMailSMTP\Tasks\Meta::get_table_name();
|
||||
$wpdb->query( "DROP TABLE IF EXISTS $meta_table;" ); // phpcs:ignore WordPress.DB
|
||||
|
||||
// Delete wp-mail-smtp uploads folder.
|
||||
\WPMailSMTP\Uploads::delete_upload_dir();
|
||||
}
|
||||
//phpcs:enable WPForms.Formatting.EmptyLineAfterAssigmentVariables.AddEmptyLine, WPForms.PHP.BackSlash.UseShortSyntax
|
||||
|
||||
@@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) {
|
||||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInitea20e5ba29b28036ad195e4916a7fbdc::getLoader();
|
||||
return ComposerAutoloaderInit473736c55a35b9a077f93cfc42f4bbf5::getLoader();
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
// autoload_real.php @generated by Composer
|
||||
|
||||
class ComposerAutoloaderInitea20e5ba29b28036ad195e4916a7fbdc
|
||||
class ComposerAutoloaderInit473736c55a35b9a077f93cfc42f4bbf5
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
@@ -22,17 +22,17 @@ class ComposerAutoloaderInitea20e5ba29b28036ad195e4916a7fbdc
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInitea20e5ba29b28036ad195e4916a7fbdc', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInit473736c55a35b9a077f93cfc42f4bbf5', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInitea20e5ba29b28036ad195e4916a7fbdc', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit473736c55a35b9a077f93cfc42f4bbf5', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInitea20e5ba29b28036ad195e4916a7fbdc::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit473736c55a35b9a077f93cfc42f4bbf5::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInitea20e5ba29b28036ad195e4916a7fbdc::$files;
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInit473736c55a35b9a077f93cfc42f4bbf5::$files;
|
||||
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
|
||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
class ComposerStaticInitea20e5ba29b28036ad195e4916a7fbdc
|
||||
class ComposerStaticInit473736c55a35b9a077f93cfc42f4bbf5
|
||||
{
|
||||
public static $files = array (
|
||||
'2bb094e40611cb5eccea789f32aff634' => __DIR__ . '/../..' . '/vendor_prefixed/symfony/polyfill-mbstring/bootstrap.php',
|
||||
@@ -860,9 +860,9 @@ class ComposerStaticInitea20e5ba29b28036ad195e4916a7fbdc
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInitea20e5ba29b28036ad195e4916a7fbdc::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInitea20e5ba29b28036ad195e4916a7fbdc::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInitea20e5ba29b28036ad195e4916a7fbdc::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit473736c55a35b9a077f93cfc42f4bbf5::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit473736c55a35b9a077f93cfc42f4bbf5::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit473736c55a35b9a077f93cfc42f4bbf5::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php return array(
|
||||
'root' => array(
|
||||
'name' => 'awesomemotive/wp-mail-smtp',
|
||||
'pretty_version' => 'dev-4.1.0-release',
|
||||
'version' => 'dev-4.1.0-release',
|
||||
'reference' => 'b9a0881c73b14ba7a3944f70abecda295d994fe6',
|
||||
'pretty_version' => 'dev-4.1.1-release',
|
||||
'version' => 'dev-4.1.1-release',
|
||||
'reference' => 'd3b1c1541a4a598d6e2b0c715bdf3927ea2db1c9',
|
||||
'type' => 'wordpress-plugin',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
@@ -11,9 +11,9 @@
|
||||
),
|
||||
'versions' => array(
|
||||
'awesomemotive/wp-mail-smtp' => array(
|
||||
'pretty_version' => 'dev-4.1.0-release',
|
||||
'version' => 'dev-4.1.0-release',
|
||||
'reference' => 'b9a0881c73b14ba7a3944f70abecda295d994fe6',
|
||||
'pretty_version' => 'dev-4.1.1-release',
|
||||
'version' => 'dev-4.1.1-release',
|
||||
'reference' => 'd3b1c1541a4a598d6e2b0c715bdf3927ea2db1c9',
|
||||
'type' => 'wordpress-plugin',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
|
||||
@@ -0,0 +1,185 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
/*
|
||||
* This file is part of the Monolog package.
|
||||
*
|
||||
* (c) Jordi Boggiano <j.boggiano@seld.be>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace WPMailSMTP\Vendor\Monolog\Handler;
|
||||
|
||||
use WPMailSMTP\Vendor\Elastic\Elasticsearch\Response\Elasticsearch;
|
||||
use Throwable;
|
||||
use RuntimeException;
|
||||
use WPMailSMTP\Vendor\Monolog\Logger;
|
||||
use WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface;
|
||||
use WPMailSMTP\Vendor\Monolog\Formatter\ElasticsearchFormatter;
|
||||
use InvalidArgumentException;
|
||||
use WPMailSMTP\Vendor\Elasticsearch\Common\Exceptions\RuntimeException as ElasticsearchRuntimeException;
|
||||
use WPMailSMTP\Vendor\Elasticsearch\Client;
|
||||
use WPMailSMTP\Vendor\Elastic\Elasticsearch\Exception\InvalidArgumentException as ElasticInvalidArgumentException;
|
||||
use WPMailSMTP\Vendor\Elastic\Elasticsearch\Client as Client8;
|
||||
/**
|
||||
* Elasticsearch handler
|
||||
*
|
||||
* @link https://www.elastic.co/guide/en/elasticsearch/client/php-api/current/index.html
|
||||
*
|
||||
* Simple usage example:
|
||||
*
|
||||
* $client = \Elasticsearch\ClientBuilder::create()
|
||||
* ->setHosts($hosts)
|
||||
* ->build();
|
||||
*
|
||||
* $options = array(
|
||||
* 'index' => 'elastic_index_name',
|
||||
* 'type' => 'elastic_doc_type',
|
||||
* );
|
||||
* $handler = new ElasticsearchHandler($client, $options);
|
||||
* $log = new Logger('application');
|
||||
* $log->pushHandler($handler);
|
||||
*
|
||||
* @author Avtandil Kikabidze <akalongman@gmail.com>
|
||||
*/
|
||||
class ElasticsearchHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProcessingHandler
|
||||
{
|
||||
/**
|
||||
* @var Client|Client8
|
||||
*/
|
||||
protected $client;
|
||||
/**
|
||||
* @var mixed[] Handler config options
|
||||
*/
|
||||
protected $options = [];
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
private $needsType;
|
||||
/**
|
||||
* @param Client|Client8 $client Elasticsearch Client object
|
||||
* @param mixed[] $options Handler configuration
|
||||
*/
|
||||
public function __construct($client, array $options = [], $level = \WPMailSMTP\Vendor\Monolog\Logger::DEBUG, bool $bubble = \true)
|
||||
{
|
||||
if (!$client instanceof \WPMailSMTP\Vendor\Elasticsearch\Client && !$client instanceof \WPMailSMTP\Vendor\Elastic\Elasticsearch\Client) {
|
||||
throw new \TypeError('Elasticsearch\\Client or Elastic\\Elasticsearch\\Client instance required');
|
||||
}
|
||||
parent::__construct($level, $bubble);
|
||||
$this->client = $client;
|
||||
$this->options = \array_merge([
|
||||
'index' => 'monolog',
|
||||
// Elastic index name
|
||||
'type' => '_doc',
|
||||
// Elastic document type
|
||||
'ignore_error' => \false,
|
||||
], $options);
|
||||
if ($client instanceof \WPMailSMTP\Vendor\Elastic\Elasticsearch\Client || $client::VERSION[0] === '7') {
|
||||
$this->needsType = \false;
|
||||
// force the type to _doc for ES8/ES7
|
||||
$this->options['type'] = '_doc';
|
||||
} else {
|
||||
$this->needsType = \true;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
protected function write(array $record) : void
|
||||
{
|
||||
$this->bulkSend([$record['formatted']]);
|
||||
}
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function setFormatter(\WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface $formatter) : \WPMailSMTP\Vendor\Monolog\Handler\HandlerInterface
|
||||
{
|
||||
if ($formatter instanceof \WPMailSMTP\Vendor\Monolog\Formatter\ElasticsearchFormatter) {
|
||||
return parent::setFormatter($formatter);
|
||||
}
|
||||
throw new \InvalidArgumentException('ElasticsearchHandler is only compatible with ElasticsearchFormatter');
|
||||
}
|
||||
/**
|
||||
* Getter options
|
||||
*
|
||||
* @return mixed[]
|
||||
*/
|
||||
public function getOptions() : array
|
||||
{
|
||||
return $this->options;
|
||||
}
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
protected function getDefaultFormatter() : \WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface
|
||||
{
|
||||
return new \WPMailSMTP\Vendor\Monolog\Formatter\ElasticsearchFormatter($this->options['index'], $this->options['type']);
|
||||
}
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function handleBatch(array $records) : void
|
||||
{
|
||||
$documents = $this->getFormatter()->formatBatch($records);
|
||||
$this->bulkSend($documents);
|
||||
}
|
||||
/**
|
||||
* Use Elasticsearch bulk API to send list of documents
|
||||
*
|
||||
* @param array[] $records Records + _index/_type keys
|
||||
* @throws \RuntimeException
|
||||
*/
|
||||
protected function bulkSend(array $records) : void
|
||||
{
|
||||
try {
|
||||
$params = ['body' => []];
|
||||
foreach ($records as $record) {
|
||||
$params['body'][] = ['index' => $this->needsType ? ['_index' => $record['_index'], '_type' => $record['_type']] : ['_index' => $record['_index']]];
|
||||
unset($record['_index'], $record['_type']);
|
||||
$params['body'][] = $record;
|
||||
}
|
||||
/** @var Elasticsearch */
|
||||
$responses = $this->client->bulk($params);
|
||||
if ($responses['errors'] === \true) {
|
||||
throw $this->createExceptionFromResponses($responses);
|
||||
}
|
||||
} catch (\Throwable $e) {
|
||||
if (!$this->options['ignore_error']) {
|
||||
throw new \RuntimeException('Error sending messages to Elasticsearch', 0, $e);
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Creates elasticsearch exception from responses array
|
||||
*
|
||||
* Only the first error is converted into an exception.
|
||||
*
|
||||
* @param mixed[]|Elasticsearch $responses returned by $this->client->bulk()
|
||||
*/
|
||||
protected function createExceptionFromResponses($responses) : \Throwable
|
||||
{
|
||||
foreach ($responses['items'] ?? [] as $item) {
|
||||
if (isset($item['index']['error'])) {
|
||||
return $this->createExceptionFromError($item['index']['error']);
|
||||
}
|
||||
}
|
||||
if (\class_exists(\WPMailSMTP\Vendor\Elastic\Elasticsearch\Exception\InvalidArgumentException::class)) {
|
||||
return new \WPMailSMTP\Vendor\Elastic\Elasticsearch\Exception\InvalidArgumentException('Elasticsearch failed to index one or more records.');
|
||||
}
|
||||
return new \WPMailSMTP\Vendor\Elasticsearch\Common\Exceptions\RuntimeException('Elasticsearch failed to index one or more records.');
|
||||
}
|
||||
/**
|
||||
* Creates elasticsearch exception from error array
|
||||
*
|
||||
* @param mixed[] $error
|
||||
*/
|
||||
protected function createExceptionFromError(array $error) : \Throwable
|
||||
{
|
||||
$previous = isset($error['caused_by']) ? $this->createExceptionFromError($error['caused_by']) : null;
|
||||
if (\class_exists(\WPMailSMTP\Vendor\Elastic\Elasticsearch\Exception\InvalidArgumentException::class)) {
|
||||
return new \WPMailSMTP\Vendor\Elastic\Elasticsearch\Exception\InvalidArgumentException($error['type'] . ': ' . $error['reason'], 0, $previous);
|
||||
}
|
||||
return new \WPMailSMTP\Vendor\Elasticsearch\Common\Exceptions\RuntimeException($error['type'] . ': ' . $error['reason'], 0, $previous);
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
* Plugin Name: WP Mail SMTP
|
||||
* Version: 4.1.0
|
||||
* Version: 4.1.1
|
||||
* Requires at least: 5.5
|
||||
* Requires PHP: 7.2
|
||||
* Plugin URI: https://wpmailsmtp.com/
|
||||
@@ -253,7 +253,7 @@ if ( ! defined( 'WPMS_PLUGIN_VER' ) ) {
|
||||
*
|
||||
* @since 0.11.1
|
||||
*/
|
||||
define( 'WPMS_PLUGIN_VER', '4.1.0' );
|
||||
define( 'WPMS_PLUGIN_VER', '4.1.1' );
|
||||
}
|
||||
if ( ! defined( 'WPMS_PHP_VER' ) ) {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user