plugin updates
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -0,0 +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 161 40" 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;"><path d="M156.887,14.801l-0,15.361l-3.84,0l0,-15.361l-2.616,0l0,-3.823l2.635,-0l-0.015,-6l3.839,-0l0,6l4.11,-0l0,3.823l-4.113,0Zm-23.345,4.179c0.27,-1.867 1.377,-3.512 3.006,-4.468c1.616,-0.909 3.591,-0.902 5.201,0.016c1.645,0.924 2.758,2.566 3.006,4.434l-11.213,-0l-0,0.018Zm14.238,-2.77c-0.735,-1.698 -1.937,-3.154 -3.465,-4.198c-1.519,-1.041 -3.324,-1.585 -5.166,-1.563c-1.752,0 -3.349,0.459 -4.827,1.359c-3.01,1.877 -4.827,5.185 -4.792,8.732c-0.035,3.547 1.782,6.855 4.792,8.732c2.525,1.592 5.676,1.827 8.411,0.629c1.123,-0.481 2.145,-1.173 3.007,-2.037c0.877,-0.868 1.588,-1.887 2.106,-3.006l-4.553,-0c-0.409,0.474 -0.883,0.883 -1.427,1.207c-2.469,1.412 -5.61,0.695 -7.223,-1.648c-0.51,-0.758 -0.849,-1.616 -1.004,-2.515l14.987,-0c0.23,-1.937 -0.066,-3.903 -0.846,-5.692Zm-21.206,-9.94c-0,1.126 -0.912,2.038 -2.038,2.038c-1.126,-0 -2.038,-0.912 -2.038,-2.038c0,-1.126 0.912,-2.037 2.038,-2.037c1.126,-0 2.038,0.911 2.038,2.037m-8.327,33.423l-0,-3.823c1.544,0.009 2.981,-0.79 3.789,-2.107c0.39,-0.645 0.579,-1.359 0.579,-2.142l-0,-20.628l3.839,0l0,20.644c-0.003,2.167 -0.877,4.239 -2.424,5.758c-1.547,1.515 -3.635,2.352 -5.802,2.314m-4.245,-9.581l3.824,-0l-0,-28.716l-3.805,-0l-0,28.716l-0.019,-0Zm-4.673,-23.858c0,1.126 -0.912,2.038 -2.037,2.038c-1.126,-0 -2.038,-0.912 -2.038,-2.038c-0,-1.126 0.912,-2.037 2.038,-2.037c1.125,-0 2.037,0.911 2.037,2.037m-3.978,23.873l3.84,0l-0,-19.15l-3.84,0l0,19.15Zm-14.713,-3.21c1.06,0.025 2.101,-0.271 2.991,-0.849c0.883,-0.579 1.547,-1.359 2.037,-2.311c0.475,-0.969 0.714,-2.038 0.714,-3.211c0,-1.189 -0.239,-2.261 -0.714,-3.229c-0.456,-0.944 -1.16,-1.742 -2.037,-2.312c-1.881,-1.141 -4.239,-1.141 -6.117,0c-1.937,1.167 -3.11,3.277 -3.075,5.541c-0.003,2.264 1.186,4.362 3.126,5.522c0.949,0.575 1.971,0.849 3.075,0.849Zm9.924,-15.94l0,19.15l-3.874,0l0,-2.921c-1.273,2.157 -3.613,3.456 -6.116,3.399c-5.547,-0.053 -10.037,-4.528 -10.11,-10.075c0.048,-5.565 4.547,-10.065 10.11,-10.109c2.513,-0.051 4.852,1.261 6.116,3.434l0,-2.89l3.859,-0l0.015,0.012Zm-52.429,0l3.865,0l0,2.208c0.409,-0.579 0.849,-1.019 1.274,-1.378c0.902,-0.729 2.034,-1.116 3.194,-1.088c1.412,0 2.667,0.324 3.774,0.969c1.104,0.629 2.038,1.528 2.786,2.685c1.368,-2.301 3.865,-3.694 6.541,-3.654c1.597,0 3.025,0.409 4.298,1.224c1.267,0.811 2.289,1.949 2.956,3.295c0.698,1.377 1.053,2.89 1.053,4.538l0,10.348l-3.839,0l-0,-10.348c-0,-0.969 -0.17,-1.852 -0.544,-2.635c-0.343,-0.761 -0.89,-1.415 -1.582,-1.887c-0.698,-0.469 -1.522,-0.714 -2.361,-0.698c-0.884,-0 -1.667,0.22 -2.381,0.679c-0.698,0.475 -1.257,1.104 -1.647,1.902c-0.39,0.799 -0.579,1.683 -0.579,2.636l-0,10.348l-3.839,0l-0,-10.348c0.006,-0.912 -0.199,-1.815 -0.595,-2.636c-0.377,-0.767 -0.953,-1.418 -1.666,-1.886c-0.705,-0.466 -1.535,-0.708 -2.381,-0.698c-0.849,-0 -1.613,0.239 -2.276,0.729c-0.68,0.494 -1.224,1.154 -1.614,1.972c-0.39,0.839 -0.588,1.758 -0.578,2.685l-0,10.179l-3.859,0l0,-19.141Z" style="fill:#131b20;fill-rule:nonzero;"/><path d="M0,15.26l14.547,6.591l2.921,-2.905l-7.443,-3.381l23.074,-8.836l-8.867,22.974l-3.365,-7.377l-2.94,2.925l0.154,0.339l6.44,14.119l15.342,-39.709l-39.863,15.26Z" style="fill:#9585f4;fill-rule:nonzero;"/></svg>
|
||||
|
After Width: | Height: | Size: 3.5 KiB |
@@ -151,13 +151,12 @@ $generated_i18n_strings = array(
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepPluginFeatures.vue:15
|
||||
__( '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
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepConfigureMailer.vue:15
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepPluginFeatures.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
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepConfigureMailer.vue:16
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepPluginFeatures.vue:17
|
||||
__( 'Previous Step', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepPluginFeatures.vue:214
|
||||
@@ -223,8 +222,7 @@ $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/AmazonSES.vue:18
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Mailgun.vue:16
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/SparkPost.vue:15
|
||||
__( 'Region', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Mailgun.vue:18
|
||||
@@ -239,58 +237,47 @@ $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/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
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/SMTP2GO.vue:16
|
||||
__( 'From Name', 'wp-mail-smtp' ),
|
||||
|
||||
// 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
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/SMTP2GO.vue:17
|
||||
__( 'Force From Name', 'wp-mail-smtp' ),
|
||||
|
||||
// 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
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Outlook.vue:23
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/SMTP2GO.vue:18
|
||||
__( 'From Email', 'wp-mail-smtp' ),
|
||||
|
||||
// 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
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Outlook.vue:25
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/SMTP2GO.vue:19
|
||||
__( 'Force From Email', 'wp-mail-smtp' ),
|
||||
|
||||
// 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
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/SMTP2GO.vue:20
|
||||
__( '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/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
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Outlook.vue:26
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/SMTP2GO.vue:21
|
||||
__( '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/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
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/SMTP2GO.vue:22
|
||||
__( 'The name that emails are sent from.', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/AmazonSES.vue:28
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Mailgun.vue:30
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Outlook.vue:24
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/SMTP2GO.vue:23
|
||||
__( '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/Mailgun.vue:36
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/SparkPost.vue:31
|
||||
__( 'US', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Mailgun.vue:40
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/SparkPost.vue:35
|
||||
__( '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/Sendgrid.vue:13
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/SMTP2GO.vue:13
|
||||
__( 'API Key', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Sendgrid.vue:14
|
||||
@@ -324,10 +311,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/SettingsInputLongCheckbox.vue:20
|
||||
// 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
|
||||
__( 'This setting is already configured with the WP Mail SMTP constant. To change it, please edit or remove the <code></code> constant in your <code>wp-config.php</code> file.', 'wp-mail-smtp' ),
|
||||
|
||||
@@ -358,10 +343,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/WizardStepConfigurationFailure.vue:14
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepConfigurationSuccess.vue:23
|
||||
__( 'Send us Feedback', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepConfigurationFailure.vue:15
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepConfigurationSuccess.vue:24
|
||||
__( 'Finish Setup', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepImport.vue:12
|
||||
@@ -373,8 +358,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
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepLicense.vue:17
|
||||
__( 'Skip this Step', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepImport.vue:20
|
||||
@@ -472,7 +456,7 @@ $generated_i18n_strings = array(
|
||||
// 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/Gmail.vue:20
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Outlook.vue:18
|
||||
__( 'Authorization', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Zoho.vue:26
|
||||
@@ -505,7 +489,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/Sendinblue.vue:29
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/SmtpCom.vue:29
|
||||
__( 'Transparency and Disclosure', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/SmtpCom.vue:31
|
||||
@@ -530,7 +514,7 @@ $generated_i18n_strings = array(
|
||||
__( 'Upgrade to Unlock Powerful SMTP Features', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepConfigurationSuccess.vue:17
|
||||
__( 'Upgrade to WP Mail SMTP Pro to unlock more awesome features and experience why WP Mail SMTP is used by over 3,000,000 websites.', 'wp-mail-smtp' ),
|
||||
__( 'Upgrade to WP Mail SMTP Pro to unlock more awesome features and experience why WP Mail SMTP is used by over 4,000,000 websites.', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepConfigurationSuccess.vue:21
|
||||
__( 'Upgrade to Pro Today', 'wp-mail-smtp' ),
|
||||
@@ -644,26 +628,26 @@ $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/AmazonSES.vue:31
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Outlook.vue:21
|
||||
__( 'WPBeginner\'s tutorial on how to set up SSL', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/AmazonSES.vue:32
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Outlook.vue:22
|
||||
__( '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
|
||||
__( 'Choose Your SMTP Mailer', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepChooseMailer.vue:147
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepChooseMailer.vue:154
|
||||
__( 'Mailer', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepChooseMailer.vue:15
|
||||
/* Translators: Link to the SMTP Mailer docs page. */
|
||||
__( 'Which mailer would you like to use to send emails? Not sure which mailer to choose? Check out our %1$scomplete mailer guide%2$s for details on each option.', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepChooseMailer.vue:157
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepChooseMailer.vue:164
|
||||
__( 'I Understand, Continue', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepChooseMailer.vue:158
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepChooseMailer.vue:165
|
||||
__( 'Choose a Different Mailer', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepChooseMailer.vue:18
|
||||
@@ -672,10 +656,10 @@ $generated_i18n_strings = array(
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepChooseMailer.vue:19
|
||||
__( 'Your mailer is already configured in a WP Mail SMTP constant, so the options below have been disabled. To change your mailer, please edit or remove the <code>WPMS_MAILER</code> constant in your <code>wp-config.php</code> file.', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepChooseMailer.vue:202
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepChooseMailer.vue:209
|
||||
__( 'is a PRO Feature', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepChooseMailer.vue:71
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepChooseMailer.vue:78
|
||||
__( 'Microsoft 365 / Outlook', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepLicense.vue:105
|
||||
@@ -720,13 +704,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/configure-mailer/Gmail.vue:44
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepLicense.vue:28
|
||||
__( '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/configure-mailer/Gmail.vue:45
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepLicense.vue:29
|
||||
__( '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
|
||||
@@ -735,16 +719,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/configure-mailer/Gmail.vue:43
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepLicense.vue:39
|
||||
__( 'License key input', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Gmail.vue:42
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepLicense.vue:40
|
||||
__( 'Paste your license key here', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Gmail.vue:141
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepLicense.vue:76
|
||||
__( 'Successful Verification!', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Gmail.vue:151
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepLicense.vue:86
|
||||
__( 'Verification Error!', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Gmail.vue:19
|
||||
@@ -1010,11 +994,27 @@ $generated_i18n_strings = array(
|
||||
// Reference: src/modules/setup-wizard/components/steps/WizardStepPluginFeatures.vue:23
|
||||
__( 'Install the WPForms plugin and create beautiful contact forms with just a few clicks.', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Mailjet.vue:16
|
||||
__( 'Secret Key', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Mailjet.vue:17
|
||||
__( 'Follow this link to get an API key and Secret key from Mailjet: %1$sAPI Key Management%2$s.', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Mailjet.vue:26
|
||||
__( 'Read how to set up Mailjet', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/SMTP2GO.vue:15
|
||||
/* Translators: Link to the SMTP2GO API settings. */
|
||||
__( 'Generate an API key on the Sending → API Keys page in your %1$scontrol panel%2$s.', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/SMTP2GO.vue:24
|
||||
__( 'Read how to set up SMTP2GO', 'wp-mail-smtp' )
|
||||
__( 'Read how to set up SMTP2GO', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Mailjet.vue:15
|
||||
/* Translators: Link to the SMTP2GO API settings. */
|
||||
__( 'Follow this link to get the API key from Mailjet: %1$sAPI Key Management%2$s.', 'wp-mail-smtp' ),
|
||||
|
||||
// Reference: src/modules/setup-wizard/components/steps/configure-mailer/Mailjet.vue:17
|
||||
__( 'Follow this link to get the Secret key from Mailjet: %1$sAPI Key Management%2$s.', 'wp-mail-smtp' )
|
||||
);
|
||||
/* THIS IS THE END OF THE GENERATED FILE */
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +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 32" 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><path d="M0.137,12.343l11.627,5.269l2.335,-2.323l-5.949,-2.702l18.444,-7.063l-7.088,18.364l-2.69,-5.897l-2.35,2.338l0.123,0.271l5.148,11.285l12.263,-31.74l-31.863,12.198Z" style="fill:#9585f4;fill-rule:nonzero;"/></g></svg>
|
||||
|
After Width: | Height: | Size: 666 B |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -3,7 +3,7 @@ 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.1
|
||||
Stable tag: 4.2.0
|
||||
Requires PHP: 7.2
|
||||
License: GNU General Public License v3.0 or later
|
||||
|
||||
@@ -54,14 +54,15 @@ WP Mail SMTP plugin includes many different SMTP mailers:
|
||||
3. Brevo (formerly Sendinblue) SMTP <strong>(Recommended)</strong>
|
||||
4. Gmail SMTP (Gmail, Google Workspace, G Suite)
|
||||
5. Mailgun SMTP
|
||||
6. SendGrid SMTP
|
||||
7. Postmark SMTP
|
||||
8. SparkPost SMTP
|
||||
9. SMTP2GO
|
||||
10. Microsoft SMTP (Outlook.com and Office 365) [[Pro]](https://wpmailsmtp.com/?utm_source=wprepo&utm_medium=link&utm_campaign=liteplugin&utm_content=readme)
|
||||
11. Amazon SES SMTP [[Pro]](https://wpmailsmtp.com/?utm_source=wprepo&utm_medium=link&utm_campaign=liteplugin&utm_content=readme)
|
||||
12. Zoho Mail SMTP [[Pro]](https://wpmailsmtp.com/?utm_source=wprepo&utm_medium=link&utm_campaign=liteplugin&utm_content=readme)
|
||||
13. Other SMTP
|
||||
6. Mailjet SMTP
|
||||
7. SendGrid SMTP
|
||||
8. Postmark SMTP
|
||||
9. SparkPost SMTP
|
||||
10. SMTP2GO
|
||||
11. Microsoft SMTP (Outlook.com and Office 365) [[Pro]](https://wpmailsmtp.com/?utm_source=wprepo&utm_medium=link&utm_campaign=liteplugin&utm_content=readme)
|
||||
12. Amazon SES SMTP [[Pro]](https://wpmailsmtp.com/?utm_source=wprepo&utm_medium=link&utm_campaign=liteplugin&utm_content=readme)
|
||||
13. Zoho Mail SMTP [[Pro]](https://wpmailsmtp.com/?utm_source=wprepo&utm_medium=link&utm_campaign=liteplugin&utm_content=readme)
|
||||
14. Other SMTP
|
||||
|
||||
For most options, you can specify the "from name" and "email address" for outgoing emails too.
|
||||
|
||||
@@ -137,7 +138,7 @@ Get statistics about WordPress emails, including how many emails are being sent
|
||||
|
||||
### Email Alerts
|
||||
|
||||
If your emails stop sending, get notified instantly via Slack, Microsoft Teams, SMS/ Twilio, webhooks, or email (via secure API).
|
||||
If your emails stop sending, get notified instantly via Slack, Microsoft Teams, Discord, SMS/ Twilio, webhooks, or email (via secure API).
|
||||
|
||||
In combination with our email logging and resending features, Email Alerts ensure that no important email will ever be lost.
|
||||
|
||||
@@ -198,7 +199,7 @@ You can try the [free version of WPForms plugin](https://wordpress.org/plugins/w
|
||||
1. Install WP Mail SMTP by WPForms either via the WordPress.org plugin repository or by uploading the files to your server. (See instructions on [how to install a WordPress plugin](http://www.wpbeginner.com/beginners-guide/step-by-step-guide-to-install-a-wordpress-plugin-for-beginners/))
|
||||
2. Activate WP Mail SMTP by WPForms.
|
||||
3. Navigate to the Settings area of WP Mail SMTP in the WordPress admin.
|
||||
4. Choose your SMTP option (SendLayer, SMTP.com, Brevo (formerly Sendinblue), Gmail SMTP, Mailgun SMTP, SendGrid SMTP, Postmark, SparkPost, SMTP2GO, or Other SMTP) and follow the instructions to set it up.
|
||||
4. Choose your SMTP option (SendLayer, SMTP.com, Brevo (formerly Sendinblue), Gmail SMTP, Mailgun SMTP, Mailjet, SendGrid SMTP, Postmark, SparkPost, SMTP2GO, or Other SMTP) and follow the instructions to set it up.
|
||||
5. Need more help? Get support with [WP Mail SMTP PRO](https://wpmailsmtp.com/?utm_source=wprepo&utm_medium=link&utm_campaign=liteplugin&utm_content=readme).
|
||||
|
||||
== Frequently Asked Questions ==
|
||||
@@ -254,6 +255,14 @@ WP Mail SMTP plugin offers a native integration with MailGun. All you have to do
|
||||
|
||||
Read our [Mailgun documentation](https://wpmailsmtp.com/docs/how-to-set-up-the-mailgun-mailer-in-wp-mail-smtp/?utm_source=wprepo&utm_medium=link&utm_campaign=liteplugin&utm_content=readme) for more details.
|
||||
|
||||
**Mailjet SMTP**
|
||||
|
||||
Mailjet is a global email sending service that allows you to design, send, and track marketing and transactional emails. They provide 6,000 free emails per month (up to 200 emails per day).
|
||||
|
||||
WP Mail SMTP plugin offers seamless integration with Mailjet. By connecting your Mailjet account, you can enhance your email deliverability and ensure your WordPress emails reach your recipients' inboxes.
|
||||
|
||||
Read our [Mailjet documentation](https://wpmailsmtp.com/docs/how-to-set-up-the-mailjet-mailer-in-wp-mail-smtp/?utm_source=wprepo&utm_medium=link&utm_campaign=liteplugin&utm_content=readme) for more details.
|
||||
|
||||
**SendGrid SMTP**
|
||||
|
||||
SendGrid has a free SMTP plan that you can use to send up to 100 emails per day. With our native SendGrid SMTP integration, you can easily and securely set up SendGrid SMTP on your WordPress site.
|
||||
@@ -393,6 +402,11 @@ By all means please contact us to discuss features or options you'd like to see
|
||||
|
||||
== Changelog ==
|
||||
|
||||
= 4.2.0 - 2024-11-06 =
|
||||
- Added: New transactional mailer: Mailjet integration.
|
||||
- Changed: Improved security for sensitive data (API keys).
|
||||
- Fixed: SMTP2GO mailer special characters handling in from name.
|
||||
|
||||
= 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.
|
||||
|
||||
@@ -479,7 +479,7 @@ class AboutTab extends PageAbstract {
|
||||
'wp-charitable' => [
|
||||
'path' => 'charitable/charitable.php',
|
||||
'icon' => wp_mail_smtp()->assets_url . '/images/about/plugin-charitable.png',
|
||||
'name' => esc_html__( 'WP Charitable', 'wp-mail-smtp' ),
|
||||
'name' => esc_html__( 'Charitable', 'wp-mail-smtp' ),
|
||||
'desc' => esc_html__( 'Top-rated WordPress donation and fundraising plugin. Over 10,000+ non-profit organizations and website owners use Charitable to create fundraising campaigns and raise more money online.', 'wp-mail-smtp' ),
|
||||
'url' => 'https://downloads.wordpress.org/plugin/charitable.zip',
|
||||
],
|
||||
|
||||
@@ -187,6 +187,35 @@ class AlertsTab extends PageAbstract {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="wp-mail-smtp-setting-row wp-mail-smtp-setting-row-alert">
|
||||
<div class="wp-mail-smtp-setting-row wp-mail-smtp-setting-row-content section-heading">
|
||||
<div class="wp-mail-smtp-setting-field">
|
||||
<h3><?php esc_html_e( 'Discord', 'wp-mail-smtp' ); ?></h3>
|
||||
<p class="desc"><?php esc_html_e( 'Paste in the Discord webhook URL you’d like to use to receive alerts when email sending fails. Read our documentation on setting up Discord alerts.', 'wp-mail-smtp' ); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wp-mail-smtp-setting-row wp-mail-smtp-setting-row-checkbox-toggle">
|
||||
<div class="wp-mail-smtp-setting-label">
|
||||
<label><?php esc_html_e( 'Discord Alerts', 'wp-mail-smtp' ); ?></label>
|
||||
</div>
|
||||
<div class="wp-mail-smtp-setting-field">
|
||||
<?php
|
||||
UI::toggle();
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wp-mail-smtp-setting-row wp-mail-smtp-setting-row-alert-options">
|
||||
<div class="wp-mail-smtp-setting-row wp-mail-smtp-setting-row-alert-connection-options">
|
||||
<div class="wp-mail-smtp-setting-row wp-mail-smtp-setting-row-text">
|
||||
<div class="wp-mail-smtp-setting-label">
|
||||
<label><?php esc_html_e( 'Webhook URL', 'wp-mail-smtp' ); ?></label>
|
||||
</div>
|
||||
<div class="wp-mail-smtp-setting-field"><input type="text"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="wp-mail-smtp-setting-row wp-mail-smtp-setting-row-alert">
|
||||
<div class="wp-mail-smtp-setting-row wp-mail-smtp-setting-row-content section-heading">
|
||||
<div class="wp-mail-smtp-setting-field">
|
||||
|
||||
@@ -248,7 +248,7 @@ class SettingsTab extends PageAbstract {
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<?php esc_html_e( 'We know that you will truly love WP Mail SMTP. It\'s used by over 3,000,000 websites.', 'wp-mail-smtp' ); ?>
|
||||
<?php esc_html_e( 'We know that you will truly love WP Mail SMTP. It\'s used by over 4,000,000 websites.', 'wp-mail-smtp' ); ?>
|
||||
</p>
|
||||
|
||||
<p><strong><?php esc_html_e( 'Pro Features:', 'wp-mail-smtp' ); ?></strong></p>
|
||||
|
||||
@@ -991,7 +991,7 @@ Co-Founder, WP Mail SMTP';
|
||||
],
|
||||
]
|
||||
),
|
||||
'https://app.mailgun.com/app/sending/domains'
|
||||
'https://app.mailgun.com/mg/sending/domains'
|
||||
),
|
||||
esc_html__( 'Verify your domain Region is correct.', 'wp-mail-smtp' ),
|
||||
],
|
||||
|
||||
@@ -32,6 +32,7 @@ class Helpers {
|
||||
'postmark',
|
||||
'sparkpost',
|
||||
'smtp2go',
|
||||
'mailjet',
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
@@ -28,7 +28,7 @@ class Options {
|
||||
* @var array Map of all the default options of the plugin.
|
||||
*/
|
||||
private static $map = [
|
||||
'mail' => [
|
||||
'mail' => [
|
||||
'from_name',
|
||||
'from_email',
|
||||
'mailer',
|
||||
@@ -36,7 +36,7 @@ class Options {
|
||||
'from_name_force',
|
||||
'from_email_force',
|
||||
],
|
||||
'smtp' => [
|
||||
'smtp' => [
|
||||
'host',
|
||||
'port',
|
||||
'encryption',
|
||||
@@ -45,60 +45,64 @@ class Options {
|
||||
'user',
|
||||
'pass',
|
||||
],
|
||||
'gmail' => [
|
||||
'gmail' => [
|
||||
'one_click_setup_enabled',
|
||||
'client_id',
|
||||
'client_secret',
|
||||
],
|
||||
'outlook' => [
|
||||
'outlook' => [
|
||||
'client_id',
|
||||
'client_secret',
|
||||
],
|
||||
'zoho' => [
|
||||
'zoho' => [
|
||||
'domain',
|
||||
'client_id',
|
||||
'client_secret',
|
||||
],
|
||||
'amazonses' => [
|
||||
'amazonses' => [
|
||||
'client_id',
|
||||
'client_secret',
|
||||
'region',
|
||||
],
|
||||
'mailgun' => [
|
||||
'mailgun' => [
|
||||
'api_key',
|
||||
'domain',
|
||||
'region',
|
||||
],
|
||||
'sendgrid' => [
|
||||
'mailjet' => [
|
||||
'api_key',
|
||||
'secret_key',
|
||||
],
|
||||
'sendgrid' => [
|
||||
'api_key',
|
||||
'domain',
|
||||
],
|
||||
'sparkpost' => [
|
||||
'sparkpost' => [
|
||||
'api_key',
|
||||
'region',
|
||||
],
|
||||
'postmark' => [
|
||||
'postmark' => [
|
||||
'server_api_token',
|
||||
'message_stream',
|
||||
],
|
||||
'smtpcom' => [
|
||||
'smtpcom' => [
|
||||
'api_key',
|
||||
'channel',
|
||||
],
|
||||
'sendinblue' => [
|
||||
'sendinblue' => [
|
||||
'api_key',
|
||||
'domain',
|
||||
],
|
||||
'sendlayer' => [
|
||||
'sendlayer' => [
|
||||
'api_key',
|
||||
],
|
||||
'smtp2go' => [
|
||||
'smtp2go' => [
|
||||
'api_key',
|
||||
],
|
||||
'pepipostapi' => [
|
||||
'pepipostapi' => [
|
||||
'api_key',
|
||||
],
|
||||
'pepipost' => [
|
||||
'pepipost' => [
|
||||
'host',
|
||||
'port',
|
||||
'encryption',
|
||||
@@ -106,26 +110,30 @@ class Options {
|
||||
'user',
|
||||
'pass',
|
||||
],
|
||||
'license' => [
|
||||
'license' => [
|
||||
'key',
|
||||
],
|
||||
'alert_email' => [
|
||||
'alert_email' => [
|
||||
'enabled',
|
||||
'connections',
|
||||
],
|
||||
'alert_slack_webhook' => [
|
||||
'alert_slack_webhook' => [
|
||||
'enabled',
|
||||
'connections',
|
||||
],
|
||||
'alert_twilio_sms' => [
|
||||
'alert_discord_webhook' => [
|
||||
'enabled',
|
||||
'connections',
|
||||
],
|
||||
'alert_custom_webhook' => [
|
||||
'alert_twilio_sms' => [
|
||||
'enabled',
|
||||
'connections',
|
||||
],
|
||||
'alert_events' => [
|
||||
'alert_custom_webhook' => [
|
||||
'enabled',
|
||||
'connections',
|
||||
],
|
||||
'alert_events' => [
|
||||
'email_hard_bounced',
|
||||
],
|
||||
];
|
||||
@@ -144,6 +152,7 @@ class Options {
|
||||
'amazonses',
|
||||
'gmail',
|
||||
'mailgun',
|
||||
'mailjet',
|
||||
'outlook',
|
||||
'postmark',
|
||||
'sendgrid',
|
||||
@@ -319,7 +328,7 @@ class Options {
|
||||
* Get the values saved in DB.
|
||||
* If plugin is configured with constants right from the start - this will not have all the values.
|
||||
*/
|
||||
$options = isset( $this->options[ $group ] ) ? $this->options[ $group ] : array();
|
||||
$options = isset( $this->options[ $group ] ) ? $this->options[ $group ] : [];
|
||||
|
||||
// We need to process certain constants-aware options through actual constants.
|
||||
if ( isset( self::$map[ $group ] ) ) {
|
||||
@@ -439,7 +448,7 @@ class Options {
|
||||
break;
|
||||
|
||||
case 'encryption':
|
||||
$value = in_array( $group, array( 'smtp', 'pepipost' ), true ) ? 'none' : $value;
|
||||
$value = in_array( $group, [ 'smtp', 'pepipost' ], true ) ? 'none' : $value;
|
||||
break;
|
||||
|
||||
case 'region':
|
||||
@@ -448,7 +457,7 @@ class Options {
|
||||
|
||||
case 'auth':
|
||||
case 'autotls':
|
||||
$value = in_array( $group, array( 'smtp', 'pepipost' ), true ) ? false : true;
|
||||
$value = in_array( $group, [ 'smtp', 'pepipost' ], true ) ? false : true;
|
||||
break;
|
||||
|
||||
case 'pass':
|
||||
@@ -479,7 +488,7 @@ class Options {
|
||||
*
|
||||
* @param string $group
|
||||
* @param string $key
|
||||
* @param mixed $value
|
||||
* @param mixed $value
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
@@ -648,6 +657,20 @@ class Options {
|
||||
|
||||
break;
|
||||
|
||||
case 'mailjet':
|
||||
switch ( $key ) {
|
||||
case 'api_key':
|
||||
/** @noinspection PhpUndefinedConstantInspection */
|
||||
$return = $this->is_const_defined( $group, $key ) ? WPMS_MAILJET_API_KEY : $value;
|
||||
break;
|
||||
case 'secret_key':
|
||||
/** @noinspection PhpUndefinedConstantInspection */
|
||||
$return = $this->is_const_defined( $group, $key ) ? WPMS_MAILJET_SECRET_KEY : $value;
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 'sendgrid':
|
||||
switch ( $key ) {
|
||||
case 'api_key':
|
||||
@@ -754,6 +777,15 @@ class Options {
|
||||
|
||||
break;
|
||||
|
||||
case 'alert_discord_webhook':
|
||||
switch ( $key ) {
|
||||
case 'connections':
|
||||
$return = $this->is_const_defined( $group, $key ) ? [ [ 'webhook_url' => WPMS_ALERT_DISCORD_WEBHOOK_URL ] ] : $value;
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 'alert_teams_webhook':
|
||||
switch ( $key ) {
|
||||
case 'connections':
|
||||
@@ -1016,6 +1048,18 @@ class Options {
|
||||
|
||||
break;
|
||||
|
||||
case 'mailjet':
|
||||
switch ( $key ) {
|
||||
case 'api_key':
|
||||
$return = defined( 'WPMS_MAILJET_API_KEY' ) && WPMS_MAILJET_API_KEY;
|
||||
break;
|
||||
case 'secret_key':
|
||||
$return = defined( 'WPMS_MAILJET_SECRET_KEY' ) && WPMS_MAILJET_SECRET_KEY;
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 'sendgrid':
|
||||
switch ( $key ) {
|
||||
case 'api_key':
|
||||
@@ -1112,6 +1156,15 @@ class Options {
|
||||
|
||||
break;
|
||||
|
||||
case 'alert_discord_webhook':
|
||||
switch ( $key ) {
|
||||
case 'connections':
|
||||
$return = defined( 'WPMS_ALERT_DISCORD_WEBHOOK_URL' ) && WPMS_ALERT_DISCORD_WEBHOOK_URL;
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 'alert_teams_webhook':
|
||||
switch ( $key ) {
|
||||
case 'connections':
|
||||
@@ -1125,9 +1178,9 @@ class Options {
|
||||
switch ( $key ) {
|
||||
case 'connections':
|
||||
$return = defined( 'WPMS_ALERT_TWILIO_SMS_ACCOUNT_SID' ) && WPMS_ALERT_TWILIO_SMS_ACCOUNT_SID &&
|
||||
defined( 'WPMS_ALERT_TWILIO_SMS_AUTH_TOKEN' ) && WPMS_ALERT_TWILIO_SMS_AUTH_TOKEN &&
|
||||
defined( 'WPMS_ALERT_TWILIO_SMS_FROM_PHONE_NUMBER' ) && WPMS_ALERT_TWILIO_SMS_FROM_PHONE_NUMBER &&
|
||||
defined( 'WPMS_ALERT_TWILIO_SMS_TO_PHONE_NUMBER' ) && WPMS_ALERT_TWILIO_SMS_TO_PHONE_NUMBER;
|
||||
defined( 'WPMS_ALERT_TWILIO_SMS_AUTH_TOKEN' ) && WPMS_ALERT_TWILIO_SMS_AUTH_TOKEN &&
|
||||
defined( 'WPMS_ALERT_TWILIO_SMS_FROM_PHONE_NUMBER' ) && WPMS_ALERT_TWILIO_SMS_FROM_PHONE_NUMBER &&
|
||||
defined( 'WPMS_ALERT_TWILIO_SMS_TO_PHONE_NUMBER' ) && WPMS_ALERT_TWILIO_SMS_TO_PHONE_NUMBER;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1356,11 +1409,13 @@ class Options {
|
||||
if ( $mailer === 'smtp' && ! $this->is_const_defined( 'smtp', 'pass' ) ) {
|
||||
try {
|
||||
$options[ $mailer ][ $option_name ] = Crypto::encrypt( $option_value );
|
||||
} catch ( \Exception $e ) {} // phpcs:ignore Generic.CodeAnalysis.EmptyStatement.DetectedCatch, Squiz.Commenting.EmptyCatchComment.Missing, Squiz.ControlStructures.ControlSignature.NewlineAfterOpenBrace
|
||||
} catch ( \Exception $e ) {
|
||||
} // phpcs:ignore Generic.CodeAnalysis.EmptyStatement.DetectedCatch, Squiz.Commenting.EmptyCatchComment.Missing, Squiz.ControlStructures.ControlSignature.NewlineAfterOpenBrace
|
||||
}
|
||||
break;
|
||||
|
||||
case 'api_key': // mailgun/sendgrid/sendinblue/pepipostapi/smtpcom/sparkpost/sendlayer/smtp2go.
|
||||
case 'api_key': // mailgun/sendgrid/sendinblue/pepipostapi/smtpcom/sparkpost/sendlayer/smtp2go/mailjet.
|
||||
case 'secret_key': // mailjet.
|
||||
case 'domain': // mailgun/zoho/sendgrid/sendinblue.
|
||||
case 'client_id': // gmail/outlook/amazonses/zoho.
|
||||
case 'client_secret': // gmail/outlook/amazonses/zoho.
|
||||
@@ -1396,16 +1451,16 @@ class Options {
|
||||
$arrays = func_get_args();
|
||||
|
||||
if ( count( $arrays ) < 2 ) {
|
||||
return isset( $arrays[0] ) ? $arrays[0] : array();
|
||||
return isset( $arrays[0] ) ? $arrays[0] : [];
|
||||
}
|
||||
|
||||
$merged = array();
|
||||
$merged = [];
|
||||
|
||||
while ( $arrays ) {
|
||||
$array = array_shift( $arrays );
|
||||
|
||||
if ( ! is_array( $array ) ) {
|
||||
return array();
|
||||
return [];
|
||||
}
|
||||
|
||||
if ( empty( $array ) ) {
|
||||
@@ -1435,11 +1490,11 @@ class Options {
|
||||
/**
|
||||
* Check whether the site is using Pepipost SMTP or not.
|
||||
*
|
||||
* @deprecated 2.4.0
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @return bool
|
||||
* @deprecated 2.4.0
|
||||
*
|
||||
*/
|
||||
public function is_pepipost_active() {
|
||||
|
||||
@@ -1479,7 +1534,7 @@ class Options {
|
||||
* @return bool
|
||||
*/
|
||||
public function is_mailer_smtp() {
|
||||
return apply_filters( 'wp_mail_smtp_options_is_mailer_smtp', in_array( $this->get( 'mail', 'mailer' ), array( 'pepipost', 'smtp' ), true ) );
|
||||
return apply_filters( 'wp_mail_smtp_options_is_mailer_smtp', in_array( $this->get( 'mail', 'mailer' ), [ 'pepipost', 'smtp' ], true ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -134,11 +134,19 @@ class Options extends OptionsAbstract {
|
||||
/>
|
||||
<?php $this->display_const_set_message( 'WPMS_GMAIL_CLIENT_SECRET' ); ?>
|
||||
<?php else : ?>
|
||||
<input type="password" spellcheck="false"
|
||||
name="wp-mail-smtp[<?php echo esc_attr( $this->get_slug() ); ?>][client_secret]"
|
||||
value="<?php echo esc_attr( $this->connection_options->get( $this->get_slug(), 'client_secret' ) ); ?>"
|
||||
id="wp-mail-smtp-setting-<?php echo esc_attr( $this->get_slug() ); ?>-client_secret"
|
||||
/>
|
||||
<?php
|
||||
$slug = $this->get_slug();
|
||||
$value = $this->connection_options->get( $this->get_slug(), 'client_secret' );
|
||||
|
||||
UI::hidden_password_field(
|
||||
[
|
||||
'name' => "wp-mail-smtp[{$slug}][client_secret]",
|
||||
'id' => "wp-mail-smtp-setting-{$slug}-client_secret",
|
||||
'value' => $value,
|
||||
'clear_text' => esc_html__( 'Remove Client Secret', 'wp-mail-smtp' ),
|
||||
]
|
||||
);
|
||||
?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -21,6 +21,7 @@ class Loader {
|
||||
* @since 1.6.0 Added Sendinblue.
|
||||
* @since 1.7.0 Added AmazonSES/Outlook as indication of the Pro mailers.
|
||||
* @since 4.1.0 Added SMTP2GO.
|
||||
* @since 4.2.0 Added Mailjet.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
@@ -32,6 +33,7 @@ class Loader {
|
||||
'amazonses' => 'WPMailSMTP\Providers\AmazonSES\\',
|
||||
'gmail' => 'WPMailSMTP\Providers\Gmail\\',
|
||||
'mailgun' => 'WPMailSMTP\Providers\Mailgun\\',
|
||||
'mailjet' => 'WPMailSMTP\Providers\Mailjet\\',
|
||||
'outlook' => 'WPMailSMTP\Providers\Outlook\\',
|
||||
'pepipostapi' => 'WPMailSMTP\Providers\PepipostAPI\\',
|
||||
'postmark' => 'WPMailSMTP\Providers\Postmark\\',
|
||||
@@ -111,7 +113,7 @@ class Loader {
|
||||
*/
|
||||
public function get_options_all( $connection = null ) {
|
||||
|
||||
$options = array();
|
||||
$options = [];
|
||||
|
||||
foreach ( $this->get_providers() as $provider => $path ) {
|
||||
|
||||
@@ -166,17 +168,17 @@ class Loader {
|
||||
/**
|
||||
* Get a generic entity based on the request.
|
||||
*
|
||||
* @uses \ReflectionClass
|
||||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @param string $provider
|
||||
* @param string $request
|
||||
* @param array $args Entity instantiation arguments.
|
||||
* @param array $args Entity instantiation arguments.
|
||||
*
|
||||
* @return OptionsAbstract|MailerAbstract|AuthAbstract|null
|
||||
* @uses \ReflectionClass
|
||||
*
|
||||
*/
|
||||
protected function get_entity( $provider, $request, $args = [] ) {
|
||||
protected function get_entity( $provider, $request, $args = [] ) {
|
||||
|
||||
$provider = sanitize_key( $provider );
|
||||
$request = sanitize_text_field( $request );
|
||||
@@ -194,8 +196,7 @@ class Loader {
|
||||
$class = $path . $request;
|
||||
$entity = new $class( ...$args );
|
||||
}
|
||||
}
|
||||
catch ( \Exception $e ) {
|
||||
} catch ( \Exception $e ) {
|
||||
Debug::set( "There was a problem while retrieving {$request} for {$provider}: {$e->getMessage()}" );
|
||||
$entity = null;
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace WPMailSMTP\Providers\Mailgun;
|
||||
|
||||
use WPMailSMTP\ConnectionInterface;
|
||||
use WPMailSMTP\Helpers\UI;
|
||||
use WPMailSMTP\Providers\OptionsAbstract;
|
||||
|
||||
/**
|
||||
@@ -65,11 +66,19 @@ class Options extends OptionsAbstract {
|
||||
/>
|
||||
<?php $this->display_const_set_message( 'WPMS_MAILGUN_API_KEY' ); ?>
|
||||
<?php else : ?>
|
||||
<input type="password" spellcheck="false"
|
||||
name="wp-mail-smtp[<?php echo esc_attr( $this->get_slug() ); ?>][api_key]"
|
||||
value="<?php echo esc_attr( $this->connection_options->get( $this->get_slug(), 'api_key' ) ); ?>"
|
||||
id="wp-mail-smtp-setting-<?php echo esc_attr( $this->get_slug() ); ?>-api_key"
|
||||
/>
|
||||
<?php
|
||||
$slug = $this->get_slug();
|
||||
$value = $this->connection_options->get( $this->get_slug(), 'api_key' );
|
||||
|
||||
UI::hidden_password_field(
|
||||
[
|
||||
'name' => "wp-mail-smtp[{$slug}][api_key]",
|
||||
'id' => "wp-mail-smtp-setting-{$slug}-api_key",
|
||||
'value' => $value,
|
||||
'clear_text' => esc_html__( 'Remove API Key', 'wp-mail-smtp' ),
|
||||
]
|
||||
);
|
||||
?>
|
||||
<?php endif; ?>
|
||||
<p class="desc">
|
||||
<?php
|
||||
@@ -107,7 +116,7 @@ class Options extends OptionsAbstract {
|
||||
printf(
|
||||
/* translators: %s - Domain Name link. */
|
||||
esc_html__( 'Follow this link to get a Domain Name from Mailgun: %s.', 'wp-mail-smtp' ),
|
||||
'<a href="https://app.mailgun.com/app/sending/domains" target="_blank" rel="noopener noreferrer">' .
|
||||
'<a href="https://app.mailgun.com/mg/sending/domains" target="_blank" rel="noopener noreferrer">' .
|
||||
esc_html__( 'Get a Domain Name', 'wp-mail-smtp' ) .
|
||||
'</a>'
|
||||
);
|
||||
|
||||
@@ -0,0 +1,549 @@
|
||||
<?php
|
||||
|
||||
namespace WPMailSMTP\Providers\Mailjet;
|
||||
|
||||
use WPMailSMTP\Helpers\Helpers;
|
||||
use WPMailSMTP\Providers\MailerAbstract;
|
||||
use WPMailSMTP\WP;
|
||||
|
||||
/**
|
||||
* Class Mailer.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*/
|
||||
class Mailer extends MailerAbstract {
|
||||
|
||||
/**
|
||||
* Which response code from HTTP provider is considered to be successful?
|
||||
*
|
||||
* @since 4.2.0
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected $email_sent_code = 200;
|
||||
|
||||
/**
|
||||
* URL to make an API request to.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $url = 'https://api.mailjet.com/v3.1/send';
|
||||
|
||||
/**
|
||||
* Mailer constructor.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*
|
||||
* @param MailCatcherInterface $phpmailer The MailCatcher object.
|
||||
* @param ConnectionInterface $connection The Connection object.
|
||||
*/
|
||||
public function __construct( $phpmailer, $connection = null ) {
|
||||
|
||||
// We want to prefill everything from MailCatcher class, which extends PHPMailer.
|
||||
parent::__construct( $phpmailer, $connection );
|
||||
|
||||
// Set mailer specific headers.
|
||||
$user = $this->connection_options->get( $this->mailer, 'api_key' );
|
||||
$pass = $this->connection_options->get( $this->mailer, 'secret_key' );
|
||||
|
||||
// phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode
|
||||
$this->set_header( 'Authorization', 'Basic ' . base64_encode( "$user:$pass" ) );
|
||||
$this->set_header( 'Accept', 'application/json' );
|
||||
$this->set_header( 'Content-Type', 'application/json' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Redefine the way custom headers are processed for this mailer - they should be in body.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*
|
||||
* @param array $headers Headers array.
|
||||
*/
|
||||
public function set_headers( $headers ) {
|
||||
|
||||
foreach ( $headers as $header ) {
|
||||
$name = isset( $header[0] ) ? $header[0] : false;
|
||||
$value = isset( $header[1] ) ? $header[1] : false;
|
||||
|
||||
$this->set_body_header( $name, $value );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This mailer supports email-related custom headers inside a body of the message.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*
|
||||
* @param string $name Header name.
|
||||
* @param string $value Header value.
|
||||
*/
|
||||
public function set_body_header( $name, $value ) {
|
||||
|
||||
$name = sanitize_text_field( $name );
|
||||
|
||||
if ( empty( $name ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$headers = isset( $this->body['Headers'] ) ? (array) $this->body['Headers'] : [];
|
||||
|
||||
$headers[ $name ] = $this->sanitize_header_value( $name, $value );
|
||||
|
||||
$this->set_body_param(
|
||||
[
|
||||
'Headers' => $headers,
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the From information for an email.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*
|
||||
* @param string $email The sender email address.
|
||||
* @param string $name The sender name.
|
||||
*/
|
||||
public function set_from( $email, $name ) {
|
||||
|
||||
if ( ! filter_var( $email, FILTER_VALIDATE_EMAIL ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->set_body_param(
|
||||
[
|
||||
'From' => $this->address_format( [ $email, $name ] ),
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set email recipients: to, cc, bcc.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*
|
||||
* @param array $recipients Email recipients.
|
||||
*/
|
||||
public function set_recipients( $recipients ) { // phpcs:ignore Generic.Metrics.CyclomaticComplexity.TooHigh
|
||||
|
||||
if ( empty( $recipients ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Allow only these recipient types.
|
||||
$allowed_types = [ 'to', 'cc', 'bcc' ];
|
||||
$data = [];
|
||||
|
||||
foreach ( $recipients as $type => $emails ) {
|
||||
if (
|
||||
! in_array( $type, $allowed_types, true ) ||
|
||||
empty( $emails ) ||
|
||||
! is_array( $emails )
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$type = ucfirst( $type );
|
||||
|
||||
// Iterate over all emails for each type.
|
||||
// There might be multiple cc/to/bcc emails.
|
||||
foreach ( $emails as $email ) {
|
||||
if ( ! isset( $email[0] ) || ! filter_var( $email[0], FILTER_VALIDATE_EMAIL ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$data[ $type ][] = $this->address_format( $email );
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! empty( $data ) ) {
|
||||
$this->set_body_param( $data );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the Reply To information for an email.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*
|
||||
* @param array $emails Reply To email addresses.
|
||||
*/
|
||||
public function set_reply_to( $emails ) {
|
||||
|
||||
if ( empty( $emails ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$email = array_shift( $emails );
|
||||
|
||||
if ( ! isset( $email[0] ) || ! filter_var( $email[0], FILTER_VALIDATE_EMAIL ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->set_body_param(
|
||||
[
|
||||
'ReplyTo' => $this->address_format( $email ),
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set email subject.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*
|
||||
* @param string $subject Email subject.
|
||||
*/
|
||||
public function set_subject( $subject ) {
|
||||
|
||||
$this->set_body_param(
|
||||
[
|
||||
'Subject' => $subject,
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set email content.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*
|
||||
* @param string|array $content Email content.
|
||||
*/
|
||||
public function set_content( $content ) {
|
||||
|
||||
if ( empty( $content ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( is_array( $content ) ) {
|
||||
if ( ! empty( $content['text'] ) ) {
|
||||
$this->set_body_param(
|
||||
[
|
||||
'TextPart' => $content['text'],
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
if ( ! empty( $content['html'] ) ) {
|
||||
$this->set_body_param(
|
||||
[
|
||||
'HTMLPart' => $content['html'],
|
||||
]
|
||||
);
|
||||
}
|
||||
} else {
|
||||
if ( $this->phpmailer->ContentType === 'text/plain' ) {
|
||||
$this->set_body_param(
|
||||
[
|
||||
'TextPart' => $content,
|
||||
]
|
||||
);
|
||||
} else {
|
||||
$this->set_body_param(
|
||||
[
|
||||
'HTMLPart' => $content,
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set attachments for an email.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*
|
||||
* @param array $attachments Attachments array.
|
||||
*/
|
||||
public function set_attachments( $attachments ) { // phpcs:ignore Generic.Metrics.CyclomaticComplexity.TooHigh
|
||||
|
||||
if ( empty( $attachments ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$data = [];
|
||||
|
||||
// Split attachments into "attachments" and "inline" groups.
|
||||
foreach ( $attachments as $attachment ) {
|
||||
$mode = in_array( $attachment[6], [ 'inline', 'attachment' ], true ) ? $attachment[6] : 'attachment';
|
||||
|
||||
if ( $mode === 'inline' ) {
|
||||
$data['InlinedAttachments'][] = $attachment;
|
||||
} else {
|
||||
$data['Attachments'][] = $attachment;
|
||||
}
|
||||
}
|
||||
|
||||
// Prepare attachments.
|
||||
foreach ( $data as $disposition => $attachments ) {
|
||||
$data[ $disposition ] = $this->prepare_attachments( $attachments );
|
||||
}
|
||||
|
||||
if ( ! empty( $data ) ) {
|
||||
$this->set_body_param( $data );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepare attachments data for SendLayer API.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*
|
||||
* @param array $attachments Array of attachments.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function prepare_attachments( $attachments ) {
|
||||
|
||||
$data = [];
|
||||
|
||||
foreach ( $attachments as $attachment ) {
|
||||
$file = $this->get_attachment_file_content( $attachment );
|
||||
|
||||
if ( $file === false ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$filetype = str_replace( ';', '', trim( $attachment[4] ) );
|
||||
$entry = [
|
||||
'Filename' => empty( $attachment[2] ) ? 'file-' . wp_hash( microtime() ) . '.' . $filetype : trim( $attachment[2] ),
|
||||
// phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode
|
||||
'Base64Content' => base64_encode( $file ),
|
||||
'ContentType' => $attachment[4],
|
||||
];
|
||||
|
||||
if ( $attachment[6] === 'inline' ) {
|
||||
$entry['ContentID'] = $entry['Filename'];
|
||||
}
|
||||
|
||||
$data[] = $entry;
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Doesn't support this.
|
||||
* So we do nothing.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*
|
||||
* @param string $email Return Path email address.
|
||||
*/
|
||||
public function set_return_path( $email ) {}
|
||||
|
||||
/**
|
||||
* Redefine the way email body is returned.
|
||||
* By default, we are sending an array of data.
|
||||
* This mailer requires a JSON, so we encode the body.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*/
|
||||
public function get_body() {
|
||||
|
||||
$body = [
|
||||
'Messages' => [
|
||||
parent::get_body(),
|
||||
],
|
||||
];
|
||||
|
||||
return wp_json_encode( $body );
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the email is sent or not.
|
||||
* We check response code and a non-empty `email_id` field in the response body.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function is_email_sent() {
|
||||
|
||||
$is_sent = false;
|
||||
|
||||
if ( wp_remote_retrieve_response_code( $this->response ) === $this->email_sent_code ) {
|
||||
$is_sent = true;
|
||||
}
|
||||
|
||||
// phpcs:disable WPForms.Comments.Since.MissingPhpDoc, WPForms.PHP.ValidateHooks.InvalidHookName
|
||||
|
||||
/** This filter is documented in src/Providers/MailerAbstract.php. */
|
||||
return apply_filters( 'wp_mail_smtp_providers_mailer_is_email_sent', $is_sent, $this->mailer );
|
||||
// phpcs:enable WPForms.Comments.Since.MissingPhpDoc, WPForms.PHP.ValidateHooks.InvalidHookName
|
||||
}
|
||||
|
||||
/**
|
||||
* We might need to do something after the email was sent to the API.
|
||||
* In this method we preprocess the response from the API.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*
|
||||
* @param mixed $response Response data.
|
||||
*/
|
||||
protected function process_response( $response ) { // phpcs:ignore Generic.Metrics.CyclomaticComplexity.TooHigh
|
||||
|
||||
parent::process_response( $response );
|
||||
|
||||
// Bail if request failed, or has no message entries.
|
||||
if (
|
||||
is_wp_error( $response ) ||
|
||||
empty( $this->response['body']->Messages ) ||
|
||||
! is_array( $this->response['body']->Messages )
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Only pick successful messages.
|
||||
$messages = array_filter(
|
||||
$this->response['body']->Messages,
|
||||
function( $message ) {
|
||||
return strtolower( $message->Status ) === 'success';
|
||||
}
|
||||
);
|
||||
|
||||
// Bail if all messages failed.
|
||||
if ( empty( $messages ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Bail if no primary TO is defined. Unlikely, but just in case.
|
||||
if ( ! isset( $this->body['To'] ) ||
|
||||
! is_array( $this->body['To'] ) ||
|
||||
! isset( $this->body['To'][0]['Email'] ) ||
|
||||
empty( $this->body['To'][0]['Email'] )
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
$primary_to = $this->body['To'][0]['Email'];
|
||||
|
||||
foreach ( $messages as $message ) {
|
||||
foreach ( $message->To as $to ) {
|
||||
if ( strtolower( $to->Email ) === $primary_to ) {
|
||||
$this->phpmailer->addCustomHeader( 'X-Msg-ID', $to->MessageID );
|
||||
$this->verify_sent_status = true;
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gather errors from a nested array.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*
|
||||
* @param array $data Array of data.
|
||||
* @param int $recursion Current recursion step.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private function gather_response_errors( $data, $recursion = 10 ) {
|
||||
|
||||
$errors = [];
|
||||
|
||||
// Bail if recursion exceeds the limit.
|
||||
if ( $recursion <= 0 ) {
|
||||
return $errors;
|
||||
}
|
||||
|
||||
// Bail if provided data is not an array.
|
||||
if ( ! is_array( $data ) ) {
|
||||
return $errors;
|
||||
}
|
||||
|
||||
if ( ! empty( $data['ErrorMessage'] ) ) {
|
||||
$errors[] = $data;
|
||||
|
||||
return $errors;
|
||||
}
|
||||
|
||||
foreach ( $data as $datum ) {
|
||||
$errors = array_merge( $errors, $this->gather_response_errors( $datum, $recursion - 1 ) );
|
||||
}
|
||||
|
||||
return $errors;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a mailer-specific response with a helpful error.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_response_error() { // phpcs:ignore Generic.Metrics.NestingLevel.MaxExceeded
|
||||
|
||||
$error_text[] = $this->error_message;
|
||||
|
||||
if ( ! empty( $this->response ) ) {
|
||||
$body = wp_remote_retrieve_body( $this->response );
|
||||
$body = json_decode( wp_json_encode( $body ), true );
|
||||
$errors = $this->gather_response_errors( $body );
|
||||
|
||||
foreach ( $errors as $error ) {
|
||||
$message = $error['ErrorMessage'];
|
||||
$code = ! empty( $error['ErrorCode'] ) ? $error['ErrorCode'] : '';
|
||||
|
||||
if ( ! empty( $error['ErrorRelatedTo'] ) ) {
|
||||
$related_to = implode( ', ', $error['ErrorRelatedTo'] );
|
||||
$message = "{$message} [{$related_to}]";
|
||||
}
|
||||
|
||||
$error_text[] = Helpers::format_error_message( $message, $code );
|
||||
}
|
||||
} else {
|
||||
$error_text[] = WP::wp_remote_get_response_error_message( $this->response );
|
||||
}
|
||||
|
||||
return implode( WP::EOL, array_map( 'esc_textarea', array_filter( $error_text ) ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the mailer has all its settings correctly set up and saved.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function is_mailer_complete() {
|
||||
|
||||
$options = $this->connection_options->get_group( $this->mailer );
|
||||
|
||||
// API key is the only required option.
|
||||
if ( ! empty( $options['api_key'] ) && ! empty( $options['secret_key'] ) ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepare address param.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*
|
||||
* @param array $address Address array.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private function address_format( $address ) {
|
||||
|
||||
$result = [];
|
||||
$email = isset( $address[0] ) ? $address[0] : false;
|
||||
$name = isset( $address[1] ) ? $address[1] : false;
|
||||
|
||||
$result['Email'] = $email;
|
||||
|
||||
if ( ! empty( $name ) ) {
|
||||
$result['Name'] = $name;
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,173 @@
|
||||
<?php
|
||||
|
||||
namespace WPMailSMTP\Providers\Mailjet;
|
||||
|
||||
use WPMailSMTP\Helpers\UI;
|
||||
use WPMailSMTP\Providers\OptionsAbstract;
|
||||
|
||||
/**
|
||||
* Class Options.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*/
|
||||
class Options extends OptionsAbstract {
|
||||
|
||||
/**
|
||||
* Mailer slug.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*/
|
||||
const SLUG = 'mailjet';
|
||||
|
||||
/**
|
||||
* Options constructor.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*
|
||||
* @param ConnectionInterface $connection The Connection object.
|
||||
*/
|
||||
public function __construct( $connection = null ) {
|
||||
|
||||
if ( is_null( $connection ) ) {
|
||||
$connection = wp_mail_smtp()->get_connections_manager()->get_primary_connection();
|
||||
}
|
||||
|
||||
$description = sprintf(
|
||||
wp_kses( /* translators: %1$s - URL to Mailjet.com site. */
|
||||
__( '<a href="%1$s" target="_blank" rel="noopener noreferrer">Mailjet</a> is a cloud-based email service platform that enables businesses to send marketing and transactional emails, offering features like email automation, real-time analytics, and responsive design templates. If you\'re just starting out, you can send up to 200 emails per day without a credit card.', 'wp-mail-smtp' ) .
|
||||
'<br><br>' .
|
||||
/* translators: %2$s - URL to wpmailsmtp.com doc. */
|
||||
__( 'To get started, read our <a href="%2$s" target="_blank" rel="noopener noreferrer">Mailjet documentation</a>.', 'wp-mail-smtp' ),
|
||||
[
|
||||
'strong' => true,
|
||||
'br' => true,
|
||||
'a' => [
|
||||
'href' => true,
|
||||
'rel' => true,
|
||||
'target' => true,
|
||||
],
|
||||
]
|
||||
),
|
||||
'https://www.mailjet.com/',
|
||||
esc_url( wp_mail_smtp()->get_utm_url( 'https://wpmailsmtp.com/docs/how-to-set-up-the-mailjet-mailer-in-wp-mail-smtp/', 'Mailjet documentation' ) )
|
||||
);
|
||||
|
||||
parent::__construct(
|
||||
[
|
||||
'logo_url' => wp_mail_smtp()->assets_url . '/images/providers/mailjet.svg',
|
||||
'slug' => self::SLUG,
|
||||
'title' => esc_html__( 'Mailjet', 'wp-mail-smtp' ),
|
||||
'php' => '5.6',
|
||||
'description' => $description,
|
||||
'supports' => [
|
||||
'from_email' => true,
|
||||
'from_name' => true,
|
||||
'return_path' => false,
|
||||
'from_email_force' => true,
|
||||
'from_name_force' => true,
|
||||
],
|
||||
],
|
||||
$connection
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Output the mailer provider options.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*/
|
||||
public function display_options() {
|
||||
|
||||
// Do not display options if PHP version is not correct.
|
||||
if ( ! $this->is_php_correct() ) {
|
||||
$this->display_php_warning();
|
||||
|
||||
return;
|
||||
}
|
||||
?>
|
||||
|
||||
<!-- API Key -->
|
||||
<div id="wp-mail-smtp-setting-row-<?php echo esc_attr( $this->get_slug() ); ?>-api_key"
|
||||
class="wp-mail-smtp-setting-row wp-mail-smtp-setting-row-text wp-mail-smtp-clear">
|
||||
<div class="wp-mail-smtp-setting-label">
|
||||
<label for="wp-mail-smtp-setting-<?php echo esc_attr( $this->get_slug() ); ?>-api_key"><?php esc_html_e( 'API Key', 'wp-mail-smtp' ); ?></label>
|
||||
</div>
|
||||
<div class="wp-mail-smtp-setting-field">
|
||||
<?php if ( $this->connection_options->is_const_defined( $this->get_slug(), 'api_key' ) ) : ?>
|
||||
<input type="text" disabled value="****************************************"
|
||||
id="wp-mail-smtp-setting-<?php echo esc_attr( $this->get_slug() ); ?>-api_key"
|
||||
/>
|
||||
<?php $this->display_const_set_message( 'WPMS_MAILJET_API_KEY' ); ?>
|
||||
<?php else : ?>
|
||||
<?php
|
||||
$slug = $this->get_slug();
|
||||
$value = $this->connection_options->get( $this->get_slug(), 'api_key' );
|
||||
|
||||
UI::hidden_password_field(
|
||||
[
|
||||
'name' => "wp-mail-smtp[{$slug}][api_key]",
|
||||
'id' => "wp-mail-smtp-setting-{$slug}-api_key",
|
||||
'value' => $value,
|
||||
'clear_text' => esc_html__( 'Remove API Key', 'wp-mail-smtp' ),
|
||||
]
|
||||
);
|
||||
?>
|
||||
<?php endif; ?>
|
||||
|
||||
<p class="desc">
|
||||
<?php
|
||||
printf( /* translators: %s - link to get an API Key. */
|
||||
esc_html__( 'Follow this link to get the API key from Mailjet: %s.', 'wp-mail-smtp' ),
|
||||
'<a href="https://app.mailjet.com/account/apikeys" target="_blank" rel="noopener noreferrer">' .
|
||||
esc_html__( 'API Key Management', 'wp-mail-smtp' ) .
|
||||
'</a>'
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Secret Key -->
|
||||
<div id="wp-mail-smtp-setting-row-<?php echo esc_attr( $this->get_slug() ); ?>-secret_key"
|
||||
class="wp-mail-smtp-setting-row wp-mail-smtp-setting-row-text wp-mail-smtp-clear">
|
||||
<div class="wp-mail-smtp-setting-label">
|
||||
<label for="wp-mail-smtp-setting-<?php echo esc_attr( $this->get_slug() ); ?>-secret_key"><?php esc_html_e( 'Secret Key', 'wp-mail-smtp' ); ?></label>
|
||||
</div>
|
||||
<div class="wp-mail-smtp-setting-field">
|
||||
<?php if ( $this->connection_options->is_const_defined( $this->get_slug(), 'secret_key' ) ) : ?>
|
||||
<input type="text" disabled value="****************************************"
|
||||
id="wp-mail-smtp-setting-<?php echo esc_attr( $this->get_slug() ); ?>-secret_key"
|
||||
/>
|
||||
<?php $this->display_const_set_message( 'WPMS_MAILJET_SECRET_KEY' ); ?>
|
||||
<?php else : ?>
|
||||
<?php
|
||||
$slug = $this->get_slug();
|
||||
$value = $this->connection_options->get( $this->get_slug(), 'secret_key' );
|
||||
|
||||
UI::hidden_password_field(
|
||||
[
|
||||
'name' => "wp-mail-smtp[{$slug}][secret_key]",
|
||||
'id' => "wp-mail-smtp-setting-{$slug}-secret_key",
|
||||
'value' => $value,
|
||||
'clear_text' => esc_html__( 'Remove Secret Key', 'wp-mail-smtp' ),
|
||||
]
|
||||
);
|
||||
?>
|
||||
<?php endif; ?>
|
||||
|
||||
<p class="desc">
|
||||
<?php
|
||||
printf( /* translators: %s - link to get an API Key. */
|
||||
esc_html__( 'Follow this link to get the Secret key from Mailjet: %s.', 'wp-mail-smtp' ),
|
||||
'<a href="https://app.mailjet.com/account/apikeys" target="_blank" rel="noopener noreferrer">' .
|
||||
esc_html__( 'API Key Management', 'wp-mail-smtp' ) .
|
||||
'</a>'
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace WPMailSMTP\Providers\Postmark;
|
||||
|
||||
use WPMailSMTP\ConnectionInterface;
|
||||
use WPMailSMTP\Helpers\UI;
|
||||
use WPMailSMTP\Providers\OptionsAbstract;
|
||||
|
||||
/**
|
||||
@@ -94,10 +95,19 @@ class Options extends OptionsAbstract {
|
||||
id="wp-mail-smtp-setting-<?php echo esc_attr( $this->get_slug() ); ?>-server_api_token"/>
|
||||
<?php $this->display_const_set_message( 'WPMS_POSTMARK_SERVER_API_TOKEN' ); ?>
|
||||
<?php else : ?>
|
||||
<input type="password" spellcheck="false"
|
||||
name="wp-mail-smtp[<?php echo esc_attr( $this->get_slug() ); ?>][server_api_token]"
|
||||
value="<?php echo esc_attr( $this->connection_options->get( $this->get_slug(), 'server_api_token' ) ); ?>"
|
||||
id="wp-mail-smtp-setting-<?php echo esc_attr( $this->get_slug() ); ?>-server_api_token"/>
|
||||
<?php
|
||||
$slug = $this->get_slug();
|
||||
$value = $this->connection_options->get( $this->get_slug(), 'server_api_token' );
|
||||
|
||||
UI::hidden_password_field(
|
||||
[
|
||||
'name' => "wp-mail-smtp[{$slug}][server_api_token]",
|
||||
'id' => "wp-mail-smtp-setting-{$slug}-server_api_token",
|
||||
'value' => $value,
|
||||
'clear_text' => esc_html__( 'Remove Server API Token', 'wp-mail-smtp' ),
|
||||
]
|
||||
);
|
||||
?>
|
||||
<?php endif; ?>
|
||||
<p class="desc">
|
||||
<?php
|
||||
|
||||
@@ -500,7 +500,7 @@ class Mailer extends MailerAbstract {
|
||||
$result = $email;
|
||||
|
||||
if ( ! empty( $name ) ) {
|
||||
$result = "{$name} <{$email}>";
|
||||
$result = "\"{$name}\" <{$email}>";
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace WPMailSMTP\Providers\SMTP2GO;
|
||||
|
||||
use WPMailSMTP\ConnectionInterface;
|
||||
use WPMailSMTP\Helpers\UI;
|
||||
use WPMailSMTP\Providers\OptionsAbstract;
|
||||
|
||||
/**
|
||||
@@ -99,11 +100,19 @@ class Options extends OptionsAbstract {
|
||||
/>
|
||||
<?php $this->display_const_set_message( 'WPMS_SMTP2GO_API_KEY' ); ?>
|
||||
<?php else : ?>
|
||||
<input type="password" spellcheck="false"
|
||||
name="wp-mail-smtp[<?php echo esc_attr( $this->get_slug() ); ?>][api_key]"
|
||||
value="<?php echo esc_attr( $this->connection_options->get( $this->get_slug(), 'api_key' ) ); ?>"
|
||||
id="wp-mail-smtp-setting-<?php echo esc_attr( $this->get_slug() ); ?>-api_key"
|
||||
/>
|
||||
<?php
|
||||
$slug = $this->get_slug();
|
||||
$value = $this->connection_options->get( $this->get_slug(), 'api_key' );
|
||||
|
||||
UI::hidden_password_field(
|
||||
[
|
||||
'name' => "wp-mail-smtp[{$slug}][api_key]",
|
||||
'id' => "wp-mail-smtp-setting-{$slug}-api_key",
|
||||
'value' => $value,
|
||||
'clear_text' => esc_html__( 'Remove API Key', 'wp-mail-smtp' ),
|
||||
]
|
||||
);
|
||||
?>
|
||||
<?php endif; ?>
|
||||
|
||||
<p class="desc">
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace WPMailSMTP\Providers\SMTPcom;
|
||||
|
||||
use WPMailSMTP\ConnectionInterface;
|
||||
use WPMailSMTP\Helpers\UI;
|
||||
use WPMailSMTP\Providers\OptionsAbstract;
|
||||
|
||||
/**
|
||||
@@ -112,17 +113,25 @@ class Options extends OptionsAbstract {
|
||||
/>
|
||||
<?php $this->display_const_set_message( 'WPMS_SMTPCOM_API_KEY' ); ?>
|
||||
<?php else : ?>
|
||||
<input type="password" spellcheck="false"
|
||||
name="wp-mail-smtp[<?php echo esc_attr( $this->get_slug() ); ?>][api_key]"
|
||||
value="<?php echo esc_attr( $this->connection_options->get( $this->get_slug(), 'api_key' ) ); ?>"
|
||||
id="wp-mail-smtp-setting-<?php echo esc_attr( $this->get_slug() ); ?>-api_key"
|
||||
/>
|
||||
<?php
|
||||
$slug = $this->get_slug();
|
||||
$value = $this->connection_options->get( $this->get_slug(), 'api_key' );
|
||||
|
||||
UI::hidden_password_field(
|
||||
[
|
||||
'name' => "wp-mail-smtp[{$slug}][api_key]",
|
||||
'id' => "wp-mail-smtp-setting-{$slug}-api_key",
|
||||
'value' => $value,
|
||||
'clear_text' => esc_html__( 'Remove API Key', 'wp-mail-smtp' ),
|
||||
]
|
||||
);
|
||||
?>
|
||||
<?php endif; ?>
|
||||
<p class="desc">
|
||||
<?php
|
||||
printf( /* translators: %s - API key link. */
|
||||
esc_html__( 'Follow this link to get an API Key from SMTP.com: %s.', 'wp-mail-smtp' ),
|
||||
'<a href="https://my.smtp.com/settings/api" target="_blank" rel="noopener noreferrer">' .
|
||||
'<a href="https://my.smtp.com/account?tab=manage_api_keys" target="_blank" rel="noopener noreferrer">' .
|
||||
esc_html__( 'Get API Key', 'wp-mail-smtp' ) .
|
||||
'</a>'
|
||||
);
|
||||
@@ -151,7 +160,7 @@ class Options extends OptionsAbstract {
|
||||
<?php
|
||||
printf( /* translators: %s - Channel/Sender Name link for smtp.com documentation. */
|
||||
esc_html__( 'Follow this link to get a Sender Name from SMTP.com: %s.', 'wp-mail-smtp' ),
|
||||
'<a href="https://my.smtp.com/senders/" target="_blank" rel="noopener noreferrer">' .
|
||||
'<a href="https://my.smtp.com/account?tab=manage_channels" target="_blank" rel="noopener noreferrer">' .
|
||||
esc_html__( 'Get Sender Name', 'wp-mail-smtp' ) .
|
||||
'</a>'
|
||||
);
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace WPMailSMTP\Providers\Sendgrid;
|
||||
|
||||
use WPMailSMTP\ConnectionInterface;
|
||||
use WPMailSMTP\Helpers\UI;
|
||||
use WPMailSMTP\Providers\OptionsAbstract;
|
||||
|
||||
/**
|
||||
@@ -73,11 +74,19 @@ class Options extends OptionsAbstract {
|
||||
/>
|
||||
<?php $this->display_const_set_message( 'WPMS_SENDGRID_API_KEY' ); ?>
|
||||
<?php else : ?>
|
||||
<input type="password" spellcheck="false"
|
||||
name="wp-mail-smtp[<?php echo esc_attr( $this->get_slug() ); ?>][api_key]"
|
||||
value="<?php echo esc_attr( $this->connection_options->get( $this->get_slug(), 'api_key' ) ); ?>"
|
||||
id="wp-mail-smtp-setting-<?php echo esc_attr( $this->get_slug() ); ?>-api_key"
|
||||
/>
|
||||
<?php
|
||||
$slug = $this->get_slug();
|
||||
$value = $this->connection_options->get( $this->get_slug(), 'api_key' );
|
||||
|
||||
UI::hidden_password_field(
|
||||
[
|
||||
'name' => "wp-mail-smtp[{$slug}][api_key]",
|
||||
'id' => "wp-mail-smtp-setting-{$slug}-api_key",
|
||||
'value' => $value,
|
||||
'clear_text' => esc_html__( 'Remove API Key', 'wp-mail-smtp' ),
|
||||
]
|
||||
);
|
||||
?>
|
||||
<?php endif; ?>
|
||||
<p class="desc">
|
||||
<?php
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace WPMailSMTP\Providers\Sendinblue;
|
||||
|
||||
use WPMailSMTP\ConnectionInterface;
|
||||
use WPMailSMTP\Helpers\UI;
|
||||
use WPMailSMTP\Providers\OptionsAbstract;
|
||||
|
||||
/**
|
||||
@@ -117,11 +118,19 @@ class Options extends OptionsAbstract {
|
||||
/>
|
||||
<?php $this->display_const_set_message( 'WPMS_SENDINBLUE_API_KEY' ); ?>
|
||||
<?php else : ?>
|
||||
<input type="password" spellcheck="false"
|
||||
name="wp-mail-smtp[<?php echo esc_attr( $this->get_slug() ); ?>][api_key]"
|
||||
value="<?php echo esc_attr( $this->connection_options->get( $this->get_slug(), 'api_key' ) ); ?>"
|
||||
id="wp-mail-smtp-setting-<?php echo esc_attr( $this->get_slug() ); ?>-api_key"
|
||||
/>
|
||||
<?php
|
||||
$slug = $this->get_slug();
|
||||
$value = $this->connection_options->get( $this->get_slug(), 'api_key' );
|
||||
|
||||
UI::hidden_password_field(
|
||||
[
|
||||
'name' => "wp-mail-smtp[{$slug}][api_key]",
|
||||
'id' => "wp-mail-smtp-setting-{$slug}-api_key",
|
||||
'value' => $value,
|
||||
'clear_text' => esc_html__( 'Remove API Key', 'wp-mail-smtp' ),
|
||||
]
|
||||
);
|
||||
?>
|
||||
<?php endif; ?>
|
||||
|
||||
<p class="desc">
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace WPMailSMTP\Providers\Sendlayer;
|
||||
|
||||
use WPMailSMTP\ConnectionInterface;
|
||||
use WPMailSMTP\Helpers\UI;
|
||||
use WPMailSMTP\Providers\OptionsAbstract;
|
||||
|
||||
/**
|
||||
@@ -107,11 +108,19 @@ class Options extends OptionsAbstract {
|
||||
/>
|
||||
<?php $this->display_const_set_message( 'WPMS_SENDLAYER_API_KEY' ); ?>
|
||||
<?php else : ?>
|
||||
<input type="password" spellcheck="false"
|
||||
name="wp-mail-smtp[<?php echo esc_attr( $this->get_slug() ); ?>][api_key]"
|
||||
value="<?php echo esc_attr( $this->connection_options->get( $this->get_slug(), 'api_key' ) ); ?>"
|
||||
id="wp-mail-smtp-setting-<?php echo esc_attr( $this->get_slug() ); ?>-api_key"
|
||||
/>
|
||||
<?php
|
||||
$slug = $this->get_slug();
|
||||
$value = $this->connection_options->get( $this->get_slug(), 'api_key' );
|
||||
|
||||
UI::hidden_password_field(
|
||||
[
|
||||
'name' => "wp-mail-smtp[{$slug}][api_key]",
|
||||
'id' => "wp-mail-smtp-setting-{$slug}-api_key",
|
||||
'value' => $value,
|
||||
'clear_text' => esc_html__( 'Remove API Key', 'wp-mail-smtp' ),
|
||||
]
|
||||
);
|
||||
?>
|
||||
<?php endif; ?>
|
||||
<p class="desc">
|
||||
<?php
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace WPMailSMTP\Providers\SparkPost;
|
||||
|
||||
use WPMailSMTP\ConnectionInterface;
|
||||
use WPMailSMTP\Helpers\UI;
|
||||
use WPMailSMTP\Providers\OptionsAbstract;
|
||||
|
||||
/**
|
||||
@@ -93,11 +94,19 @@ class Options extends OptionsAbstract {
|
||||
/>
|
||||
<?php $this->display_const_set_message( 'WPMS_SPARKPOST_API_KEY' ); ?>
|
||||
<?php else : ?>
|
||||
<input type="password" spellcheck="false"
|
||||
name="wp-mail-smtp[<?php echo esc_attr( $this->get_slug() ); ?>][api_key]"
|
||||
value="<?php echo esc_attr( $this->connection_options->get( $this->get_slug(), 'api_key' ) ); ?>"
|
||||
id="wp-mail-smtp-setting-<?php echo esc_attr( $this->get_slug() ); ?>-api_key"
|
||||
/>
|
||||
<?php
|
||||
$slug = $this->get_slug();
|
||||
$value = $this->connection_options->get( $this->get_slug(), 'api_key' );
|
||||
|
||||
UI::hidden_password_field(
|
||||
[
|
||||
'name' => "wp-mail-smtp[{$slug}][api_key]",
|
||||
'id' => "wp-mail-smtp-setting-{$slug}-api_key",
|
||||
'value' => $value,
|
||||
'clear_text' => esc_html__( 'Remove API Key', 'wp-mail-smtp' ),
|
||||
]
|
||||
);
|
||||
?>
|
||||
<?php endif; ?>
|
||||
<p class="desc">
|
||||
<?php
|
||||
|
||||
@@ -239,6 +239,9 @@ class Queue {
|
||||
// Cleanup any attachments.
|
||||
$this->cleanup_attachments();
|
||||
|
||||
// Stop injecting the original initiator state.
|
||||
remove_filter( 'wp_mail_smtp_wp_mail_initiator_set_initiator', [ $this, 'apply_initiator_state' ] );
|
||||
|
||||
// Stop applying PHPMailer state.
|
||||
remove_action( 'phpmailer_init', [ $this, 'apply_mailer_state' ], PHP_INT_MAX );
|
||||
|
||||
|
||||
@@ -366,10 +366,17 @@ class Task {
|
||||
global $wpdb;
|
||||
|
||||
$limit = max( 0, intval( $limit ) );
|
||||
$query = 'DELETE FROM ' . $wpdb->prefix . 'actionscheduler_actions WHERE hook = "' . $this->action . '" AND status = "complete"';
|
||||
$query = $wpdb->prepare(
|
||||
"DELETE FROM {$wpdb->prefix}actionscheduler_actions WHERE hook = %s AND status = %s",
|
||||
$this->action,
|
||||
'complete'
|
||||
);
|
||||
|
||||
if ( $limit > 0 ) {
|
||||
$query .= " LIMIT {$limit}";
|
||||
$query .= $wpdb->prepare(
|
||||
' LIMIT %d',
|
||||
$limit
|
||||
);
|
||||
}
|
||||
|
||||
// phpcs:disable WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.NotPrepared
|
||||
|
||||
+1
-1
@@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) {
|
||||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInit473736c55a35b9a077f93cfc42f4bbf5::getLoader();
|
||||
return ComposerAutoloaderInit64c5864e234999e61d47e3bb28138d69::getLoader();
|
||||
|
||||
@@ -194,6 +194,8 @@ return array(
|
||||
'WPMailSMTP\\Pro\\Alerts\\OptionsInterface' => $baseDir . '/src/Pro/Alerts/OptionsInterface.php',
|
||||
'WPMailSMTP\\Pro\\Alerts\\Providers\\CustomWebhook\\Handler' => $baseDir . '/src/Pro/Alerts/Providers/CustomWebhook/Handler.php',
|
||||
'WPMailSMTP\\Pro\\Alerts\\Providers\\CustomWebhook\\Options' => $baseDir . '/src/Pro/Alerts/Providers/CustomWebhook/Options.php',
|
||||
'WPMailSMTP\\Pro\\Alerts\\Providers\\DiscordWebhook\\Handler' => $baseDir . '/src/Pro/Alerts/Providers/DiscordWebhook/Handler.php',
|
||||
'WPMailSMTP\\Pro\\Alerts\\Providers\\DiscordWebhook\\Options' => $baseDir . '/src/Pro/Alerts/Providers/DiscordWebhook/Options.php',
|
||||
'WPMailSMTP\\Pro\\Alerts\\Providers\\Email\\Handler' => $baseDir . '/src/Pro/Alerts/Providers/Email/Handler.php',
|
||||
'WPMailSMTP\\Pro\\Alerts\\Providers\\Email\\Options' => $baseDir . '/src/Pro/Alerts/Providers/Email/Options.php',
|
||||
'WPMailSMTP\\Pro\\Alerts\\Providers\\SlackWebhook\\Handler' => $baseDir . '/src/Pro/Alerts/Providers/SlackWebhook/Handler.php',
|
||||
@@ -227,6 +229,7 @@ return array(
|
||||
'WPMailSMTP\\Pro\\Emails\\Logs\\DeliveryVerification\\DeliveryStatus' => $baseDir . '/src/Pro/Emails/Logs/DeliveryVerification/DeliveryStatus.php',
|
||||
'WPMailSMTP\\Pro\\Emails\\Logs\\DeliveryVerification\\DeliveryVerification' => $baseDir . '/src/Pro/Emails/Logs/DeliveryVerification/DeliveryVerification.php',
|
||||
'WPMailSMTP\\Pro\\Emails\\Logs\\DeliveryVerification\\Mailgun\\DeliveryVerifier' => $baseDir . '/src/Pro/Emails/Logs/DeliveryVerification/Mailgun/DeliveryVerifier.php',
|
||||
'WPMailSMTP\\Pro\\Emails\\Logs\\DeliveryVerification\\Mailjet\\DeliveryVerifier' => $baseDir . '/src/Pro/Emails/Logs/DeliveryVerification/Mailjet/DeliveryVerifier.php',
|
||||
'WPMailSMTP\\Pro\\Emails\\Logs\\DeliveryVerification\\Postmark\\DeliveryVerifier' => $baseDir . '/src/Pro/Emails/Logs/DeliveryVerification/Postmark/DeliveryVerifier.php',
|
||||
'WPMailSMTP\\Pro\\Emails\\Logs\\DeliveryVerification\\SMTP2GO\\DeliveryVerifier' => $baseDir . '/src/Pro/Emails/Logs/DeliveryVerification/SMTP2GO/DeliveryVerifier.php',
|
||||
'WPMailSMTP\\Pro\\Emails\\Logs\\DeliveryVerification\\SMTPcom\\DeliveryVerifier' => $baseDir . '/src/Pro/Emails/Logs/DeliveryVerification/SMTPcom/DeliveryVerifier.php',
|
||||
@@ -284,6 +287,10 @@ return array(
|
||||
'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Mailgun\\Processor' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Providers/Mailgun/Processor.php',
|
||||
'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Mailgun\\Provider' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Providers/Mailgun/Provider.php',
|
||||
'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Mailgun\\Subscriber' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Providers/Mailgun/Subscriber.php',
|
||||
'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Mailjet\\Events\\Failed' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Providers/Mailjet/Events/Failed.php',
|
||||
'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Mailjet\\Processor' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Providers/Mailjet/Processor.php',
|
||||
'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Mailjet\\Provider' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Providers/Mailjet/Provider.php',
|
||||
'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Mailjet\\Subscriber' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Providers/Mailjet/Subscriber.php',
|
||||
'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Postmark\\Events\\Failed' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Providers/Postmark/Events/Failed.php',
|
||||
'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Postmark\\Processor' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Providers/Postmark/Processor.php',
|
||||
'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Postmark\\Provider' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Providers/Postmark/Provider.php',
|
||||
@@ -352,6 +359,7 @@ return array(
|
||||
'WPMailSMTP\\Pro\\Tasks\\Logs\\BulkVerifySentStatusTask' => $baseDir . '/src/Pro/Tasks/Logs/BulkVerifySentStatusTask.php',
|
||||
'WPMailSMTP\\Pro\\Tasks\\Logs\\ExportCleanupTask' => $baseDir . '/src/Pro/Tasks/Logs/ExportCleanupTask.php',
|
||||
'WPMailSMTP\\Pro\\Tasks\\Logs\\Mailgun\\VerifySentStatusTask' => $baseDir . '/src/Pro/Tasks/Logs/Mailgun/VerifySentStatusTask.php',
|
||||
'WPMailSMTP\\Pro\\Tasks\\Logs\\Mailjet\\VerifySentStatusTask' => $baseDir . '/src/Pro/Tasks/Logs/Mailjet/VerifySentStatusTask.php',
|
||||
'WPMailSMTP\\Pro\\Tasks\\Logs\\Postmark\\VerifySentStatusTask' => $baseDir . '/src/Pro/Tasks/Logs/Postmark/VerifySentStatusTask.php',
|
||||
'WPMailSMTP\\Pro\\Tasks\\Logs\\ResendTask' => $baseDir . '/src/Pro/Tasks/Logs/ResendTask.php',
|
||||
'WPMailSMTP\\Pro\\Tasks\\Logs\\SMTP2GO\\VerifySentStatusTask' => $baseDir . '/src/Pro/Tasks/Logs/SMTP2GO/VerifySentStatusTask.php',
|
||||
@@ -379,6 +387,8 @@ return array(
|
||||
'WPMailSMTP\\Providers\\MailerInterface' => $baseDir . '/src/Providers/MailerInterface.php',
|
||||
'WPMailSMTP\\Providers\\Mailgun\\Mailer' => $baseDir . '/src/Providers/Mailgun/Mailer.php',
|
||||
'WPMailSMTP\\Providers\\Mailgun\\Options' => $baseDir . '/src/Providers/Mailgun/Options.php',
|
||||
'WPMailSMTP\\Providers\\Mailjet\\Mailer' => $baseDir . '/src/Providers/Mailjet/Mailer.php',
|
||||
'WPMailSMTP\\Providers\\Mailjet\\Options' => $baseDir . '/src/Providers/Mailjet/Options.php',
|
||||
'WPMailSMTP\\Providers\\OptionsAbstract' => $baseDir . '/src/Providers/OptionsAbstract.php',
|
||||
'WPMailSMTP\\Providers\\OptionsInterface' => $baseDir . '/src/Providers/OptionsInterface.php',
|
||||
'WPMailSMTP\\Providers\\Outlook\\Options' => $baseDir . '/src/Providers/Outlook/Options.php',
|
||||
@@ -820,7 +830,6 @@ return array(
|
||||
'WPMailSMTP\\Vendor\\Symfony\\Polyfill\\Intl\\Idn\\Resources\\unidata\\DisallowedRanges' => $baseDir . '/vendor_prefixed/symfony/polyfill-intl-idn/Resources/unidata/DisallowedRanges.php',
|
||||
'WPMailSMTP\\Vendor\\Symfony\\Polyfill\\Intl\\Idn\\Resources\\unidata\\Regex' => $baseDir . '/vendor_prefixed/symfony/polyfill-intl-idn/Resources/unidata/Regex.php',
|
||||
'WPMailSMTP\\Vendor\\Symfony\\Polyfill\\Mbstring\\Mbstring' => $baseDir . '/vendor_prefixed/symfony/polyfill-mbstring/Mbstring.php',
|
||||
'WPMailSMTP\\Vendor\\Symfony\\Polyfill\\Php72\\Php72' => $baseDir . '/vendor_prefixed/symfony/polyfill-php72/Php72.php',
|
||||
'WPMailSMTP\\WP' => $baseDir . '/src/WP.php',
|
||||
'WPMailSMTP\\WPMailArgs' => $baseDir . '/src/WPMailArgs.php',
|
||||
'WPMailSMTP\\WPMailInitiator' => $baseDir . '/src/WPMailInitiator.php',
|
||||
|
||||
@@ -7,7 +7,6 @@ $baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
'2bb094e40611cb5eccea789f32aff634' => $baseDir . '/vendor_prefixed/symfony/polyfill-mbstring/bootstrap.php',
|
||||
'1fd84176824b5a44e7bd8da85eca7e14' => $baseDir . '/vendor_prefixed/symfony/polyfill-php72/bootstrap.php',
|
||||
'606299e0d90ec13f1e6b53164b8387df' => $baseDir . '/vendor_prefixed/symfony/polyfill-intl-idn/bootstrap.php',
|
||||
'2d822e735b5b1897d96a7a28221d6513' => $baseDir . '/vendor_prefixed/symfony/deprecation-contracts/function.php',
|
||||
'6fe0d6ea1deb6acc74bbe64573a83e1c' => $baseDir . '/vendor_prefixed/guzzlehttp/guzzle/src/functions_include.php',
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
// autoload_real.php @generated by Composer
|
||||
|
||||
class ComposerAutoloaderInit473736c55a35b9a077f93cfc42f4bbf5
|
||||
class ComposerAutoloaderInit64c5864e234999e61d47e3bb28138d69
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
@@ -22,17 +22,17 @@ class ComposerAutoloaderInit473736c55a35b9a077f93cfc42f4bbf5
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInit473736c55a35b9a077f93cfc42f4bbf5', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInit64c5864e234999e61d47e3bb28138d69', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit473736c55a35b9a077f93cfc42f4bbf5', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit64c5864e234999e61d47e3bb28138d69', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit473736c55a35b9a077f93cfc42f4bbf5::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit64c5864e234999e61d47e3bb28138d69::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInit473736c55a35b9a077f93cfc42f4bbf5::$files;
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInit64c5864e234999e61d47e3bb28138d69::$files;
|
||||
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
|
||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
||||
|
||||
@@ -4,11 +4,10 @@
|
||||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
class ComposerStaticInit473736c55a35b9a077f93cfc42f4bbf5
|
||||
class ComposerStaticInit64c5864e234999e61d47e3bb28138d69
|
||||
{
|
||||
public static $files = array (
|
||||
'2bb094e40611cb5eccea789f32aff634' => __DIR__ . '/../..' . '/vendor_prefixed/symfony/polyfill-mbstring/bootstrap.php',
|
||||
'1fd84176824b5a44e7bd8da85eca7e14' => __DIR__ . '/../..' . '/vendor_prefixed/symfony/polyfill-php72/bootstrap.php',
|
||||
'606299e0d90ec13f1e6b53164b8387df' => __DIR__ . '/../..' . '/vendor_prefixed/symfony/polyfill-intl-idn/bootstrap.php',
|
||||
'2d822e735b5b1897d96a7a28221d6513' => __DIR__ . '/../..' . '/vendor_prefixed/symfony/deprecation-contracts/function.php',
|
||||
'6fe0d6ea1deb6acc74bbe64573a83e1c' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/guzzle/src/functions_include.php',
|
||||
@@ -225,6 +224,8 @@ class ComposerStaticInit473736c55a35b9a077f93cfc42f4bbf5
|
||||
'WPMailSMTP\\Pro\\Alerts\\OptionsInterface' => __DIR__ . '/../..' . '/src/Pro/Alerts/OptionsInterface.php',
|
||||
'WPMailSMTP\\Pro\\Alerts\\Providers\\CustomWebhook\\Handler' => __DIR__ . '/../..' . '/src/Pro/Alerts/Providers/CustomWebhook/Handler.php',
|
||||
'WPMailSMTP\\Pro\\Alerts\\Providers\\CustomWebhook\\Options' => __DIR__ . '/../..' . '/src/Pro/Alerts/Providers/CustomWebhook/Options.php',
|
||||
'WPMailSMTP\\Pro\\Alerts\\Providers\\DiscordWebhook\\Handler' => __DIR__ . '/../..' . '/src/Pro/Alerts/Providers/DiscordWebhook/Handler.php',
|
||||
'WPMailSMTP\\Pro\\Alerts\\Providers\\DiscordWebhook\\Options' => __DIR__ . '/../..' . '/src/Pro/Alerts/Providers/DiscordWebhook/Options.php',
|
||||
'WPMailSMTP\\Pro\\Alerts\\Providers\\Email\\Handler' => __DIR__ . '/../..' . '/src/Pro/Alerts/Providers/Email/Handler.php',
|
||||
'WPMailSMTP\\Pro\\Alerts\\Providers\\Email\\Options' => __DIR__ . '/../..' . '/src/Pro/Alerts/Providers/Email/Options.php',
|
||||
'WPMailSMTP\\Pro\\Alerts\\Providers\\SlackWebhook\\Handler' => __DIR__ . '/../..' . '/src/Pro/Alerts/Providers/SlackWebhook/Handler.php',
|
||||
@@ -258,6 +259,7 @@ class ComposerStaticInit473736c55a35b9a077f93cfc42f4bbf5
|
||||
'WPMailSMTP\\Pro\\Emails\\Logs\\DeliveryVerification\\DeliveryStatus' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/DeliveryVerification/DeliveryStatus.php',
|
||||
'WPMailSMTP\\Pro\\Emails\\Logs\\DeliveryVerification\\DeliveryVerification' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/DeliveryVerification/DeliveryVerification.php',
|
||||
'WPMailSMTP\\Pro\\Emails\\Logs\\DeliveryVerification\\Mailgun\\DeliveryVerifier' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/DeliveryVerification/Mailgun/DeliveryVerifier.php',
|
||||
'WPMailSMTP\\Pro\\Emails\\Logs\\DeliveryVerification\\Mailjet\\DeliveryVerifier' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/DeliveryVerification/Mailjet/DeliveryVerifier.php',
|
||||
'WPMailSMTP\\Pro\\Emails\\Logs\\DeliveryVerification\\Postmark\\DeliveryVerifier' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/DeliveryVerification/Postmark/DeliveryVerifier.php',
|
||||
'WPMailSMTP\\Pro\\Emails\\Logs\\DeliveryVerification\\SMTP2GO\\DeliveryVerifier' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/DeliveryVerification/SMTP2GO/DeliveryVerifier.php',
|
||||
'WPMailSMTP\\Pro\\Emails\\Logs\\DeliveryVerification\\SMTPcom\\DeliveryVerifier' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/DeliveryVerification/SMTPcom/DeliveryVerifier.php',
|
||||
@@ -315,6 +317,10 @@ class ComposerStaticInit473736c55a35b9a077f93cfc42f4bbf5
|
||||
'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Mailgun\\Processor' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Providers/Mailgun/Processor.php',
|
||||
'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Mailgun\\Provider' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Providers/Mailgun/Provider.php',
|
||||
'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Mailgun\\Subscriber' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Providers/Mailgun/Subscriber.php',
|
||||
'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Mailjet\\Events\\Failed' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Providers/Mailjet/Events/Failed.php',
|
||||
'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Mailjet\\Processor' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Providers/Mailjet/Processor.php',
|
||||
'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Mailjet\\Provider' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Providers/Mailjet/Provider.php',
|
||||
'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Mailjet\\Subscriber' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Providers/Mailjet/Subscriber.php',
|
||||
'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Postmark\\Events\\Failed' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Providers/Postmark/Events/Failed.php',
|
||||
'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Postmark\\Processor' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Providers/Postmark/Processor.php',
|
||||
'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Postmark\\Provider' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Providers/Postmark/Provider.php',
|
||||
@@ -383,6 +389,7 @@ class ComposerStaticInit473736c55a35b9a077f93cfc42f4bbf5
|
||||
'WPMailSMTP\\Pro\\Tasks\\Logs\\BulkVerifySentStatusTask' => __DIR__ . '/../..' . '/src/Pro/Tasks/Logs/BulkVerifySentStatusTask.php',
|
||||
'WPMailSMTP\\Pro\\Tasks\\Logs\\ExportCleanupTask' => __DIR__ . '/../..' . '/src/Pro/Tasks/Logs/ExportCleanupTask.php',
|
||||
'WPMailSMTP\\Pro\\Tasks\\Logs\\Mailgun\\VerifySentStatusTask' => __DIR__ . '/../..' . '/src/Pro/Tasks/Logs/Mailgun/VerifySentStatusTask.php',
|
||||
'WPMailSMTP\\Pro\\Tasks\\Logs\\Mailjet\\VerifySentStatusTask' => __DIR__ . '/../..' . '/src/Pro/Tasks/Logs/Mailjet/VerifySentStatusTask.php',
|
||||
'WPMailSMTP\\Pro\\Tasks\\Logs\\Postmark\\VerifySentStatusTask' => __DIR__ . '/../..' . '/src/Pro/Tasks/Logs/Postmark/VerifySentStatusTask.php',
|
||||
'WPMailSMTP\\Pro\\Tasks\\Logs\\ResendTask' => __DIR__ . '/../..' . '/src/Pro/Tasks/Logs/ResendTask.php',
|
||||
'WPMailSMTP\\Pro\\Tasks\\Logs\\SMTP2GO\\VerifySentStatusTask' => __DIR__ . '/../..' . '/src/Pro/Tasks/Logs/SMTP2GO/VerifySentStatusTask.php',
|
||||
@@ -410,6 +417,8 @@ class ComposerStaticInit473736c55a35b9a077f93cfc42f4bbf5
|
||||
'WPMailSMTP\\Providers\\MailerInterface' => __DIR__ . '/../..' . '/src/Providers/MailerInterface.php',
|
||||
'WPMailSMTP\\Providers\\Mailgun\\Mailer' => __DIR__ . '/../..' . '/src/Providers/Mailgun/Mailer.php',
|
||||
'WPMailSMTP\\Providers\\Mailgun\\Options' => __DIR__ . '/../..' . '/src/Providers/Mailgun/Options.php',
|
||||
'WPMailSMTP\\Providers\\Mailjet\\Mailer' => __DIR__ . '/../..' . '/src/Providers/Mailjet/Mailer.php',
|
||||
'WPMailSMTP\\Providers\\Mailjet\\Options' => __DIR__ . '/../..' . '/src/Providers/Mailjet/Options.php',
|
||||
'WPMailSMTP\\Providers\\OptionsAbstract' => __DIR__ . '/../..' . '/src/Providers/OptionsAbstract.php',
|
||||
'WPMailSMTP\\Providers\\OptionsInterface' => __DIR__ . '/../..' . '/src/Providers/OptionsInterface.php',
|
||||
'WPMailSMTP\\Providers\\Outlook\\Options' => __DIR__ . '/../..' . '/src/Providers/Outlook/Options.php',
|
||||
@@ -851,7 +860,6 @@ class ComposerStaticInit473736c55a35b9a077f93cfc42f4bbf5
|
||||
'WPMailSMTP\\Vendor\\Symfony\\Polyfill\\Intl\\Idn\\Resources\\unidata\\DisallowedRanges' => __DIR__ . '/../..' . '/vendor_prefixed/symfony/polyfill-intl-idn/Resources/unidata/DisallowedRanges.php',
|
||||
'WPMailSMTP\\Vendor\\Symfony\\Polyfill\\Intl\\Idn\\Resources\\unidata\\Regex' => __DIR__ . '/../..' . '/vendor_prefixed/symfony/polyfill-intl-idn/Resources/unidata/Regex.php',
|
||||
'WPMailSMTP\\Vendor\\Symfony\\Polyfill\\Mbstring\\Mbstring' => __DIR__ . '/../..' . '/vendor_prefixed/symfony/polyfill-mbstring/Mbstring.php',
|
||||
'WPMailSMTP\\Vendor\\Symfony\\Polyfill\\Php72\\Php72' => __DIR__ . '/../..' . '/vendor_prefixed/symfony/polyfill-php72/Php72.php',
|
||||
'WPMailSMTP\\WP' => __DIR__ . '/../..' . '/src/WP.php',
|
||||
'WPMailSMTP\\WPMailArgs' => __DIR__ . '/../..' . '/src/WPMailArgs.php',
|
||||
'WPMailSMTP\\WPMailInitiator' => __DIR__ . '/../..' . '/src/WPMailInitiator.php',
|
||||
@@ -860,9 +868,9 @@ class ComposerStaticInit473736c55a35b9a077f93cfc42f4bbf5
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit473736c55a35b9a077f93cfc42f4bbf5::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit473736c55a35b9a077f93cfc42f4bbf5::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit473736c55a35b9a077f93cfc42f4bbf5::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit64c5864e234999e61d47e3bb28138d69::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit64c5864e234999e61d47e3bb28138d69::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit64c5864e234999e61d47e3bb28138d69::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php return array(
|
||||
'root' => array(
|
||||
'name' => 'awesomemotive/wp-mail-smtp',
|
||||
'pretty_version' => 'dev-4.1.1-release',
|
||||
'version' => 'dev-4.1.1-release',
|
||||
'reference' => 'd3b1c1541a4a598d6e2b0c715bdf3927ea2db1c9',
|
||||
'pretty_version' => 'dev-4.2.0-release',
|
||||
'version' => 'dev-4.2.0-release',
|
||||
'reference' => '5d5f34423d6f9f685c3c24920a345ccff860a1b1',
|
||||
'type' => 'wordpress-plugin',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
@@ -11,9 +11,9 @@
|
||||
),
|
||||
'versions' => array(
|
||||
'awesomemotive/wp-mail-smtp' => array(
|
||||
'pretty_version' => 'dev-4.1.1-release',
|
||||
'version' => 'dev-4.1.1-release',
|
||||
'reference' => 'd3b1c1541a4a598d6e2b0c715bdf3927ea2db1c9',
|
||||
'pretty_version' => 'dev-4.2.0-release',
|
||||
'version' => 'dev-4.2.0-release',
|
||||
'reference' => '5d5f34423d6f9f685c3c24920a345ccff860a1b1',
|
||||
'type' => 'wordpress-plugin',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
@@ -215,38 +215,38 @@
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'symfony/polyfill-intl-idn' => array(
|
||||
'pretty_version' => 'v1.29.0',
|
||||
'version' => '1.29.0.0',
|
||||
'reference' => 'a287ed7475f85bf6f61890146edbc932c0fff919',
|
||||
'pretty_version' => 'v1.31.0',
|
||||
'version' => '1.31.0.0',
|
||||
'reference' => 'c36586dcf89a12315939e00ec9b4474adcb1d773',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../symfony/polyfill-intl-idn',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'symfony/polyfill-intl-normalizer' => array(
|
||||
'pretty_version' => 'v1.29.0',
|
||||
'version' => '1.29.0.0',
|
||||
'reference' => 'bc45c394692b948b4d383a08d7753968bed9a83d',
|
||||
'pretty_version' => 'v1.31.0',
|
||||
'version' => '1.31.0.0',
|
||||
'reference' => '3833d7255cc303546435cb650316bff708a1c75c',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../symfony/polyfill-intl-normalizer',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'symfony/polyfill-mbstring' => array(
|
||||
'pretty_version' => 'v1.29.0',
|
||||
'version' => '1.29.0.0',
|
||||
'reference' => '9773676c8a1bb1f8d4340a62efe641cf76eda7ec',
|
||||
'pretty_version' => 'v1.31.0',
|
||||
'version' => '1.31.0.0',
|
||||
'reference' => '85181ba99b2345b0ef10ce42ecac37612d9fd341',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../symfony/polyfill-mbstring',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'symfony/polyfill-php72' => array(
|
||||
'pretty_version' => 'v1.29.0',
|
||||
'version' => '1.29.0.0',
|
||||
'reference' => '861391a8da9a04cbad2d232ddd9e4893220d6e25',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../symfony/polyfill-php72',
|
||||
'pretty_version' => 'v1.31.0',
|
||||
'version' => '1.31.0.0',
|
||||
'reference' => 'fa2ae56c44f03bed91a39bfc9822e31e7c5c38ce',
|
||||
'type' => 'metapackage',
|
||||
'install_path' => NULL,
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
|
||||
+15
-5
@@ -105,7 +105,7 @@ final class Idn
|
||||
*/
|
||||
public static function idn_to_ascii($domainName, $options = self::IDNA_DEFAULT, $variant = self::INTL_IDNA_VARIANT_UTS46, &$idna_info = [])
|
||||
{
|
||||
if (\PHP_VERSION_ID >= 70200 && self::INTL_IDNA_VARIANT_2003 === $variant) {
|
||||
if (self::INTL_IDNA_VARIANT_2003 === $variant) {
|
||||
@\trigger_error('idn_to_ascii(): INTL_IDNA_VARIANT_2003 is deprecated', \E_USER_DEPRECATED);
|
||||
}
|
||||
$options = ['CheckHyphens' => \true, 'CheckBidi' => self::INTL_IDNA_VARIANT_2003 === $variant || 0 !== ($options & self::IDNA_CHECK_BIDI), 'CheckJoiners' => self::INTL_IDNA_VARIANT_UTS46 === $variant && 0 !== ($options & self::IDNA_CHECK_CONTEXTJ), 'UseSTD3ASCIIRules' => 0 !== ($options & self::IDNA_USE_STD3_RULES), 'Transitional_Processing' => self::INTL_IDNA_VARIANT_2003 === $variant || 0 === ($options & self::IDNA_NONTRANSITIONAL_TO_ASCII), 'VerifyDnsLength' => \true];
|
||||
@@ -140,7 +140,7 @@ final class Idn
|
||||
*/
|
||||
public static function idn_to_utf8($domainName, $options = self::IDNA_DEFAULT, $variant = self::INTL_IDNA_VARIANT_UTS46, &$idna_info = [])
|
||||
{
|
||||
if (\PHP_VERSION_ID >= 70200 && self::INTL_IDNA_VARIANT_2003 === $variant) {
|
||||
if (self::INTL_IDNA_VARIANT_2003 === $variant) {
|
||||
@\trigger_error('idn_to_utf8(): INTL_IDNA_VARIANT_2003 is deprecated', \E_USER_DEPRECATED);
|
||||
}
|
||||
$info = new \WPMailSMTP\Vendor\Symfony\Polyfill\Intl\Idn\Info();
|
||||
@@ -198,8 +198,6 @@ final class Idn
|
||||
$data = self::lookupCodePointStatus($codePoint, $useSTD3ASCIIRules);
|
||||
switch ($data['status']) {
|
||||
case 'disallowed':
|
||||
$info->errors |= self::ERROR_DISALLOWED;
|
||||
// no break.
|
||||
case 'valid':
|
||||
$str .= \mb_chr($codePoint, 'utf-8');
|
||||
break;
|
||||
@@ -207,7 +205,7 @@ final class Idn
|
||||
// Do nothing.
|
||||
break;
|
||||
case 'mapped':
|
||||
$str .= $data['mapping'];
|
||||
$str .= $transitional && 0x1e9e === $codePoint ? 'ss' : $data['mapping'];
|
||||
break;
|
||||
case 'deviation':
|
||||
$info->transitionalDifferent = \true;
|
||||
@@ -247,6 +245,16 @@ final class Idn
|
||||
foreach ($labels as $i => $label) {
|
||||
$validationOptions = $options;
|
||||
if ('xn--' === \substr($label, 0, 4)) {
|
||||
// Step 4.1. If the label contains any non-ASCII code point (i.e., a code point greater than U+007F),
|
||||
// record that there was an error, and continue with the next label.
|
||||
if (\preg_match('/[^\\x00-\\x7F]/', $label)) {
|
||||
$info->errors |= self::ERROR_PUNYCODE;
|
||||
continue;
|
||||
}
|
||||
// Step 4.2. Attempt to convert the rest of the label to Unicode according to Punycode [RFC3492]. If
|
||||
// that conversion fails, record that there was an error, and continue
|
||||
// with the next label. Otherwise replace the original label in the string by the results of the
|
||||
// conversion.
|
||||
try {
|
||||
$label = self::punycodeDecode(\substr($label, 4));
|
||||
} catch (\Exception $e) {
|
||||
@@ -383,6 +391,8 @@ final class Idn
|
||||
if ('-' === \substr($label, -1, 1)) {
|
||||
$info->errors |= self::ERROR_TRAILING_HYPHEN;
|
||||
}
|
||||
} elseif ('xn--' === \substr($label, 0, 4)) {
|
||||
$info->errors |= self::ERROR_PUNYCODE;
|
||||
}
|
||||
// Step 4. The label must not contain a U+002E (.) FULL STOP.
|
||||
if (\false !== \strpos($label, '.')) {
|
||||
|
||||
+96
-14
@@ -47,6 +47,11 @@ namespace WPMailSMTP\Vendor\Symfony\Polyfill\Mbstring;
|
||||
* - mb_strstr - Finds first occurrence of a string within another
|
||||
* - mb_strwidth - Return width of string
|
||||
* - mb_substr_count - Count the number of substring occurrences
|
||||
* - mb_ucfirst - Make a string's first character uppercase
|
||||
* - mb_lcfirst - Make a string's first character lowercase
|
||||
* - mb_trim - Strip whitespace (or other characters) from the beginning and end of a string
|
||||
* - mb_ltrim - Strip whitespace (or other characters) from the beginning of a string
|
||||
* - mb_rtrim - Strip whitespace (or other characters) from the end of a string
|
||||
*
|
||||
* Not implemented:
|
||||
* - mb_convert_kana - Convert "kana" one from another ("zen-kaku", "han-kaku" and more)
|
||||
@@ -73,6 +78,13 @@ final class Mbstring
|
||||
private static $internalEncoding = 'UTF-8';
|
||||
public static function mb_convert_encoding($s, $toEncoding, $fromEncoding = null)
|
||||
{
|
||||
if (\is_array($s)) {
|
||||
$r = [];
|
||||
foreach ($s as $str) {
|
||||
$r[] = self::mb_convert_encoding($str, $toEncoding, $fromEncoding);
|
||||
}
|
||||
return $r;
|
||||
}
|
||||
if (\is_array($fromEncoding) || null !== $fromEncoding && \false !== \strpos($fromEncoding, ',')) {
|
||||
$fromEncoding = self::mb_detect_encoding($s, $fromEncoding);
|
||||
} else {
|
||||
@@ -337,10 +349,6 @@ final class Mbstring
|
||||
}
|
||||
public static function mb_check_encoding($var = null, $encoding = null)
|
||||
{
|
||||
if (\PHP_VERSION_ID < 70200 && \is_array($var)) {
|
||||
\trigger_error('mb_check_encoding() expects parameter 1 to be string, array given', \E_USER_WARNING);
|
||||
return null;
|
||||
}
|
||||
if (null === $encoding) {
|
||||
if (null === $var) {
|
||||
return \false;
|
||||
@@ -656,22 +664,15 @@ final class Mbstring
|
||||
}
|
||||
return $code;
|
||||
}
|
||||
public static function mb_str_pad(string $string, int $length, string $pad_string = ' ', int $pad_type = \STR_PAD_RIGHT, string $encoding = null) : string
|
||||
public static function mb_str_pad(string $string, int $length, string $pad_string = ' ', int $pad_type = \STR_PAD_RIGHT, ?string $encoding = null) : string
|
||||
{
|
||||
if (!\in_array($pad_type, [\STR_PAD_RIGHT, \STR_PAD_LEFT, \STR_PAD_BOTH], \true)) {
|
||||
throw new \ValueError('mb_str_pad(): Argument #4 ($pad_type) must be STR_PAD_LEFT, STR_PAD_RIGHT, or STR_PAD_BOTH');
|
||||
}
|
||||
if (null === $encoding) {
|
||||
$encoding = self::mb_internal_encoding();
|
||||
}
|
||||
try {
|
||||
$validEncoding = @self::mb_check_encoding('', $encoding);
|
||||
} catch (\ValueError $e) {
|
||||
throw new \ValueError(\sprintf('mb_str_pad(): Argument #5 ($encoding) must be a valid encoding, "%s" given', $encoding));
|
||||
}
|
||||
// BC for PHP 7.3 and lower
|
||||
if (!$validEncoding) {
|
||||
throw new \ValueError(\sprintf('mb_str_pad(): Argument #5 ($encoding) must be a valid encoding, "%s" given', $encoding));
|
||||
} else {
|
||||
self::assertEncoding($encoding, 'mb_str_pad(): Argument #5 ($encoding) must be a valid encoding, "%s" given');
|
||||
}
|
||||
if (self::mb_strlen($pad_string, $encoding) <= 0) {
|
||||
throw new \ValueError('mb_str_pad(): Argument #3 ($pad_string) must be a non-empty string');
|
||||
@@ -691,6 +692,28 @@ final class Mbstring
|
||||
return self::mb_substr(\str_repeat($pad_string, $leftPaddingLength), 0, $leftPaddingLength, $encoding) . $string . self::mb_substr(\str_repeat($pad_string, $rightPaddingLength), 0, $rightPaddingLength, $encoding);
|
||||
}
|
||||
}
|
||||
public static function mb_ucfirst(string $string, ?string $encoding = null) : string
|
||||
{
|
||||
if (null === $encoding) {
|
||||
$encoding = self::mb_internal_encoding();
|
||||
} else {
|
||||
self::assertEncoding($encoding, 'mb_ucfirst(): Argument #2 ($encoding) must be a valid encoding, "%s" given');
|
||||
}
|
||||
$firstChar = \mb_substr($string, 0, 1, $encoding);
|
||||
$firstChar = \mb_convert_case($firstChar, \MB_CASE_TITLE, $encoding);
|
||||
return $firstChar . \mb_substr($string, 1, null, $encoding);
|
||||
}
|
||||
public static function mb_lcfirst(string $string, ?string $encoding = null) : string
|
||||
{
|
||||
if (null === $encoding) {
|
||||
$encoding = self::mb_internal_encoding();
|
||||
} else {
|
||||
self::assertEncoding($encoding, 'mb_lcfirst(): Argument #2 ($encoding) must be a valid encoding, "%s" given');
|
||||
}
|
||||
$firstChar = \mb_substr($string, 0, 1, $encoding);
|
||||
$firstChar = \mb_convert_case($firstChar, \MB_CASE_LOWER, $encoding);
|
||||
return $firstChar . \mb_substr($string, 1, null, $encoding);
|
||||
}
|
||||
private static function getSubpart($pos, $part, $haystack, $encoding)
|
||||
{
|
||||
if (\false === $pos) {
|
||||
@@ -750,4 +773,63 @@ final class Mbstring
|
||||
}
|
||||
return $encoding;
|
||||
}
|
||||
public static function mb_trim(string $string, ?string $characters = null, ?string $encoding = null) : string
|
||||
{
|
||||
return self::mb_internal_trim('{^[%s]+|[%1$s]+$}Du', $string, $characters, $encoding, __FUNCTION__);
|
||||
}
|
||||
public static function mb_ltrim(string $string, ?string $characters = null, ?string $encoding = null) : string
|
||||
{
|
||||
return self::mb_internal_trim('{^[%s]+}Du', $string, $characters, $encoding, __FUNCTION__);
|
||||
}
|
||||
public static function mb_rtrim(string $string, ?string $characters = null, ?string $encoding = null) : string
|
||||
{
|
||||
return self::mb_internal_trim('{[%s]+$}D', $string, $characters, $encoding, __FUNCTION__);
|
||||
}
|
||||
private static function mb_internal_trim(string $regex, string $string, ?string $characters, ?string $encoding, string $function) : string
|
||||
{
|
||||
if (null === $encoding) {
|
||||
$encoding = self::mb_internal_encoding();
|
||||
} else {
|
||||
self::assertEncoding($encoding, $function . '(): Argument #3 ($encoding) must be a valid encoding, "%s" given');
|
||||
}
|
||||
if ('' === $characters) {
|
||||
return null === $encoding ? $string : self::mb_convert_encoding($string, $encoding);
|
||||
}
|
||||
if ('UTF-8' === $encoding) {
|
||||
$encoding = null;
|
||||
if (!\preg_match('//u', $string)) {
|
||||
$string = @\iconv('UTF-8', 'UTF-8//IGNORE', $string);
|
||||
}
|
||||
if (null !== $characters && !\preg_match('//u', $characters)) {
|
||||
$characters = @\iconv('UTF-8', 'UTF-8//IGNORE', $characters);
|
||||
}
|
||||
} else {
|
||||
$string = \iconv($encoding, 'UTF-8//IGNORE', $string);
|
||||
if (null !== $characters) {
|
||||
$characters = \iconv($encoding, 'UTF-8//IGNORE', $characters);
|
||||
}
|
||||
}
|
||||
if (null === $characters) {
|
||||
$characters = "\\0 \f\n\r\t\v
";
|
||||
} else {
|
||||
$characters = \preg_quote($characters);
|
||||
}
|
||||
$string = \preg_replace(\sprintf($regex, $characters), '', $string);
|
||||
if (null === $encoding) {
|
||||
return $string;
|
||||
}
|
||||
return \iconv('UTF-8', $encoding . '//IGNORE', $string);
|
||||
}
|
||||
private static function assertEncoding(string $encoding, string $errorFormat) : void
|
||||
{
|
||||
try {
|
||||
$validEncoding = @self::mb_check_encoding('', $encoding);
|
||||
} catch (\ValueError $e) {
|
||||
throw new \ValueError(\sprintf($errorFormat, $encoding));
|
||||
}
|
||||
// BC for PHP 7.3 and lower
|
||||
if (!$validEncoding) {
|
||||
throw new \ValueError(\sprintf($errorFormat, $encoding));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+21
@@ -136,6 +136,27 @@ if (!function_exists('mb_str_pad')) {
|
||||
function mb_str_pad(string $string, int $length, string $pad_string = ' ', int $pad_type = STR_PAD_RIGHT, ?string $encoding = null): string { return p\Mbstring::mb_str_pad($string, $length, $pad_string, $pad_type, $encoding); }
|
||||
}
|
||||
|
||||
if (!function_exists('mb_ucfirst')) {
|
||||
function mb_ucfirst(string $string, ?string $encoding = null): string { return p\Mbstring::mb_ucfirst($string, $encoding); }
|
||||
}
|
||||
|
||||
if (!function_exists('mb_lcfirst')) {
|
||||
function mb_lcfirst(string $string, ?string $encoding = null): string { return p\Mbstring::mb_lcfirst($string, $encoding); }
|
||||
}
|
||||
|
||||
if (!function_exists('mb_trim')) {
|
||||
function mb_trim(string $string, ?string $characters = null, ?string $encoding = null): string { return p\Mbstring::mb_trim($string, $characters, $encoding); }
|
||||
}
|
||||
|
||||
if (!function_exists('mb_ltrim')) {
|
||||
function mb_ltrim(string $string, ?string $characters = null, ?string $encoding = null): string { return p\Mbstring::mb_ltrim($string, $characters, $encoding); }
|
||||
}
|
||||
|
||||
if (!function_exists('mb_rtrim')) {
|
||||
function mb_rtrim(string $string, ?string $characters = null, ?string $encoding = null): string { return p\Mbstring::mb_rtrim($string, $characters, $encoding); }
|
||||
}
|
||||
|
||||
|
||||
if (extension_loaded('mbstring')) {
|
||||
return;
|
||||
}
|
||||
|
||||
+21
-1
@@ -93,7 +93,7 @@ if (!function_exists('mb_strstr')) {
|
||||
function mb_strstr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strstr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); }
|
||||
}
|
||||
if (!function_exists('mb_get_info')) {
|
||||
function mb_get_info(?string $type = 'all'): array|string|int|false { return p\Mbstring::mb_get_info((string) $type); }
|
||||
function mb_get_info(?string $type = 'all'): array|string|int|false|null { return p\Mbstring::mb_get_info((string) $type); }
|
||||
}
|
||||
if (!function_exists('mb_http_output')) {
|
||||
function mb_http_output(?string $encoding = null): string|bool { return p\Mbstring::mb_http_output($encoding); }
|
||||
@@ -132,6 +132,26 @@ if (!function_exists('mb_str_pad')) {
|
||||
function mb_str_pad(string $string, int $length, string $pad_string = ' ', int $pad_type = STR_PAD_RIGHT, ?string $encoding = null): string { return p\Mbstring::mb_str_pad($string, $length, $pad_string, $pad_type, $encoding); }
|
||||
}
|
||||
|
||||
if (!function_exists('mb_ucfirst')) {
|
||||
function mb_ucfirst($string, ?string $encoding = null): string { return p\Mbstring::mb_ucfirst($string, $encoding); }
|
||||
}
|
||||
|
||||
if (!function_exists('mb_lcfirst')) {
|
||||
function mb_lcfirst($string, ?string $encoding = null): string { return p\Mbstring::mb_lcfirst($string, $encoding); }
|
||||
}
|
||||
|
||||
if (!function_exists('mb_trim')) {
|
||||
function mb_trim(string $string, ?string $characters = null, ?string $encoding = null): string { return p\Mbstring::mb_trim($string, $characters, $encoding); }
|
||||
}
|
||||
|
||||
if (!function_exists('mb_ltrim')) {
|
||||
function mb_ltrim(string $string, ?string $characters = null, ?string $encoding = null): string { return p\Mbstring::mb_ltrim($string, $characters, $encoding); }
|
||||
}
|
||||
|
||||
if (!function_exists('mb_rtrim')) {
|
||||
function mb_rtrim(string $string, ?string $characters = null, ?string $encoding = null): string { return p\Mbstring::mb_rtrim($string, $characters, $encoding); }
|
||||
}
|
||||
|
||||
if (extension_loaded('mbstring')) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
Copyright (c) 2015-present Fabien Potencier
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is furnished
|
||||
to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
@@ -1,176 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace WPMailSMTP\Vendor\Symfony\Polyfill\Php72;
|
||||
|
||||
/**
|
||||
* @author Nicolas Grekas <p@tchwork.com>
|
||||
* @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
final class Php72
|
||||
{
|
||||
private static $hashMask;
|
||||
public static function utf8_encode($s)
|
||||
{
|
||||
$s .= $s;
|
||||
$len = \strlen($s);
|
||||
for ($i = $len >> 1, $j = 0; $i < $len; ++$i, ++$j) {
|
||||
switch (\true) {
|
||||
case $s[$i] < "€":
|
||||
$s[$j] = $s[$i];
|
||||
break;
|
||||
case $s[$i] < "À":
|
||||
$s[$j] = "Â";
|
||||
$s[++$j] = $s[$i];
|
||||
break;
|
||||
default:
|
||||
$s[$j] = "Ã";
|
||||
$s[++$j] = \chr(\ord($s[$i]) - 64);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return \substr($s, 0, $j);
|
||||
}
|
||||
public static function utf8_decode($s)
|
||||
{
|
||||
$s = (string) $s;
|
||||
$len = \strlen($s);
|
||||
for ($i = 0, $j = 0; $i < $len; ++$i, ++$j) {
|
||||
switch ($s[$i] & "ð") {
|
||||
case "À":
|
||||
case "Ð":
|
||||
$c = \ord($s[$i] & "\37") << 6 | \ord($s[++$i] & "?");
|
||||
$s[$j] = $c < 256 ? \chr($c) : '?';
|
||||
break;
|
||||
case "ð":
|
||||
++$i;
|
||||
// no break
|
||||
case "à":
|
||||
$s[$j] = '?';
|
||||
$i += 2;
|
||||
break;
|
||||
default:
|
||||
$s[$j] = $s[$i];
|
||||
}
|
||||
}
|
||||
return \substr($s, 0, $j);
|
||||
}
|
||||
public static function php_os_family()
|
||||
{
|
||||
if ('\\' === \DIRECTORY_SEPARATOR) {
|
||||
return 'Windows';
|
||||
}
|
||||
$map = ['Darwin' => 'Darwin', 'DragonFly' => 'BSD', 'FreeBSD' => 'BSD', 'NetBSD' => 'BSD', 'OpenBSD' => 'BSD', 'Linux' => 'Linux', 'SunOS' => 'Solaris'];
|
||||
return $map[\PHP_OS] ?? 'Unknown';
|
||||
}
|
||||
public static function spl_object_id($object)
|
||||
{
|
||||
if (null === self::$hashMask) {
|
||||
self::initHashMask();
|
||||
}
|
||||
if (null === ($hash = \spl_object_hash($object))) {
|
||||
return;
|
||||
}
|
||||
// On 32-bit systems, PHP_INT_SIZE is 4,
|
||||
return self::$hashMask ^ \hexdec(\substr($hash, 16 - (\PHP_INT_SIZE * 2 - 1), \PHP_INT_SIZE * 2 - 1));
|
||||
}
|
||||
public static function sapi_windows_vt100_support($stream, $enable = null)
|
||||
{
|
||||
if (!\is_resource($stream)) {
|
||||
\trigger_error('sapi_windows_vt100_support() expects parameter 1 to be resource, ' . \gettype($stream) . ' given', \E_USER_WARNING);
|
||||
return \false;
|
||||
}
|
||||
$meta = \stream_get_meta_data($stream);
|
||||
if ('STDIO' !== $meta['stream_type']) {
|
||||
\trigger_error('sapi_windows_vt100_support() was not able to analyze the specified stream', \E_USER_WARNING);
|
||||
return \false;
|
||||
}
|
||||
// We cannot actually disable vt100 support if it is set
|
||||
if (\false === $enable || !self::stream_isatty($stream)) {
|
||||
return \false;
|
||||
}
|
||||
// The native function does not apply to stdin
|
||||
$meta = \array_map('strtolower', $meta);
|
||||
$stdin = 'php://stdin' === $meta['uri'] || 'php://fd/0' === $meta['uri'];
|
||||
return !$stdin && (\false !== \getenv('ANSICON') || 'ON' === \getenv('ConEmuANSI') || 'xterm' === \getenv('TERM') || 'Hyper' === \getenv('TERM_PROGRAM'));
|
||||
}
|
||||
public static function stream_isatty($stream)
|
||||
{
|
||||
if (!\is_resource($stream)) {
|
||||
\trigger_error('stream_isatty() expects parameter 1 to be resource, ' . \gettype($stream) . ' given', \E_USER_WARNING);
|
||||
return \false;
|
||||
}
|
||||
if ('\\' === \DIRECTORY_SEPARATOR) {
|
||||
$stat = @\fstat($stream);
|
||||
// Check if formatted mode is S_IFCHR
|
||||
return $stat ? 020000 === ($stat['mode'] & 0170000) : \false;
|
||||
}
|
||||
return \function_exists('posix_isatty') && @\posix_isatty($stream);
|
||||
}
|
||||
private static function initHashMask()
|
||||
{
|
||||
$obj = (object) [];
|
||||
self::$hashMask = -1;
|
||||
// check if we are nested in an output buffering handler to prevent a fatal error with ob_start() below
|
||||
$obFuncs = ['ob_clean', 'ob_end_clean', 'ob_flush', 'ob_end_flush', 'ob_get_contents', 'ob_get_flush'];
|
||||
foreach (\debug_backtrace(\PHP_VERSION_ID >= 50400 ? \DEBUG_BACKTRACE_IGNORE_ARGS : \false) as $frame) {
|
||||
if (isset($frame['function'][0]) && !isset($frame['class']) && 'o' === $frame['function'][0] && \in_array($frame['function'], $obFuncs)) {
|
||||
$frame['line'] = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!empty($frame['line'])) {
|
||||
\ob_start();
|
||||
\debug_zval_dump($obj);
|
||||
self::$hashMask = (int) \substr(\ob_get_clean(), 17);
|
||||
}
|
||||
self::$hashMask ^= \hexdec(\substr(\spl_object_hash($obj), 16 - (\PHP_INT_SIZE * 2 - 1), \PHP_INT_SIZE * 2 - 1));
|
||||
}
|
||||
public static function mb_chr($code, $encoding = null)
|
||||
{
|
||||
if (0x80 > ($code %= 0x200000)) {
|
||||
$s = \chr($code);
|
||||
} elseif (0x800 > $code) {
|
||||
$s = \chr(0xc0 | $code >> 6) . \chr(0x80 | $code & 0x3f);
|
||||
} elseif (0x10000 > $code) {
|
||||
$s = \chr(0xe0 | $code >> 12) . \chr(0x80 | $code >> 6 & 0x3f) . \chr(0x80 | $code & 0x3f);
|
||||
} else {
|
||||
$s = \chr(0xf0 | $code >> 18) . \chr(0x80 | $code >> 12 & 0x3f) . \chr(0x80 | $code >> 6 & 0x3f) . \chr(0x80 | $code & 0x3f);
|
||||
}
|
||||
if ('UTF-8' !== ($encoding = $encoding ?? \mb_internal_encoding())) {
|
||||
$s = \mb_convert_encoding($s, $encoding, 'UTF-8');
|
||||
}
|
||||
return $s;
|
||||
}
|
||||
public static function mb_ord($s, $encoding = null)
|
||||
{
|
||||
if (null === $encoding) {
|
||||
$s = \mb_convert_encoding($s, 'UTF-8');
|
||||
} elseif ('UTF-8' !== $encoding) {
|
||||
$s = \mb_convert_encoding($s, 'UTF-8', $encoding);
|
||||
}
|
||||
if (1 === \strlen($s)) {
|
||||
return \ord($s);
|
||||
}
|
||||
$code = ($s = \unpack('C*', \substr($s, 0, 4))) ? $s[1] : 0;
|
||||
if (0xf0 <= $code) {
|
||||
return ($code - 0xf0 << 18) + ($s[2] - 0x80 << 12) + ($s[3] - 0x80 << 6) + $s[4] - 0x80;
|
||||
}
|
||||
if (0xe0 <= $code) {
|
||||
return ($code - 0xe0 << 12) + ($s[2] - 0x80 << 6) + $s[3] - 0x80;
|
||||
}
|
||||
if (0xc0 <= $code) {
|
||||
return ($code - 0xc0 << 6) + $s[2] - 0x80;
|
||||
}
|
||||
return $code;
|
||||
}
|
||||
}
|
||||
-57
@@ -1,57 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
use WPMailSMTP\Vendor\Symfony\Polyfill\Php72 as p;
|
||||
|
||||
if (\PHP_VERSION_ID >= 70200) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!defined('PHP_FLOAT_DIG')) {
|
||||
define('PHP_FLOAT_DIG', 15);
|
||||
}
|
||||
if (!defined('PHP_FLOAT_EPSILON')) {
|
||||
define('PHP_FLOAT_EPSILON', 2.2204460492503E-16);
|
||||
}
|
||||
if (!defined('PHP_FLOAT_MIN')) {
|
||||
define('PHP_FLOAT_MIN', 2.2250738585072E-308);
|
||||
}
|
||||
if (!defined('PHP_FLOAT_MAX')) {
|
||||
define('PHP_FLOAT_MAX', 1.7976931348623157E+308);
|
||||
}
|
||||
if (!defined('PHP_OS_FAMILY')) {
|
||||
define('PHP_OS_FAMILY', p\Php72::php_os_family());
|
||||
}
|
||||
|
||||
if ('\\' === \DIRECTORY_SEPARATOR && !function_exists('sapi_windows_vt100_support')) {
|
||||
function sapi_windows_vt100_support($stream, $enable = null) { return p\Php72::sapi_windows_vt100_support($stream, $enable); }
|
||||
}
|
||||
if (!function_exists('stream_isatty')) {
|
||||
function stream_isatty($stream) { return p\Php72::stream_isatty($stream); }
|
||||
}
|
||||
if (!function_exists('utf8_encode')) {
|
||||
function utf8_encode($string) { return p\Php72::utf8_encode($string); }
|
||||
}
|
||||
if (!function_exists('utf8_decode')) {
|
||||
function utf8_decode($string) { return p\Php72::utf8_decode($string); }
|
||||
}
|
||||
if (!function_exists('spl_object_id')) {
|
||||
function spl_object_id($object) { return p\Php72::spl_object_id($object); }
|
||||
}
|
||||
if (!function_exists('mb_ord')) {
|
||||
function mb_ord($string, $encoding = null) { return p\Php72::mb_ord($string, $encoding); }
|
||||
}
|
||||
if (!function_exists('mb_chr')) {
|
||||
function mb_chr($codepoint, $encoding = null) { return p\Php72::mb_chr($codepoint, $encoding); }
|
||||
}
|
||||
if (!function_exists('mb_scrub')) {
|
||||
function mb_scrub($string, $encoding = null) { $encoding = null === $encoding ? mb_internal_encoding() : $encoding; return mb_convert_encoding($string, $encoding, $encoding); }
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
* Plugin Name: WP Mail SMTP
|
||||
* Version: 4.1.1
|
||||
* Version: 4.2.0
|
||||
* 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.1' );
|
||||
define( 'WPMS_PLUGIN_VER', '4.2.0' );
|
||||
}
|
||||
if ( ! defined( 'WPMS_PHP_VER' ) ) {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user