WP Mail SMTP by WPForms - Version 1.4.0

Version Description

Download this release

Release Info

Developer slaFFik
Plugin Icon 128x128 WP Mail SMTP by WPForms
Version 1.4.0
Comparing to
See all releases

Code changes from version 1.3.3 to 1.4.0

Files changed (102) hide show
  1. assets/css/smtp-admin.min.css +1 -1
  2. assets/images/email/icon-check.png +0 -0
  3. assets/images/email/signature.png +0 -0
  4. assets/images/email/wp-mail-smtp.png +0 -0
  5. assets/images/email/wpforms-pro.png +0 -0
  6. class-wpms-am-notification.php +71 -66
  7. languages/wp-mail-smtp.pot +1115 -1055
  8. readme.txt +23 -4
  9. src/AM_Notification.php +71 -66
  10. src/Admin/Area.php +4 -1
  11. src/Admin/Pages/Misc.php +46 -4
  12. src/Admin/Pages/Settings.php +73 -30
  13. src/Admin/Pages/Test.php +318 -35
  14. src/Core.php +130 -76
  15. src/MailCatcher.php +25 -1
  16. src/Migration.php +1 -1
  17. src/Options.php +89 -55
  18. src/Providers/Gmail/Mailer.php +30 -4
  19. src/Providers/Gmail/Options.php +1 -1
  20. src/Providers/Mail/Mailer.php +15 -0
  21. src/Providers/MailerAbstract.php +19 -13
  22. src/Providers/MailerInterface.php +9 -0
  23. src/Providers/Mailgun/Mailer.php +49 -1
  24. src/Providers/Mailgun/Options.php +48 -0
  25. src/Providers/OptionsAbstract.php +1 -1
  26. src/Providers/Pepipost/Mailer.php +17 -0
  27. src/Providers/SMTP/Mailer.php +17 -0
  28. src/Providers/Sendgrid/Mailer.php +16 -1
  29. uninstall.php +10 -7
  30. vendor/composer/ClassLoader.php +1 -1
  31. vendor/google/apiclient-services/src/Google/Service/Gmail.php +61 -0
  32. vendor/google/apiclient-services/src/Google/Service/Gmail/Delegate.php +39 -0
  33. vendor/google/apiclient-services/src/Google/Service/Gmail/ListDelegatesResponse.php +38 -0
  34. vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersSettingsDelegates.php +119 -0
  35. vendor/google/auth/src/Credentials/GCECredentials.php +35 -21
  36. vendor/google/auth/src/Credentials/InsecureCredentials.php +68 -0
  37. vendor/google/auth/src/Credentials/UserRefreshCredentials.php +21 -0
  38. vendor/google/auth/src/CredentialsLoader.php +17 -4
  39. vendor/google/auth/src/OAuth2.php +23 -13
  40. vendor/monolog/monolog/src/Monolog/ErrorHandler.php +11 -2
  41. vendor/monolog/monolog/src/Monolog/Formatter/FluentdFormatter.php +1 -0
  42. vendor/monolog/monolog/src/Monolog/Formatter/HtmlFormatter.php +1 -1
  43. vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php +12 -6
  44. vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php +5 -3
  45. vendor/monolog/monolog/src/Monolog/Formatter/MongoDBFormatter.php +4 -2
  46. vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php +24 -7
  47. vendor/monolog/monolog/src/Monolog/Formatter/WildfireFormatter.php +2 -2
  48. vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php +18 -8
  49. vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php +2 -0
  50. vendor/monolog/monolog/src/Monolog/Handler/AbstractSyslogHandler.php +3 -3
  51. vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php +33 -23
  52. vendor/monolog/monolog/src/Monolog/Handler/BufferHandler.php +14 -2
  53. vendor/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php +5 -5
  54. vendor/monolog/monolog/src/Monolog/Handler/DeduplicationHandler.php +1 -1
  55. vendor/monolog/monolog/src/Monolog/Handler/ElasticSearchHandler.php +4 -4
  56. vendor/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php +4 -4
  57. vendor/monolog/monolog/src/Monolog/Handler/FilterHandler.php +2 -2
  58. vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php +1 -1
  59. vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php +30 -16
  60. vendor/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php +1 -1
  61. vendor/monolog/monolog/src/Monolog/Handler/GelfHandler.php +0 -8
  62. vendor/monolog/monolog/src/Monolog/Handler/GroupHandler.php +14 -2
  63. vendor/monolog/monolog/src/Monolog/Handler/HandlerInterface.php +2 -2
  64. vendor/monolog/monolog/src/Monolog/Handler/HandlerWrapper.php +9 -1
  65. vendor/monolog/monolog/src/Monolog/Handler/HipChatHandler.php +15 -0
  66. vendor/monolog/monolog/src/Monolog/Handler/IFTTTHandler.php +4 -4
  67. vendor/monolog/monolog/src/Monolog/Handler/InsightOpsHandler.php +62 -0
  68. vendor/monolog/monolog/src/Monolog/Handler/LogEntriesHandler.php +2 -2
  69. vendor/monolog/monolog/src/Monolog/Handler/MandrillHandler.php +1 -1
  70. vendor/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php +3 -1
  71. vendor/monolog/monolog/src/Monolog/Handler/PsrHandler.php +1 -1
  72. vendor/monolog/monolog/src/Monolog/Handler/PushoverHandler.php +3 -3
  73. vendor/monolog/monolog/src/Monolog/Handler/RavenHandler.php +6 -6
  74. vendor/monolog/monolog/src/Monolog/Handler/RollbarHandler.php +12 -0
  75. vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php +15 -3
  76. vendor/monolog/monolog/src/Monolog/Handler/Slack/SlackRecord.php +5 -5
  77. vendor/monolog/monolog/src/Monolog/Handler/SlackHandler.php +5 -0
  78. vendor/monolog/monolog/src/Monolog/Handler/SlackWebhookHandler.php +5 -0
  79. vendor/monolog/monolog/src/Monolog/Handler/SocketHandler.php +43 -4
  80. vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php +3 -3
  81. vendor/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php +14 -2
  82. vendor/monolog/monolog/src/Monolog/Handler/SyslogHandler.php +5 -5
  83. vendor/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php +6 -6
  84. vendor/monolog/monolog/src/Monolog/Handler/TestHandler.php +13 -3
  85. vendor/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php +10 -0
  86. vendor/monolog/monolog/src/Monolog/Logger.php +165 -74
  87. vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.php +1 -1
  88. vendor/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php +1 -1
  89. vendor/monolog/monolog/src/Monolog/Processor/MemoryProcessor.php +3 -3
  90. vendor/monolog/monolog/src/Monolog/Processor/MercurialProcessor.php +1 -1
  91. vendor/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php +1 -1
  92. vendor/monolog/monolog/src/Monolog/Processor/ProcessorInterface.php +25 -0
  93. vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php +4 -2
  94. vendor/monolog/monolog/src/Monolog/Processor/TagProcessor.php +1 -1
  95. vendor/monolog/monolog/src/Monolog/Processor/UidProcessor.php +15 -2
  96. vendor/monolog/monolog/src/Monolog/Processor/WebProcessor.php +1 -1
  97. vendor/monolog/monolog/src/Monolog/ResettableInterface.php +31 -0
  98. vendor/monolog/monolog/src/Monolog/SignalHandler.php +115 -0
  99. vendor/monolog/monolog/src/Monolog/Utils.php +25 -0
  100. vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA.php +5 -4
  101. vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger.php +0 -1
  102. wp_mail_smtp.php +32 -18
assets/css/smtp-admin.min.css CHANGED
@@ -1,3 +1,3 @@
1
- #wpcontent{padding-left:0 !important;position:relative}@media (max-width: 600px){#wpcontent{padding-top:46px}}@media (max-width: 600px){#wpbody{padding-top:0}}#wp-mail-smtp-header{background-color:#f1f3f7;border-top:3px solid #FF982D;padding:20px}#wp-mail-smtp-header img{display:block;margin:0;max-width:242px}@media (max-width: 782px){#wp-mail-smtp-header img{max-width:200px}}#wp-mail-smtp{margin:0}#wp-mail-smtp .wp-mail-smtp-page-title{background-color:#fff;font-size:14px;margin:0 0 20px 0;padding:0 20px}#wp-mail-smtp .wp-mail-smtp-page-title a{border-bottom:2px solid #fff;box-shadow:none;color:#666;display:inline-block;margin-right:30px;padding:20px 0 18px 0;text-decoration:none}#wp-mail-smtp .wp-mail-smtp-page-title a.active{border-bottom:2px solid #FF982D}#wp-mail-smtp .wp-mail-smtp-page-title a:hover{border-color:#999}#wp-mail-smtp .wp-mail-smtp-page{padding:0 20px}#wp-mail-smtp .wp-mail-smtp-page *,#wp-mail-smtp .wp-mail-smtp-page *::before,#wp-mail-smtp .wp-mail-smtp-page *::after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-clear:before{content:" ";display:table}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-clear:after{clear:both;content:" ";display:table}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row{border-bottom:1px solid #e4e4e4;padding:30px 0;font-size:14px;line-height:1.3}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row:first-of-type{padding-top:10px !important}@media (max-width: 781px){#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row{padding:20px 0}}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.inactive{display:none}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row .wp-mail-smtp-setting-mid-row-sep{margin:15px 0}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.section-heading{padding:20px 0}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.section-heading.no-desc h2,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.section-heading.no-desc h4{margin:0}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.section-heading .wp-mail-smtp-setting-field{margin:0;max-width:1000px}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox input[type=checkbox]{float:left;margin:1px 0 0 0}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox input[type=checkbox]+label{margin:0 0 0 8px}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox .desc{margin:0 0 0 30px}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox input[type=checkbox]+label+.desc{margin:8px 0 0 0}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-text .wp-mail-smtp-setting-label,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-password .wp-mail-smtp-setting-label,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-number .wp-mail-smtp-setting-label,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-email .wp-mail-smtp-setting-label{padding-top:8px}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-select .wp-mail-smtp-setting-label{padding-top:8px}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-radio .wp-mail-smtp-setting-field input[type=radio]{margin:-3px 10px 0 0}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-radio .wp-mail-smtp-setting-field label{margin-right:30px;display:inline-block}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox-toggle .wp-mail-smtp-setting-field label{vertical-align:middle;display:inline-block}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox-toggle .wp-mail-smtp-setting-field label:hover .wp-mail-smtp-setting-toggle-switch{background-color:#999}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox-toggle .wp-mail-smtp-setting-field input[type=checkbox]{display:none}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox-toggle .wp-mail-smtp-setting-field input[type=checkbox]:checked+.wp-mail-smtp-setting-toggle-switch{background-color:#83c11f}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox-toggle .wp-mail-smtp-setting-field input[type=checkbox]:checked+.wp-mail-smtp-setting-toggle-switch:before{-webkit-transform:translateX(19px);-ms-transform:translateX(19px);transform:translateX(19px)}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox-toggle .wp-mail-smtp-setting-field input[type=checkbox]:checked+.wp-mail-smtp-setting-toggle-switch+.wp-mail-smtp-setting-toggle-checked-label{display:inline-block}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox-toggle .wp-mail-smtp-setting-field input[type=checkbox]:checked+.wp-mail-smtp-setting-toggle-switch+.wp-mail-smtp-setting-toggle-checked-label+.wp-mail-smtp-setting-toggle-unchecked-label{display:none}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox-toggle .wp-mail-smtp-setting-field .wp-mail-smtp-setting-toggle-unchecked-label,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox-toggle .wp-mail-smtp-setting-field .wp-mail-smtp-setting-toggle-checked-label{text-transform:uppercase;font-weight:700;font-size:13px}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox-toggle .wp-mail-smtp-setting-field .wp-mail-smtp-setting-toggle-checked-label{display:none}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox-toggle .wp-mail-smtp-setting-field .wp-mail-smtp-setting-toggle-switch{position:relative;cursor:pointer;background-color:#ccc;border-radius:15px;-webkit-transition:all 0.2s ease-in-out;-moz-transition:all 0.2s ease-in-out;-ms-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out;vertical-align:middle;position:relative;display:inline-block;margin:0 5px 0 0;width:40px;height:20px}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox-toggle .wp-mail-smtp-setting-field .wp-mail-smtp-setting-toggle-switch:before{position:absolute;content:"";height:14px;width:14px;left:3px;top:3px;background-color:#fff;border-radius:50%;-webkit-transition:all 0.2s ease-in-out;-moz-transition:all 0.2s ease-in-out;-ms-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-mailer{padding-bottom:20px}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-mailer .wp-mail-smtp-mailer{display:inline-block;width:140px;margin-right:10px;margin-bottom:10px}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-mailer .wp-mail-smtp-mailer:last-child{margin-right:0}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-mailer .wp-mail-smtp-mailer .wp-mail-smtp-mailer-image{background:#fff;text-align:center;border:2px solid #E5E5E5;border-radius:4px;height:76px;position:relative;margin-bottom:10px;cursor:pointer;-webkit-transition:all 0.2s ease-in-out;-moz-transition:all 0.2s ease-in-out;-ms-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-mailer .wp-mail-smtp-mailer .wp-mail-smtp-mailer-image img{display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);opacity:0.6;-webkit-transition:all 0.2s ease-in-out;-moz-transition:all 0.2s ease-in-out;-ms-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-mailer .wp-mail-smtp-mailer.active .wp-mail-smtp-mailer-image{border-color:#FF982D}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-mailer .wp-mail-smtp-mailer.active .wp-mail-smtp-mailer-image img{opacity:1}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-mailer .wp-mail-smtp-mailer:hover .wp-mail-smtp-mailer-image{border-color:#ccc}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-mailer .wp-mail-smtp-mailer:hover .wp-mail-smtp-mailer-image img{opacity:1}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row h2,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row h4{color:#444;font-size:20px;font-weight:700;margin:0 0 6px 0}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row h3{color:#444;font-size:24px;font-weight:600;margin:0 0 20px 0}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row p{margin:12px 0 0;font-size:14px;line-height:1.3}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row p:first-of-type{margin:8px 0 0}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row p.desc{font-style:italic;color:#666}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=text],#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=email],#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=number],#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=password]{background-color:#fff;border:1px solid #ddd;border-radius:3px;box-shadow:none;color:#333;display:inline-block;vertical-align:middle;padding:7px 12px;margin:0 10px 0 0;width:400px;min-height:35px}@media (max-width: 959px){#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=text],#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=email],#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=number],#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=password]{width:300px}}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=text][readonly],#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=email][readonly],#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=number][readonly],#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=password][readonly]{background-color:#f9f9f9}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=text].small-text,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=email].small-text,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=number].small-text,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=password].small-text{width:75px}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=text]:focus,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=email]:focus,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=number]:focus,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=password]:focus{border-color:#bbb}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=text]:disabled,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=email]:disabled,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=number]:disabled,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=password]:disabled{opacity:0.6}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-label{display:block;float:left;width:200px;padding:0}@media (max-width: 781px){#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-label{float:none;width:100%;padding-bottom:15px}}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-label label{display:block;font-weight:600}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-field{display:block;margin:0 0 0 200px;max-width:800px}@media (max-width: 781px){#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-field{margin:0}}#wp-mail-smtp .wp-mail-smtp-page p.wp-mail-smtp-submit{margin:0;padding:25px 0}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-mailer-options .wp-mail-smtp-mailer-option .wp-mail-smtp-setting-row.section-heading{padding:20px 0 !important}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-mailer-options .wp-mail-smtp-mailer-option blockquote{background:#E5E5E5;border-radius:4px;color:#666;font-size:14px;margin:20px 0;padding:15px}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn{border:0;border-radius:3px;cursor:pointer;display:inline-block;margin:0;text-decoration:none;text-align:center;vertical-align:middle;white-space:nowrap;text-shadow:none;box-shadow:none;outline:none}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn .dashicons{font-size:16px;width:16px;height:16px}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn-block{display:block}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn-md{font-size:13px;font-weight:600;padding:8px 12px;min-height:35px}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn-lg{font-size:16px;font-weight:600;padding:16px 28px}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn-orange{background-color:#FF982D;border-color:#FF982D;color:#fff}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn-orange:hover,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn-orange:active,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn-orange:focus{background-color:#f97f00;border-color:#f97f00}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn-red{background-color:red;border-color:red;color:#fff}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn-red:hover,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn-red:active,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn-red:focus{background-color:darkred;border-color:darkred}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn-grey{background-color:#eee;border-color:#ccc;color:#666}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn-grey:hover,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn-grey:active,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn-grey:focus{background-color:#d7d7d7;border-color:#ccc;color:#444}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn-light-grey{background-color:#f5f5f5;border:1px solid #ccc;color:#666}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn-light-grey:hover,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn-light-grey:active,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn-light-grey:focus{background-color:#eee;color:#444}#wp-mail-smtp .wp-mail-smtp-page p{margin:0}#wp-mail-smtp .wp-mail-smtp-page .notice-inline{background:#fff;border-left:4px solid #fff;box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);margin:5px 0 15px;padding:1px 12px}#wp-mail-smtp .wp-mail-smtp-page .notice-inline.notice-success{border-left-color:#46b450}#wp-mail-smtp .wp-mail-smtp-page .notice-inline.notice-warning{border-left-color:#ffb900}#wp-mail-smtp .wp-mail-smtp-page .notice-inline.notice-error{border-left-color:#dc3232}#wp-mail-smtp .wp-mail-smtp-page .notice-inline.notice-info{border-left-color:#00a0d2}#wp-mail-smtp .wp-mail-smtp-page .notice p,#wp-mail-smtp .wp-mail-smtp-page .notice-inline p{margin:0.5em 0;padding:2px}#wp-mail-smtp .wp-mail-smtp-page pre{white-space:pre-line}#wp-mail-smtp .wp-mail-smtp-page.active{display:block}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-debug{background-color:#fff;padding:25px 20px 1px 25px}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-debug h2{color:#444;margin:1.4em 0 0.8em;font-size:16px;font-weight:700}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-debug p{font-size:14px;color:#555;margin-bottom:1.1em}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-debug ul,#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-debug ol{font-size:14px;color:#555;margin:0 0 1.1em 1.8em}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-debug ul li,#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-debug ol li{margin:0 0 8px 0;line-height:1.5}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-debug ul li:last-of-type,#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-debug ol li:last-of-type{margin:0}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-debug ul li ul,#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-debug ol li ul{list-style-type:disc}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-debug a{color:#FF982D}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-debug a:hover{color:#f97f00}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-debug .dashicons-star-filled{color:#FF982D;width:16px;height:16px;font-size:16px;vertical-align:text-top}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-debug .error-log-toggle{text-decoration:none;color:#444}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-debug .error-log-toggle:hover{color:#FF982D}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-debug .error-log-toggle .dashicons{font-size:15px;height:15px;width:15px;padding-top:3px;border:0;outline:0}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-debug .error-log{border-left:3px solid #ffb900;padding:0 0 0 20px;margin:0 0 10px 0;font-size:12px;display:none}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-debug .error-log pre{margin:0}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-debug .error-log-note{display:none}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-wpforms{background-color:#fff;padding:25px 20px;border:1px solid #dadada;margin:10px 0 0 0;position:relative}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-wpforms .wp-mail-smtp-wpforms-dismiss{position:absolute;right:10px;top:10px}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-wpforms .wp-mail-smtp-wpforms-dismiss button{background:none;border:none;color:#a9a9a9;cursor:pointer;margin:0;padding:0}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-wpforms h2{color:#444;margin-top:0;font-size:16px;font-weight:700}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-wpforms p{font-size:14px;color:#555;margin-bottom:1.1em}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-wpforms p:last-of-type{margin:0}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-wpforms .benefits{margin:0 0 16px 0;overflow:auto;max-width:900px}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-wpforms ul{margin:0;padding:0;width:50%;float:left}@media (max-width: 600px){#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-wpforms ul{width:100%;float:none}}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-wpforms ul li{margin:0;padding:0 0 2px 16px;color:#555;font-size:14px;position:relative}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-wpforms ul li:before{content:'+';position:absolute;top:-1px;left:0}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-wpforms a{color:#FF982D}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-wpforms a:hover,#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-wpforms a:active,#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-wpforms a:focus{color:#f97f00}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-wpforms .stars{text-decoration:none}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-wpforms .stars .dashicons{width:16px;height:16px;font-size:16px;vertical-align:text-top}
2
 
3
  /*# sourceMappingURL=smtp-admin.min.css.map */
1
+ #wpcontent{padding-left:0 !important;position:relative}@media (max-width: 600px){#wpcontent{padding-top:46px}}@media (max-width: 600px){#wpbody{padding-top:0}}#wp-mail-smtp-header{background-color:#f1f3f7;border-top:3px solid #FF982D;padding:20px}#wp-mail-smtp-header img{display:block;margin:0;max-width:242px}@media (max-width: 782px){#wp-mail-smtp-header img{max-width:200px}}#wp-mail-smtp{margin:0}#wp-mail-smtp .wp-mail-smtp-page-title{background-color:#fff;font-size:14px;margin:0 0 20px 0;padding:0 20px}#wp-mail-smtp .wp-mail-smtp-page-title a{border-bottom:2px solid #fff;box-shadow:none;color:#666;display:inline-block;margin-right:30px;padding:20px 0 18px 0;text-decoration:none}#wp-mail-smtp .wp-mail-smtp-page-title a.active{border-bottom:2px solid #FF982D}#wp-mail-smtp .wp-mail-smtp-page-title a:hover{border-color:#999}#wp-mail-smtp .wp-mail-smtp-page{padding:0 20px}#wp-mail-smtp .wp-mail-smtp-page *,#wp-mail-smtp .wp-mail-smtp-page *::before,#wp-mail-smtp .wp-mail-smtp-page *::after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-clear:before{content:" ";display:table}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-clear:after{clear:both;content:" ";display:table}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row{border-bottom:1px solid #e4e4e4;padding:30px 0;font-size:14px;line-height:1.3}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row:first-of-type{padding-top:10px !important}@media (max-width: 781px){#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row{padding:20px 0}}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.inactive{display:none}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row .wp-mail-smtp-setting-mid-row-sep{margin:15px 0}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.section-heading{padding:20px 0}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.section-heading.no-desc h2,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.section-heading.no-desc h4{margin:0}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.section-heading .wp-mail-smtp-setting-field{margin:0;max-width:1000px}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox input[type=checkbox]{float:left;margin:1px 0 0 0}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox input[type=checkbox]+label{margin:0 0 0 8px}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox .desc{margin:0 0 0 30px}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox input[type=checkbox]+label+.desc{margin:8px 0 0 0}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-text .wp-mail-smtp-setting-label,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-password .wp-mail-smtp-setting-label,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-number .wp-mail-smtp-setting-label,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-email .wp-mail-smtp-setting-label{padding-top:8px}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-select .wp-mail-smtp-setting-label{padding-top:8px}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-radio .wp-mail-smtp-setting-field input[type=radio]{margin:-3px 10px 0 0}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-radio .wp-mail-smtp-setting-field label{margin-right:30px;display:inline-block}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox-toggle .wp-mail-smtp-setting-field label{vertical-align:middle;display:inline-block}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox-toggle .wp-mail-smtp-setting-field label:hover .wp-mail-smtp-setting-toggle-switch{background-color:#999}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox-toggle .wp-mail-smtp-setting-field input[type=checkbox]{display:none}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox-toggle .wp-mail-smtp-setting-field input[type=checkbox]:checked+.wp-mail-smtp-setting-toggle-switch{background-color:#83c11f}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox-toggle .wp-mail-smtp-setting-field input[type=checkbox]:checked+.wp-mail-smtp-setting-toggle-switch:before{-webkit-transform:translateX(19px);-ms-transform:translateX(19px);transform:translateX(19px)}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox-toggle .wp-mail-smtp-setting-field input[type=checkbox]:checked+.wp-mail-smtp-setting-toggle-switch+.wp-mail-smtp-setting-toggle-checked-label{display:inline-block}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox-toggle .wp-mail-smtp-setting-field input[type=checkbox]:checked+.wp-mail-smtp-setting-toggle-switch+.wp-mail-smtp-setting-toggle-checked-label+.wp-mail-smtp-setting-toggle-unchecked-label{display:none}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox-toggle .wp-mail-smtp-setting-field .wp-mail-smtp-setting-toggle-unchecked-label,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox-toggle .wp-mail-smtp-setting-field .wp-mail-smtp-setting-toggle-checked-label{text-transform:uppercase;font-weight:700;font-size:13px}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox-toggle .wp-mail-smtp-setting-field .wp-mail-smtp-setting-toggle-checked-label{display:none}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox-toggle .wp-mail-smtp-setting-field .wp-mail-smtp-setting-toggle-switch{position:relative;cursor:pointer;background-color:#ccc;border-radius:15px;-webkit-transition:all 0.2s ease-in-out;-moz-transition:all 0.2s ease-in-out;-ms-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out;vertical-align:middle;position:relative;display:inline-block;margin:0 5px 0 0;width:40px;height:20px}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox-toggle .wp-mail-smtp-setting-field .wp-mail-smtp-setting-toggle-switch:before{position:absolute;content:"";height:14px;width:14px;left:3px;top:3px;background-color:#fff;border-radius:50%;-webkit-transition:all 0.2s ease-in-out;-moz-transition:all 0.2s ease-in-out;-ms-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-mailer{padding-bottom:20px}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-mailer .wp-mail-smtp-mailer{display:inline-block;width:140px;margin-right:10px;margin-bottom:10px}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-mailer .wp-mail-smtp-mailer:last-child{margin-right:0}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-mailer .wp-mail-smtp-mailer .wp-mail-smtp-mailer-image{background:#fff;text-align:center;border:2px solid #E5E5E5;border-radius:4px;height:76px;position:relative;margin-bottom:10px;cursor:pointer;-webkit-transition:all 0.2s ease-in-out;-moz-transition:all 0.2s ease-in-out;-ms-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-mailer .wp-mail-smtp-mailer .wp-mail-smtp-mailer-image img{display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);opacity:0.6;-webkit-transition:all 0.2s ease-in-out;-moz-transition:all 0.2s ease-in-out;-ms-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-mailer .wp-mail-smtp-mailer.active .wp-mail-smtp-mailer-image{border-color:#FF982D}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-mailer .wp-mail-smtp-mailer.active .wp-mail-smtp-mailer-image img{opacity:1}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-mailer .wp-mail-smtp-mailer:hover .wp-mail-smtp-mailer-image{border-color:#ccc}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-mailer .wp-mail-smtp-mailer:hover .wp-mail-smtp-mailer-image img{opacity:1}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row h2,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row h4{color:#444;font-size:20px;font-weight:700;margin:0 0 6px 0}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row h3{color:#444;font-size:24px;font-weight:600;margin:0 0 20px 0}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row p{margin:12px 0 0;font-size:14px;line-height:1.3}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row p:first-of-type{margin:8px 0 0}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row p.desc{font-style:italic;color:#666}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=text],#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=email],#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=number],#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=password]{background-color:#fff;border:1px solid #ddd;border-radius:3px;box-shadow:none;color:#333;display:inline-block;vertical-align:middle;padding:7px 12px;margin:0 10px 0 0;width:400px;min-height:35px}@media (max-width: 959px){#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=text],#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=email],#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=number],#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=password]{width:300px}}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=text][readonly],#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=email][readonly],#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=number][readonly],#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=password][readonly]{background-color:#f9f9f9}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=text].small-text,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=email].small-text,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=number].small-text,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=password].small-text{width:75px}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=text]:focus,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=email]:focus,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=number]:focus,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=password]:focus{border-color:#bbb}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=text]:disabled,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=email]:disabled,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=number]:disabled,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=password]:disabled{opacity:0.6}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-label{display:block;float:left;width:200px;padding:0}@media (max-width: 781px){#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-label{float:none;width:100%;padding-bottom:15px}}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-label label{display:block;font-weight:600}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-field{display:block;margin:0 0 0 200px;max-width:800px}@media (max-width: 781px){#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-field{margin:0}}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-submit{margin:0;padding:25px 0}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-submit .help-text{margin-left:10px;vertical-align:middle}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-mailer-options .wp-mail-smtp-mailer-option .wp-mail-smtp-setting-row.section-heading{padding:20px 0 !important}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-mailer-options .wp-mail-smtp-mailer-option blockquote{background:#E5E5E5;border-radius:4px;color:#666;font-size:14px;margin:20px 0;padding:15px}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn{border:0;border-radius:3px;cursor:pointer;display:inline-block;margin:0;text-decoration:none;text-align:center;vertical-align:middle;white-space:nowrap;text-shadow:none;box-shadow:none;outline:none}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn .dashicons{font-size:16px;width:16px;height:16px}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn:disabled{opacity:0.5;cursor:not-allowed}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn-block{display:block}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn-md{font-size:13px;font-weight:600;padding:8px 12px;min-height:35px}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn-lg{font-size:16px;font-weight:600;padding:16px 28px}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn-orange{background-color:#FF982D;border-color:#FF982D;color:#fff}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn-orange:hover,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn-orange:active,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn-orange:focus{background-color:#f97f00;border-color:#f97f00}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn-red{background-color:red;border-color:red;color:#fff}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn-red:hover,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn-red:active,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn-red:focus{background-color:darkred;border-color:darkred}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn-grey{background-color:#eee;border-color:#ccc;color:#666}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn-grey:hover,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn-grey:active,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn-grey:focus{background-color:#d7d7d7;border-color:#ccc;color:#444}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn-light-grey{background-color:#f5f5f5;border:1px solid #ccc;color:#666}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn-light-grey:hover,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn-light-grey:active,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn-light-grey:focus{background-color:#eee;color:#444}#wp-mail-smtp .wp-mail-smtp-page p{margin:0}#wp-mail-smtp .wp-mail-smtp-page .notice-inline{background:#fff;border-left:4px solid #fff;box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);margin:5px 0 15px;padding:1px 12px}#wp-mail-smtp .wp-mail-smtp-page .notice-inline.notice-success{border-left-color:#46b450}#wp-mail-smtp .wp-mail-smtp-page .notice-inline.notice-warning{border-left-color:#ffb900}#wp-mail-smtp .wp-mail-smtp-page .notice-inline.notice-error{border-left-color:#dc3232}#wp-mail-smtp .wp-mail-smtp-page .notice-inline.notice-info{border-left-color:#00a0d2}#wp-mail-smtp .wp-mail-smtp-page .notice p,#wp-mail-smtp .wp-mail-smtp-page .notice-inline p{margin:0.5em 0;padding:2px}#wp-mail-smtp .wp-mail-smtp-page pre{white-space:pre-line}#wp-mail-smtp .wp-mail-smtp-page.active{display:block}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-debug{background-color:#fff;padding:25px 20px 1px 25px}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-debug h2{color:#444;margin:1.4em 0 0.8em;font-size:16px;font-weight:700}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-debug p{font-size:14px;color:#555;margin-bottom:1.1em}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-debug ul,#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-debug ol{font-size:14px;color:#555;margin:0 0 1.1em 1.8em}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-debug ul li,#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-debug ol li{margin:0 0 8px 0;line-height:1.5}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-debug ul li:last-of-type,#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-debug ol li:last-of-type{margin:0}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-debug ul li ul,#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-debug ol li ul{list-style-type:disc}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-debug a{color:#FF982D}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-debug a:hover{color:#f97f00}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-debug .dashicons-star-filled{color:#FF982D;width:16px;height:16px;font-size:16px;vertical-align:text-top}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-debug .error-log-toggle{text-decoration:none;color:#444}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-debug .error-log-toggle:hover{color:#FF982D}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-debug .error-log-toggle .dashicons{font-size:15px;height:15px;width:15px;padding-top:3px;border:0;outline:0}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-debug .error-log{border-left:3px solid #ffb900;padding:0 0 0 20px;margin:0 0 10px 0;font-size:12px;display:none}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-debug .error-log pre{margin:0}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-debug .error-log-note{display:none}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-wpforms{background-color:#fff;padding:25px 20px;border:1px solid #dadada;margin:10px 0 0 0;position:relative}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-wpforms .wp-mail-smtp-wpforms-dismiss{position:absolute;right:10px;top:10px}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-wpforms .wp-mail-smtp-wpforms-dismiss button{background:none;border:none;color:#a9a9a9;cursor:pointer;margin:0;padding:0}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-wpforms h2{color:#444;margin-top:0;font-size:16px;font-weight:700}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-wpforms p{font-size:14px;color:#555;margin-bottom:1.1em}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-wpforms p:last-of-type{margin:0}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-wpforms .benefits{margin:0 0 16px 0;overflow:auto;max-width:900px}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-wpforms ul{margin:0;padding:0;width:50%;float:left}@media (max-width: 600px){#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-wpforms ul{width:100%;float:none}}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-wpforms ul li{margin:0;padding:0 0 2px 16px;color:#555;font-size:14px;position:relative}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-wpforms ul li:before{content:'+';position:absolute;top:-1px;left:0}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-wpforms a{color:#FF982D}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-wpforms a:hover,#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-wpforms a:active,#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-wpforms a:focus{color:#f97f00}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-wpforms .stars{text-decoration:none}#wp-mail-smtp .wp-mail-smtp-page #wp-mail-smtp-wpforms .stars .dashicons{width:16px;height:16px;font-size:16px;vertical-align:text-top}
2
 
3
  /*# sourceMappingURL=smtp-admin.min.css.map */
assets/images/email/icon-check.png ADDED
Binary file
assets/images/email/signature.png ADDED
Binary file
assets/images/email/wp-mail-smtp.png ADDED
Binary file
assets/images/email/wpforms-pro.png ADDED
Binary file
class-wpms-am-notification.php CHANGED
@@ -1,18 +1,19 @@
1
  <?php
2
 
3
  /**
4
- * Awesome Motive Notifications
5
  *
6
  * This creates a custom post type (if it doesn't exist) and calls the API to
7
  * retrieve notifications for this product.
8
  *
9
  * @package AwesomeMotive
10
- * @author Benjamin Rojas
11
  * @license GPL-2.0+
12
- * @copyright Copyright (c) 2017, Retyp LLC
13
- * @version 1.0.2
14
  */
15
  class WPMS_AM_Notification {
 
16
  /**
17
  * The api url we are calling.
18
  *
@@ -75,9 +76,10 @@ class WPMS_AM_Notification {
75
  */
76
  public function custom_post_type() {
77
  register_post_type( 'amn_' . $this->plugin, array(
78
- 'label' => $this->plugin . ' Announcements',
79
- 'can_export' => false,
80
- 'supports' => false,
 
81
  ) );
82
  }
83
 
@@ -87,7 +89,7 @@ class WPMS_AM_Notification {
87
  * @since 1.0.0
88
  */
89
  public function get_remote_notifications() {
90
- if ( ! current_user_can( apply_filters( 'am_notifications_display', 'manage_options' ) ) ) {
91
  return;
92
  }
93
 
@@ -131,10 +133,12 @@ class WPMS_AM_Notification {
131
  }
132
 
133
  if ( empty( $notifications ) ) {
134
- $new_notification_id = wp_insert_post( array(
135
- 'post_content' => wp_kses_post( $data->content ),
136
- 'post_type' => 'amn_' . $this->plugin,
137
- ) );
 
 
138
 
139
  update_post_meta( $new_notification_id, 'notification_id', absint( $data->id ) );
140
  update_post_meta( $new_notification_id, 'type', sanitize_text_field( trim( $data->type ) ) );
@@ -167,7 +171,7 @@ class WPMS_AM_Notification {
167
  *
168
  * @return WP_Post[] WP_Post that match the query.
169
  */
170
- public function get_plugin_notifications( $limit = -1, $args = array() ) {
171
  return get_posts(
172
  array(
173
  'posts_per_page' => $limit,
@@ -182,11 +186,11 @@ class WPMS_AM_Notification {
182
  * @since 1.0.0
183
  */
184
  public function display_notifications() {
185
- if ( ! current_user_can( apply_filters( 'am_notifications_display', 'manage_options' ) ) ) {
186
  return;
187
  }
188
 
189
- $plugin_notifications = $this->get_plugin_notifications( -1, array(
190
  'post_status' => 'all',
191
  'meta_key' => 'viewed',
192
  'meta_value' => '0',
@@ -199,18 +203,18 @@ class WPMS_AM_Notification {
199
  $dismissable = get_post_meta( $notification->ID, 'dismissable', true );
200
  $type = get_post_meta( $notification->ID, 'type', true );
201
  ?>
202
- <div class="am-notification am-notification-<?php echo $notification->ID; ?> notice notice-<?php echo $type; ?><?php echo $dismissable ? ' is-dismissible' : ''; ?>">
203
- <?php echo $notification->post_content; ?>
204
  </div>
205
  <script type="text/javascript">
206
- jQuery(document).ready(function ($) {
207
- $(document).on('click', '.am-notification-<?php echo $notification->ID; ?> button.notice-dismiss', function (event) {
208
- $.post(ajaxurl, {
209
  action: 'am_notification_dismiss',
210
- notification_id: '<?php echo $notification->ID; ?>'
211
- });
212
- });
213
- });
214
  </script>
215
  <?php
216
  }
@@ -325,11 +329,11 @@ class WPMS_AM_Notification {
325
  */
326
  public function get_plan_level() {
327
  // Prepare variables.
328
- $key = '';
329
- $level = '';
330
- $option = false;
331
  switch ( $this->plugin ) {
332
- case 'wpforms' :
333
  $option = get_option( 'wpforms_license' );
334
  $key = is_array( $option ) && isset( $option['key'] ) ? $option['key'] : '';
335
  $level = is_array( $option ) && isset( $option['type'] ) ? $option['type'] : '';
@@ -339,37 +343,33 @@ class WPMS_AM_Notification {
339
  $key = WPFORMS_LICENSE_KEY;
340
  }
341
  break;
342
- case 'mi' :
343
- $option = get_option( 'monsterinsights_license' );
344
- $key = is_array( $option ) && isset( $option['key'] ) ? $option['key'] : '';
345
- $level = is_array( $option ) && isset( $option['type'] ) ? $option['type'] : '';
346
-
347
- // Possibly check for a constant.
348
- if ( empty( $key ) && defined( 'MONSTERINSIGHTS_LICENSE_KEY' ) && is_string( MONSTERINSIGHTS_LICENSE_KEY ) && strlen( MONSTERINSIGHTS_LICENSE_KEY ) > 10 ) {
349
- $key = MONSTERINSIGHTS_LICENSE_KEY;
350
- }
351
- break;
352
- case 'sol' :
353
- $option = get_option( 'soliloquy' );
354
- $key = is_array( $option ) && isset( $option['key'] ) ? $option['key'] : '';
355
- $level = is_array( $option ) && isset( $option['type'] ) ? $option['type'] : '';
356
-
357
- // Possibly check for a constant.
358
- if ( empty( $key ) && defined( 'SOLILOQUY_LICENSE_KEY' ) ) {
359
- $key = SOLILOQUY_LICENSE_KEY;
360
- }
361
- break;
362
- case 'envira' :
363
- $option = get_option( 'envira_gallery' );
364
- $key = is_array( $option ) && isset( $option['key'] ) ? $option['key'] : '';
365
- $level = is_array( $option ) && isset( $option['type'] ) ? $option['type'] : '';
366
 
367
- // Possibly check for a constant.
368
- if ( empty( $key ) && defined( 'ENVIRA_LICENSE_KEY' ) ) {
369
- $key = ENVIRA_LICENSE_KEY;
 
 
 
 
 
 
 
 
 
 
370
  }
371
  break;
372
- case 'om' :
373
  $option = get_option( 'optin_monster_api' );
374
  $key = is_array( $option ) && isset( $option['api']['apikey'] ) ? $option['api']['apikey'] : '';
375
 
@@ -390,22 +390,27 @@ class WPMS_AM_Notification {
390
  $level = 'none';
391
  }
392
 
 
 
 
 
 
393
  // Normalize the level.
394
  switch ( $level ) {
395
- case 'bronze' :
396
- case 'personal' :
397
  $level = 'basic';
398
  break;
399
- case 'silver' :
400
- case 'multi' :
401
  $level = 'plus';
402
  break;
403
- case 'gold' :
404
- case 'developer' :
405
  $level = 'pro';
406
  break;
407
- case 'platinum' :
408
- case 'master' :
409
  $level = 'ultimate';
410
  break;
411
  }
@@ -420,7 +425,7 @@ class WPMS_AM_Notification {
420
  * @since 1.0.0
421
  */
422
  public function dismiss_notification() {
423
- if ( ! current_user_can( apply_filters( 'am_notifications_display', 'manage_options' ) ) ) {
424
  die;
425
  }
426
 
@@ -439,7 +444,7 @@ class WPMS_AM_Notification {
439
  public function revoke_notifications( $ids ) {
440
  // Loop through each of the IDs and find the post that has it as meta.
441
  foreach ( (array) $ids as $id ) {
442
- $notifications = $this->get_plugin_notifications( -1, array( 'post_status' => 'all', 'meta_key' => 'notification_id', 'meta_value' => $id ) );
443
  if ( $notifications ) {
444
  foreach ( $notifications as $notification ) {
445
  update_post_meta( $notification->ID, 'viewed', 1 );
1
  <?php
2
 
3
  /**
4
+ * Awesome Motive Notifications.
5
  *
6
  * This creates a custom post type (if it doesn't exist) and calls the API to
7
  * retrieve notifications for this product.
8
  *
9
  * @package AwesomeMotive
10
+ * @author AwesomeMotive Team
11
  * @license GPL-2.0+
12
+ * @copyright Copyright (c) 2018, Awesome Motive LLC
13
+ * @version 1.0.7
14
  */
15
  class WPMS_AM_Notification {
16
+
17
  /**
18
  * The api url we are calling.
19
  *
76
  */
77
  public function custom_post_type() {
78
  register_post_type( 'amn_' . $this->plugin, array(
79
+ 'label' => $this->plugin . ' Announcements',
80
+ 'can_export' => false,
81
+ 'supports' => false,
82
+ 'capability_type' => 'manage_options',
83
  ) );
84
  }
85
 
89
  * @since 1.0.0
90
  */
91
  public function get_remote_notifications() {
92
+ if ( ! apply_filters( 'am_notifications_display', is_super_admin() ) ) {
93
  return;
94
  }
95
 
133
  }
134
 
135
  if ( empty( $notifications ) ) {
136
+ $new_notification_id = wp_insert_post(
137
+ array(
138
+ 'post_content' => wp_kses_post( $data->content ),
139
+ 'post_type' => 'amn_' . $this->plugin,
140
+ )
141
+ );
142
 
143
  update_post_meta( $new_notification_id, 'notification_id', absint( $data->id ) );
144
  update_post_meta( $new_notification_id, 'type', sanitize_text_field( trim( $data->type ) ) );
171
  *
172
  * @return WP_Post[] WP_Post that match the query.
173
  */
174
+ public function get_plugin_notifications( $limit = - 1, $args = array() ) {
175
  return get_posts(
176
  array(
177
  'posts_per_page' => $limit,
186
  * @since 1.0.0
187
  */
188
  public function display_notifications() {
189
+ if ( ! apply_filters( 'am_notifications_display', is_super_admin() ) ) {
190
  return;
191
  }
192
 
193
+ $plugin_notifications = $this->get_plugin_notifications( - 1, array(
194
  'post_status' => 'all',
195
  'meta_key' => 'viewed',
196
  'meta_value' => '0',
203
  $dismissable = get_post_meta( $notification->ID, 'dismissable', true );
204
  $type = get_post_meta( $notification->ID, 'type', true );
205
  ?>
206
+ <div class="am-notification am-notification-<?php echo absint( $notification->ID ); ?> notice notice-<?php echo esc_attr( $type ); ?><?php echo $dismissable ? ' is-dismissible' : ''; ?>">
207
+ <?php echo wp_kses_post( $notification->post_content ); ?>
208
  </div>
209
  <script type="text/javascript">
210
+ jQuery( document ).ready( function ( $ ) {
211
+ $( document ).on( 'click', '.am-notification-<?php echo absint( $notification->ID ); ?> button.notice-dismiss', function ( event ) {
212
+ $.post( ajaxurl, {
213
  action: 'am_notification_dismiss',
214
+ notification_id: '<?php echo absint( $notification->ID ); ?>'
215
+ } );
216
+ } );
217
+ } );
218
  </script>
219
  <?php
220
  }
329
  */
330
  public function get_plan_level() {
331
  // Prepare variables.
332
+ $key = '';
333
+ $level = '';
334
+
335
  switch ( $this->plugin ) {
336
+ case 'wpforms':
337
  $option = get_option( 'wpforms_license' );
338
  $key = is_array( $option ) && isset( $option['key'] ) ? $option['key'] : '';
339
  $level = is_array( $option ) && isset( $option['type'] ) ? $option['type'] : '';
343
  $key = WPFORMS_LICENSE_KEY;
344
  }
345
  break;
346
+ case 'mi-lite':
347
+ case 'mi':
348
+ if ( version_compare( MONSTERINSIGHTS_VERSION, '6.9.0', '>=' ) ) {
349
+ if ( MonsterInsights()->license->get_site_license_type() ) {
350
+ $key = MonsterInsights()->license->get_site_license_key();
351
+ $type = MonsterInsights()->license->get_site_license_type();
352
+ } else if ( MonsterInsights()->license->get_network_license_type() ) {
353
+ $key = MonsterInsights()->license->get_network_license_key();
354
+ $type = MonsterInsights()->license->get_network_license_type();
355
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
356
 
357
+ // Check key fallbacks
358
+ if ( empty( $key ) ) {
359
+ $key = MonsterInsights()->license->get_license_key();
360
+ }
361
+ } else {
362
+ $option = get_option( 'monsterinsights_license' );
363
+ $key = is_array( $option ) && isset( $option['key'] ) ? $option['key'] : '';
364
+ $level = is_array( $option ) && isset( $option['type'] ) ? $option['type'] : '';
365
+
366
+ // Possibly check for a constant.
367
+ if ( empty( $key ) && defined( 'MONSTERINSIGHTS_LICENSE_KEY' ) && is_string( MONSTERINSIGHTS_LICENSE_KEY ) && strlen( MONSTERINSIGHTS_LICENSE_KEY ) > 10 ) {
368
+ $key = MONSTERINSIGHTS_LICENSE_KEY;
369
+ }
370
  }
371
  break;
372
+ case 'om':
373
  $option = get_option( 'optin_monster_api' );
374
  $key = is_array( $option ) && isset( $option['api']['apikey'] ) ? $option['api']['apikey'] : '';
375
 
390
  $level = 'none';
391
  }
392
 
393
+ // Possibly set the level to 'unknown' if a key is entered, but no level can be determined (such as manually entered key)
394
+ if ( ! empty( $key ) && empty( $level ) ) {
395
+ $level = 'unknown';
396
+ }
397
+
398
  // Normalize the level.
399
  switch ( $level ) {
400
+ case 'bronze':
401
+ case 'personal':
402
  $level = 'basic';
403
  break;
404
+ case 'silver':
405
+ case 'multi':
406
  $level = 'plus';
407
  break;
408
+ case 'gold':
409
+ case 'developer':
410
  $level = 'pro';
411
  break;
412
+ case 'platinum':
413
+ case 'master':
414
  $level = 'ultimate';
415
  break;
416
  }
425
  * @since 1.0.0
426
  */
427
  public function dismiss_notification() {
428
+ if ( ! apply_filters( 'am_notifications_display', is_super_admin() ) ) {
429
  die;
430
  }
431
 
444
  public function revoke_notifications( $ids ) {
445
  // Loop through each of the IDs and find the post that has it as meta.
446
  foreach ( (array) $ids as $id ) {
447
+ $notifications = $this->get_plugin_notifications( - 1, array( 'post_status' => 'all', 'meta_key' => 'notification_id', 'meta_value' => $id ) );
448
  if ( $notifications ) {
449
  foreach ( $notifications as $notification ) {
450
  update_post_meta( $notification->ID, 'viewed', 1 );
languages/wp-mail-smtp.pot CHANGED
@@ -1,1055 +1,1115 @@
1
- # Copyright (C) 2018 WP Mail SMTP
2
- # This file is distributed under the same license as the WP Mail SMTP package.
3
- msgid ""
4
- msgstr ""
5
- "Project-Id-Version: WP Mail SMTP\n"
6
- "MIME-Version: 1.0\n"
7
- "Content-Type: text/plain; charset=UTF-8\n"
8
- "Content-Transfer-Encoding: 8bit\n"
9
- "Language-Team: WPForms <support@wpforms.com>\n"
10
- "X-Poedit-Basepath: ..\n"
11
- "X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;_nx_noop:1,2,3c;_x:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
12
- "X-Poedit-SearchPath-0: .\n"
13
- "X-Poedit-SearchPathExcluded-0: *.js\n"
14
- "X-Poedit-SourceCharset: UTF-8\n"
15
- "Plural-Forms: nplurals=2; plural=(n != 1);\n"
16
-
17
- #. translators: %s - error code, returned by Google API.
18
- #. translators: %s - error code, returned by Google API.
19
- #: build/wp-mail-smtp/src/Admin/Area.php:95, src/Admin/Area.php:95
20
- msgid "There was an error while processing the authentication request: %s. Please try again."
21
- msgstr ""
22
-
23
- #: build/wp-mail-smtp/src/Admin/Area.php:102, src/Admin/Area.php:102
24
- msgid "There was an error while processing the authentication request. Please try again."
25
- msgstr ""
26
-
27
- #: build/wp-mail-smtp/src/Admin/Area.php:109, src/Admin/Area.php:109
28
- msgid "There was an error while processing the authentication request. Please make sure that you have Client ID and Client Secret both valid and saved."
29
- msgstr ""
30
-
31
- #: build/wp-mail-smtp/src/Admin/Area.php:118, src/Admin/Area.php:118
32
- msgid "You have successfully linked the current site with your Google API project. Now you can start sending emails through Google."
33
- msgstr ""
34
-
35
- #. translators: %s - Mailer anchor link.
36
- #. translators: %s - Mailer anchor link.
37
- #: build/wp-mail-smtp/src/Admin/Area.php:147, src/Admin/Area.php:147
38
- msgid "Thanks for using WP Mail SMTP! To complete the plugin setup and start sending emails, <strong>please select and configure your <a href=\"%s\">Mailer</a></strong>."
39
- msgstr ""
40
-
41
- #: build/wp-mail-smtp/src/Admin/Area.php:169, src/Admin/Area.php:169
42
- msgid "WP Mail SMTP Options"
43
- msgstr ""
44
-
45
- #: build/wp-mail-smtp/src/Admin/Area.php:170, build/wp-mail-smtp/wp_mail_smtp.php:652, src/Admin/Area.php:170, wp_mail_smtp.php:652
46
- msgid "WP Mail SMTP"
47
- msgstr ""
48
-
49
- #. translators: %1$s - WP.org link; %2$s - same WP.org link.
50
- #. translators: %1$s - WP.org link; %2$s - same WP.org link.
51
- #: build/wp-mail-smtp/src/Admin/Area.php:242, src/Admin/Area.php:242
52
- msgid "Please rate <strong>WP Mail SMTP</strong> <a href=\"%1$s\" target=\"_blank\" rel=\"noopener noreferrer\">&#9733;&#9733;&#9733;&#9733;&#9733;</a> on <a href=\"%2$s\" target=\"_blank\">WordPress.org</a> to help us spread the word. Thank you from the WP Mail SMTP team!"
53
- msgstr ""
54
-
55
- #: build/wp-mail-smtp/src/Admin/Area.php:410, src/Admin/Area.php:420
56
- msgid "WPForms related message was successfully dismissed"
57
- msgstr ""
58
-
59
- #: build/wp-mail-smtp/src/Admin/Area.php:444, build/wp-mail-smtp/src/Admin/Pages/Settings.php:26, build/wp-mail-smtp/wp_mail_smtp.php:758, src/Admin/Area.php:454, src/Admin/Pages/Settings.php:26, wp_mail_smtp.php:758
60
- msgid "Settings"
61
- msgstr ""
62
-
63
- #: build/wp-mail-smtp/src/Admin/Pages/Misc.php:24, src/Admin/Pages/Misc.php:24
64
- msgid "Misc"
65
- msgstr ""
66
-
67
- #: build/wp-mail-smtp/src/Admin/Pages/Misc.php:48, src/Admin/Pages/Misc.php:48
68
- msgid "General"
69
- msgstr ""
70
-
71
- #: build/wp-mail-smtp/src/Admin/Pages/Misc.php:55, build/wp-mail-smtp/wp_mail_smtp.php:395, build/wp-mail-smtp/wp_mail_smtp.php:400, src/Admin/Pages/Misc.php:55, wp_mail_smtp.php:395, wp_mail_smtp.php:400
72
- msgid "Hide Announcements"
73
- msgstr ""
74
-
75
- #: build/wp-mail-smtp/src/Admin/Pages/Misc.php:62, build/wp-mail-smtp/wp_mail_smtp.php:405, src/Admin/Pages/Misc.php:62, wp_mail_smtp.php:405
76
- msgid "Check this if you would like to hide plugin announcements and update details."
77
- msgstr ""
78
-
79
- #: build/wp-mail-smtp/src/Admin/Pages/Misc.php:69, src/Admin/Pages/Misc.php:69
80
- msgid "Uninstall WP Mail SMTP"
81
- msgstr ""
82
-
83
- #: build/wp-mail-smtp/src/Admin/Pages/Misc.php:75, src/Admin/Pages/Misc.php:75
84
- msgid "Check this if you would like to remove ALL WP Mail SMTP data upon plugin deletion. All settings will be unrecoverable."
85
- msgstr ""
86
-
87
- #: build/wp-mail-smtp/src/Admin/Pages/Misc.php:80, build/wp-mail-smtp/src/Admin/Pages/Settings.php:206, src/Admin/Pages/Misc.php:80, src/Admin/Pages/Settings.php:206
88
- msgid "Save Settings"
89
- msgstr ""
90
-
91
- #: build/wp-mail-smtp/src/Admin/Pages/Misc.php:111, build/wp-mail-smtp/src/Admin/Pages/Settings.php:389, src/Admin/Pages/Misc.php:111, src/Admin/Pages/Settings.php:389
92
- msgid "Settings were successfully saved."
93
- msgstr ""
94
-
95
- #: build/wp-mail-smtp/src/Admin/Pages/Settings.php:51, src/Admin/Pages/Settings.php:51
96
- msgid "Mail"
97
- msgstr ""
98
-
99
- #: build/wp-mail-smtp/src/Admin/Pages/Settings.php:58, build/wp-mail-smtp/wp_mail_smtp.php:296, src/Admin/Pages/Settings.php:58, wp_mail_smtp.php:296
100
- msgid "From Email"
101
- msgstr ""
102
-
103
- #: build/wp-mail-smtp/src/Admin/Pages/Settings.php:68, src/Admin/Pages/Settings.php:68
104
- msgid "The email address which emails are sent from."
105
- msgstr ""
106
-
107
- #: build/wp-mail-smtp/src/Admin/Pages/Settings.php:69, src/Admin/Pages/Settings.php:69
108
- msgid "If you using an email provider (Gmail, Yahoo, Outlook.com, etc) this should be your email address for that account."
109
- msgstr ""
110
-
111
- #: build/wp-mail-smtp/src/Admin/Pages/Settings.php:73, src/Admin/Pages/Settings.php:73
112
- msgid "Please note that other plugins can change this, to prevent this use the setting below."
113
- msgstr ""
114
-
115
- #: build/wp-mail-smtp/src/Admin/Pages/Settings.php:84, src/Admin/Pages/Settings.php:84
116
- msgid "Force From Email"
117
- msgstr ""
118
-
119
- #: build/wp-mail-smtp/src/Admin/Pages/Settings.php:88, src/Admin/Pages/Settings.php:88
120
- msgid "If checked, the From Email setting above will be used for all emails, ignoring values set by other plugins."
121
- msgstr ""
122
-
123
- #: build/wp-mail-smtp/src/Admin/Pages/Settings.php:96, build/wp-mail-smtp/wp_mail_smtp.php:315, src/Admin/Pages/Settings.php:96, wp_mail_smtp.php:315
124
- msgid "From Name"
125
- msgstr ""
126
-
127
- #: build/wp-mail-smtp/src/Admin/Pages/Settings.php:106, src/Admin/Pages/Settings.php:106
128
- msgid "The name which emails are sent from."
129
- msgstr ""
130
-
131
- #: build/wp-mail-smtp/src/Admin/Pages/Settings.php:117, src/Admin/Pages/Settings.php:117
132
- msgid "Force From Name"
133
- msgstr ""
134
-
135
- #: build/wp-mail-smtp/src/Admin/Pages/Settings.php:121, src/Admin/Pages/Settings.php:121
136
- msgid "If checked, the From Name setting above will be used for all emails, ignoring values set by other plugins."
137
- msgstr ""
138
-
139
- #: build/wp-mail-smtp/src/Admin/Pages/Settings.php:129, build/wp-mail-smtp/wp_mail_smtp.php:330, build/wp-mail-smtp/wp_mail_smtp.php:335, src/Admin/Pages/Settings.php:129, wp_mail_smtp.php:330, wp_mail_smtp.php:335
140
- msgid "Mailer"
141
- msgstr ""
142
-
143
- #: build/wp-mail-smtp/src/Admin/Pages/Settings.php:162, build/wp-mail-smtp/wp_mail_smtp.php:371, build/wp-mail-smtp/wp_mail_smtp.php:376, src/Admin/Pages/Settings.php:162, wp_mail_smtp.php:371, wp_mail_smtp.php:376
144
- msgid "Return Path"
145
- msgstr ""
146
-
147
- #: build/wp-mail-smtp/src/Admin/Pages/Settings.php:171, build/wp-mail-smtp/wp_mail_smtp.php:381, src/Admin/Pages/Settings.php:171, wp_mail_smtp.php:381
148
- msgid "Set the return-path to match the From Email"
149
- msgstr ""
150
-
151
- #: build/wp-mail-smtp/src/Admin/Pages/Settings.php:175, build/wp-mail-smtp/wp_mail_smtp.php:385, src/Admin/Pages/Settings.php:175, wp_mail_smtp.php:385
152
- msgid "Return Path indicates where non-delivery receipts - or bounce messages - are to be sent."
153
- msgstr ""
154
-
155
- #: build/wp-mail-smtp/src/Admin/Pages/Settings.php:176, src/Admin/Pages/Settings.php:176
156
- msgid "If unchecked bounce messages may be lost."
157
- msgstr ""
158
-
159
- #: build/wp-mail-smtp/src/Admin/Pages/Settings.php:244, src/Admin/Pages/Settings.php:244
160
- msgid "Get WPForms Pro and Support WP Mail SMTP"
161
- msgstr ""
162
-
163
- #: build/wp-mail-smtp/src/Admin/Pages/Settings.php:248, build/wp-mail-smtp/src/Admin/Pages/Test.php:767, src/Admin/Pages/Settings.php:248, src/Admin/Pages/Test.php:773
164
- msgid "WP Mail SMTP is a free plugin, and the team behind WPForms maintains it to give back to the WordPress community."
165
- msgstr ""
166
-
167
- #. translators: %s - WPForms.com URL.
168
- #. translators: %s - WPForms.com URL.
169
- #: build/wp-mail-smtp/src/Admin/Pages/Settings.php:256, src/Admin/Pages/Settings.php:256
170
- msgid "Please consider supporting us by <a href=\"%s\" target=\"_blank\" rel=\"noopener noreferrer\">purchasing a WPForms Pro license</a>. Aside from getting access to the best drag & drop WordPress form builder plugin, your purchase will help us continue to maintain and add new features to the WP Mail SMTP plugin while keeping this SMTP plugin free for the larger WordPress community."
171
- msgstr ""
172
-
173
- #. translators: %s - link to WP.org repo and 5 HTML encoded stars as a label.
174
- #. translators: %s - link to WP.org repo and 5 HTML encoded stars as a label.
175
- #: build/wp-mail-smtp/src/Admin/Pages/Settings.php:274, src/Admin/Pages/Settings.php:274
176
- msgid "We know that you will truly love WPForms. It has over 2000+ five star ratings (%s) and is active on over 1 million websites."
177
- msgstr ""
178
-
179
- #: build/wp-mail-smtp/src/Admin/Pages/Settings.php:280, src/Admin/Pages/Settings.php:280
180
- msgid "Other Benefits:"
181
- msgstr ""
182
-
183
- #: build/wp-mail-smtp/src/Admin/Pages/Settings.php:284, src/Admin/Pages/Settings.php:284
184
- msgid "Access to premium support for WP Mail SMTP"
185
- msgstr ""
186
-
187
- #: build/wp-mail-smtp/src/Admin/Pages/Settings.php:285, src/Admin/Pages/Settings.php:285
188
- msgid "Get the best drag & drop form builder"
189
- msgstr ""
190
-
191
- #: build/wp-mail-smtp/src/Admin/Pages/Settings.php:286, src/Admin/Pages/Settings.php:286
192
- msgid "All form features like file upload, pagination, etc"
193
- msgstr ""
194
-
195
- #: build/wp-mail-smtp/src/Admin/Pages/Settings.php:287, src/Admin/Pages/Settings.php:287
196
- msgid "Create surveys & polls with the surveys addon"
197
- msgstr ""
198
-
199
- #: build/wp-mail-smtp/src/Admin/Pages/Settings.php:290, src/Admin/Pages/Settings.php:290
200
- msgid "No future ads inside WP Mail SMTP admin"
201
- msgstr ""
202
-
203
- #: build/wp-mail-smtp/src/Admin/Pages/Settings.php:291, src/Admin/Pages/Settings.php:291
204
- msgid "Pre-made form templates and smart conditional logic"
205
- msgstr ""
206
-
207
- #: build/wp-mail-smtp/src/Admin/Pages/Settings.php:292, src/Admin/Pages/Settings.php:292
208
- msgid "500+ integrations with different marketing & payment services"
209
- msgstr ""
210
-
211
- #: build/wp-mail-smtp/src/Admin/Pages/Settings.php:293, src/Admin/Pages/Settings.php:293
212
- msgid "Collect signatures, geo-location data, and more"
213
- msgstr ""
214
-
215
- #. translators: %1$s - WPForms.com URL, %2$s - percents off.
216
- #. translators: %1$s - WPForms.com URL, %2$s - percents off.
217
- #: build/wp-mail-smtp/src/Admin/Pages/Settings.php:302, src/Admin/Pages/Settings.php:302
218
- msgid "<a href=\"%1$s\" target=\"_blank\" rel=\"noopener noreferrer\">Get WPForms Pro and support WP Mail SMTP</a> - use coupon \"<strong>thankyou</strong>\" to save %2$s off your purchase."
219
- msgstr ""
220
-
221
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:36, src/Admin/Pages/Test.php:36
222
- msgid "Email Test"
223
- msgstr ""
224
-
225
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:58, build/wp-mail-smtp/wp_mail_smtp.php:598, src/Admin/Pages/Test.php:58, wp_mail_smtp.php:598
226
- msgid "Send a Test Email"
227
- msgstr ""
228
-
229
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:65, src/Admin/Pages/Test.php:65
230
- msgid "Send To"
231
- msgstr ""
232
-
233
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:70, src/Admin/Pages/Test.php:70
234
- msgid "Type an email address here and then click a button below to generate a test email."
235
- msgstr ""
236
-
237
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:76, src/Admin/Pages/Test.php:76
238
- msgid "Send Email"
239
- msgstr ""
240
-
241
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:97, src/Admin/Pages/Test.php:97
242
- msgid "Test failed. Please use a valid email address and try to resend the test email."
243
- msgstr ""
244
-
245
- #. translators: %s - email address a test email will be sent to.
246
- #. translators: %s - email address a test email will be sent to.
247
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:121, src/Admin/Pages/Test.php:121
248
- msgid "Test email to %s"
249
- msgstr ""
250
-
251
- #. translators: %s - mailer name.
252
- #. translators: %s - mailer name.
253
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:124, src/Admin/Pages/Test.php:124
254
- msgid "This email was sent by %s mailer, and generated by the WP Mail SMTP WordPress plugin."
255
- msgstr ""
256
-
257
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:136, src/Admin/Pages/Test.php:136
258
- msgid "Your email was sent successfully!"
259
- msgstr ""
260
-
261
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:247, src/Admin/Pages/Test.php:247
262
- msgid "SSL certificate issue."
263
- msgstr ""
264
-
265
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:248, src/Admin/Pages/Test.php:248
266
- msgid "This means your web server cannot reliably make secure connections (make requests to HTTPS sites)."
267
- msgstr ""
268
-
269
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:249, build/wp-mail-smtp/src/Admin/Pages/Test.php:296, src/Admin/Pages/Test.php:249, src/Admin/Pages/Test.php:300
270
- msgid "Typically this error is returned when web server is not configured properly."
271
- msgstr ""
272
-
273
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:252, src/Admin/Pages/Test.php:252
274
- msgid "Contact your web hosting provider and inform them your site has an issue with SSL certificates."
275
- msgstr ""
276
-
277
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:253, build/wp-mail-smtp/src/Admin/Pages/Test.php:300, src/Admin/Pages/Test.php:253, src/Admin/Pages/Test.php:304
278
- msgid "The exact error you can provide them is in the Error log, available at the bottom of this page."
279
- msgstr ""
280
-
281
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:254, build/wp-mail-smtp/src/Admin/Pages/Test.php:301, src/Admin/Pages/Test.php:254, src/Admin/Pages/Test.php:305
282
- msgid "Ask them to resolve the issue then try again."
283
- msgstr ""
284
-
285
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:265, src/Admin/Pages/Test.php:265
286
- msgid "Could not connect to host."
287
- msgstr ""
288
-
289
- #. translators: %s - SMTP host address.
290
- #. translators: %s - SMTP host address.
291
- #. translators: %s - SMTP host address.
292
- #. translators: %s - SMTP host address.
293
- #. translators: %s - SMTP host address.
294
- #. translators: %s - SMTP host address.
295
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:268, build/wp-mail-smtp/src/Admin/Pages/Test.php:293, build/wp-mail-smtp/src/Admin/Pages/Test.php:364, src/Admin/Pages/Test.php:269, src/Admin/Pages/Test.php:296, src/Admin/Pages/Test.php:369
296
- msgid "This means your web server was unable to connect to %s."
297
- msgstr ""
298
-
299
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:271, src/Admin/Pages/Test.php:273
300
- msgid "Typically this error is returned your web server is blocking the connections or the SMTP host denying the request."
301
- msgstr ""
302
-
303
- #. translators: %s - SMTP host address.
304
- #. translators: %s - SMTP host address.
305
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:276, src/Admin/Pages/Test.php:278
306
- msgid "Contact your web hosting provider and ask them to verify your server can connect to %s. Additionally, ask them if a firewall or security policy may be preventing the connection."
307
- msgstr ""
308
-
309
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:279, src/Admin/Pages/Test.php:281
310
- msgid "If using \"Other SMTP\" Mailer, triple check your SMTP settings including host address, email, and password."
311
- msgstr ""
312
-
313
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:280, src/Admin/Pages/Test.php:282
314
- msgid "If using \"Other SMTP\" Mailer, contact your SMTP host to confirm they are accepting outside connections with the settings you have configured (address, username, port, security, etc)."
315
- msgstr ""
316
-
317
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:290, src/Admin/Pages/Test.php:292
318
- msgid "Could not connect to your host."
319
- msgstr ""
320
-
321
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:299, src/Admin/Pages/Test.php:303
322
- msgid "Contact your web hosting provider and inform them you are having issues making outbound connections."
323
- msgstr ""
324
-
325
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:311, src/Admin/Pages/Test.php:315
326
- msgid "Could not authenticate your SMTP account."
327
- msgstr ""
328
-
329
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:312, src/Admin/Pages/Test.php:316
330
- msgid "This means we were able to connect to your SMTP host, but were not able to proceed using the email/password in the settings."
331
- msgstr ""
332
-
333
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:313, src/Admin/Pages/Test.php:317
334
- msgid "Typically this error is returned when the email or password is not correct or is not what the SMTP host is expecting."
335
- msgstr ""
336
-
337
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:316, src/Admin/Pages/Test.php:320
338
- msgid "Triple check your SMTP settings including host address, email, and password. If you have recently reset your password you will need to update the settings."
339
- msgstr ""
340
-
341
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:317, build/wp-mail-smtp/src/Admin/Pages/Test.php:392, src/Admin/Pages/Test.php:321, src/Admin/Pages/Test.php:398
342
- msgid "Contact your SMTP host to confirm you are using the correct username and password."
343
- msgstr ""
344
-
345
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:318, build/wp-mail-smtp/src/Admin/Pages/Test.php:393, src/Admin/Pages/Test.php:322, src/Admin/Pages/Test.php:399
346
- msgid "Verify with your SMTP host that your account has permissions to send emails using outside connections."
347
- msgstr ""
348
-
349
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:328, src/Admin/Pages/Test.php:332
350
- msgid "Error due to unsolicited and/or bulk e-mail."
351
- msgstr ""
352
-
353
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:329, src/Admin/Pages/Test.php:333
354
- msgid "This means the connection to your SMTP host was made successfully, but the host rejected the email."
355
- msgstr ""
356
-
357
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:330, src/Admin/Pages/Test.php:334
358
- msgid "Typically this error is returned when your are sending too many e-mails or e-mails that have been identified as spam."
359
- msgstr ""
360
-
361
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:333, src/Admin/Pages/Test.php:337
362
- msgid "Check the emails that are sending are sending individually. Example: email is not sending to 30 recipients. You can install any WordPress e-mail logging plugin to do that."
363
- msgstr ""
364
-
365
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:334, src/Admin/Pages/Test.php:338
366
- msgid "Contact your SMTP host to ask about sending/rate limits."
367
- msgstr ""
368
-
369
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:335, src/Admin/Pages/Test.php:339
370
- msgid "Verify with them your SMTP account is in good standing and your account has not been flagged."
371
- msgstr ""
372
-
373
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:345, src/Admin/Pages/Test.php:349
374
- msgid "Unauthenticated senders are not allowed."
375
- msgstr ""
376
-
377
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:346, src/Admin/Pages/Test.php:350
378
- msgid "This means the connection to your SMTP host was made successfully, but you should enable Authentication and provide correct Username and Password."
379
- msgstr ""
380
-
381
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:349, src/Admin/Pages/Test.php:353
382
- msgid "Go to WP Mail SMTP plugin Settings page."
383
- msgstr ""
384
-
385
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:350, src/Admin/Pages/Test.php:354
386
- msgid "Enable Authentication"
387
- msgstr ""
388
-
389
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:351, src/Admin/Pages/Test.php:355
390
- msgid "Enter correct SMTP Username (usually this is an email address) and Password in the appropriate fields."
391
- msgstr ""
392
-
393
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:361, src/Admin/Pages/Test.php:365
394
- msgid "Could not connect to the SMTP host."
395
- msgstr ""
396
-
397
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:367, build/wp-mail-smtp/src/Admin/Pages/Test.php:688, src/Admin/Pages/Test.php:373, src/Admin/Pages/Test.php:694
398
- msgid "Typically this error is returned for one of the following reasons:"
399
- msgstr ""
400
-
401
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:368, src/Admin/Pages/Test.php:374
402
- msgid "SMTP settings are incorrect (wrong port, security setting, incorrect host)."
403
- msgstr ""
404
-
405
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:369, build/wp-mail-smtp/src/Admin/Pages/Test.php:690, src/Admin/Pages/Test.php:375, src/Admin/Pages/Test.php:696
406
- msgid "Your web server is blocking the connection."
407
- msgstr ""
408
-
409
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:370, src/Admin/Pages/Test.php:376
410
- msgid "Your SMTP host is rejecting the connection."
411
- msgstr ""
412
-
413
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:373, src/Admin/Pages/Test.php:379
414
- msgid "Triple check your SMTP settings including host address, email, and password, port, and security."
415
- msgstr ""
416
-
417
- #. translators: %1$s - SMTP host address, %2$s - SMTP port, %3$s - SMTP encryption.
418
- #. translators: %1$s - SMTP host address, %2$s - SMTP port, %3$s - SMTP encryption.
419
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:377, src/Admin/Pages/Test.php:383
420
- msgid "Contact your web hosting provider and ask them to verify your server can connect to %1$s on port %2$s using %3$s encryption. Additionally, ask them if a firewall or security policy may be preventing the connection - many shared hosts block certain ports.<br><strong>Note: this is the most common cause of this issue.</strong>"
421
- msgstr ""
422
-
423
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:390, src/Admin/Pages/Test.php:396
424
- msgid "no"
425
- msgstr ""
426
-
427
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:403, build/wp-mail-smtp/src/Admin/Pages/Test.php:419, src/Admin/Pages/Test.php:409, src/Admin/Pages/Test.php:425
428
- msgid "Mailgun failed."
429
- msgstr ""
430
-
431
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:404, src/Admin/Pages/Test.php:410
432
- msgid "Typically this error is because there is an issue with your Mailgun settings, in many cases the API key."
433
- msgstr ""
434
-
435
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:407, src/Admin/Pages/Test.php:413
436
- msgid "Verify your API key is correct."
437
- msgstr ""
438
-
439
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:408, src/Admin/Pages/Test.php:414
440
- msgid "Go to your Mailgun account and view your API key."
441
- msgstr ""
442
-
443
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:409, src/Admin/Pages/Test.php:415
444
- msgid "Note that the API key includes the \"key\" prefix, so make sure that it is in the WP Mail SMTP Mailgun API setting."
445
- msgstr ""
446
-
447
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:420, src/Admin/Pages/Test.php:426
448
- msgid "Your Mailgun account does not have access to send emails."
449
- msgstr ""
450
-
451
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:421, src/Admin/Pages/Test.php:427
452
- msgid "Typically this error is because you have not setup and/or complete domain name verification for your Mailgun account."
453
- msgstr ""
454
-
455
- #. translators: %s - Mailgun documentation URL.
456
- #. translators: %s - Mailgun documentation URL.
457
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:427, src/Admin/Pages/Test.php:433
458
- msgid "Go to our how-to guide for setting up <a href=\"%s\" target=\"_blank\" rel=\"noopener noreferrer\">Mailgun with WP Mail SMTP</a>."
459
- msgstr ""
460
-
461
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:438, src/Admin/Pages/Test.php:444
462
- msgid "Complete the steps in section \"2. Verify Your Domain\"."
463
- msgstr ""
464
-
465
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:448, build/wp-mail-smtp/src/Admin/Pages/Test.php:499, build/wp-mail-smtp/src/Admin/Pages/Test.php:520, build/wp-mail-smtp/src/Admin/Pages/Test.php:547, build/wp-mail-smtp/src/Admin/Pages/Test.php:563, build/wp-mail-smtp/src/Admin/Pages/Test.php:618, build/wp-mail-smtp/src/Admin/Pages/Test.php:645, src/Admin/Pages/Test.php:454, src/Admin/Pages/Test.php:505, src/Admin/Pages/Test.php:526, src/Admin/Pages/Test.php:553, src/Admin/Pages/Test.php:569, src/Admin/Pages/Test.php:624, src/Admin/Pages/Test.php:651
466
- msgid "Google API Error."
467
- msgstr ""
468
-
469
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:449, src/Admin/Pages/Test.php:455
470
- msgid "You have not properly configured Gmail mailer."
471
- msgstr ""
472
-
473
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:450, src/Admin/Pages/Test.php:456
474
- msgid "Make sure that you have clicked the \"Allow plugin to send emails using your Google account\" button under Gmail settings."
475
- msgstr ""
476
-
477
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:453, src/Admin/Pages/Test.php:459
478
- msgid "Go to plugin Settings page and click the \"Allow plugin to send emails using your Google account\" button."
479
- msgstr ""
480
-
481
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:454, src/Admin/Pages/Test.php:460
482
- msgid "After the click you should be redirected to a Gmail authorization screen, where you will be asked a permission to send emails on your behalf."
483
- msgstr ""
484
-
485
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:455, src/Admin/Pages/Test.php:461
486
- msgid "Please click \"Agree\", if you see that button. If not - you will need to enable less secure apps first:"
487
- msgstr ""
488
-
489
- #. translators: %s - Google support article URL.
490
- #. translators: %s - Google support article URL.
491
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:461, src/Admin/Pages/Test.php:467
492
- msgid "if you are using regular Gmail account, please <a href=\"%s\" target=\"_blank\" rel=\"noopener noreferrer\">read this article</a> to proceed."
493
- msgstr ""
494
-
495
- #. translators: %s - Google support article URL.
496
- #. translators: %s - Google support article URL.
497
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:477, src/Admin/Pages/Test.php:483
498
- msgid "if you are using G Suite, please <a href=\"%s\" target=\"_blank\" rel=\"noopener noreferrer\">read this article</a> to proceed."
499
- msgstr ""
500
-
501
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:500, src/Admin/Pages/Test.php:506
502
- msgid "Typically this error is because address the email was sent to is invalid or was empty."
503
- msgstr ""
504
-
505
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:503, src/Admin/Pages/Test.php:509
506
- msgid "Check the \"Send To\" email address used and confirm it is a valid email and was not empty."
507
- msgstr ""
508
-
509
- #. translators: 1 - correct email address example. 2 - incorrect email address example.
510
- #. translators: 1 - correct email address example. 2 - incorrect email address example.
511
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:506, src/Admin/Pages/Test.php:512
512
- msgid "It should be something like this: %1$s. These are incorrect values: %2$s."
513
- msgstr ""
514
-
515
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:510, src/Admin/Pages/Test.php:516
516
- msgid "Make sure that the generated email has a TO header, useful when you are responsible for email creation."
517
- msgstr ""
518
-
519
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:521, src/Admin/Pages/Test.php:527
520
- msgid "Unfortunately, this error can be due to many different reasons."
521
- msgstr ""
522
-
523
- #. translators: %s - Blog article URL.
524
- #. translators: %s - Blog article URL.
525
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:527, src/Admin/Pages/Test.php:533
526
- msgid "Please <a href=\"%s\" target=\"_blank\" rel=\"noopener noreferrer\">read this article</a> to learn more about what can cause this error and how it can be resolved."
527
- msgstr ""
528
-
529
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:548, src/Admin/Pages/Test.php:554
530
- msgid "Authentication code that Google returned to you has already been used on your previous auth attempt."
531
- msgstr ""
532
-
533
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:551, src/Admin/Pages/Test.php:557
534
- msgid "Make sure that you are not trying to manually clean up the plugin options to retry the \"Allow...\" step."
535
- msgstr ""
536
-
537
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:552, src/Admin/Pages/Test.php:558
538
- msgid "Reinstall the plugin with clean plugin data turned on on Misc page. This will remove all the plugin options and you will be safe to retry."
539
- msgstr ""
540
-
541
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:553, src/Admin/Pages/Test.php:559
542
- msgid "Make sure there is no aggressive caching on site admin area pages or try to clean cache between attempts."
543
- msgstr ""
544
-
545
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:564, src/Admin/Pages/Test.php:570
546
- msgid "There are various reasons for that, please review the steps below."
547
- msgstr ""
548
-
549
- #. translators: %s - Google G Suite Admin area URL.
550
- #. translators: %s - Google G Suite Admin area URL.
551
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:570, src/Admin/Pages/Test.php:576
552
- msgid "Make sure that your G Suite trial period has not expired. You can check the status <a href=\"%s\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>."
553
- msgstr ""
554
-
555
- #. translators: %s - Google G Suite Admin area URL.
556
- #. translators: %s - Google G Suite Admin area URL.
557
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:584, src/Admin/Pages/Test.php:590
558
- msgid "Make sure that Gmail app in your G Suite is actually enabled. You can check that in Apps list in <a href=\"%s\" target=\"_blank\" rel=\"noopener noreferrer\">G Suite Admin</a> area."
559
- msgstr ""
560
-
561
- #. translators: %s - Google Developers Console URL.
562
- #. translators: %s - Google Developers Console URL.
563
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:598, src/Admin/Pages/Test.php:604
564
- msgid "Make sure that you have Gmail API enabled, and you can do that <a href=\"%s\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>."
565
- msgstr ""
566
-
567
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:621, build/wp-mail-smtp/src/Admin/Pages/Test.php:649, src/Admin/Pages/Test.php:627, src/Admin/Pages/Test.php:655
568
- msgid "Make sure that the used Client ID/Secret correspond to a proper project that has Gmail API enabled."
569
- msgstr ""
570
-
571
- #. translators: %s - WPForms.com tutorial URL.
572
- #. translators: %s - WPForms.com tutorial URL.
573
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:625, src/Admin/Pages/Test.php:631
574
- msgid "Please follow our <a href=\"%s\" target=\"_blank\" rel=\"noopener noreferrer\">Gmail tutorial</a> to be sure that all the correct project and data is applied."
575
- msgstr ""
576
-
577
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:646, src/Admin/Pages/Test.php:652
578
- msgid "You may have added a new API to a project"
579
- msgstr ""
580
-
581
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:650, src/Admin/Pages/Test.php:656
582
- msgid "Try to use a separate project for your emails, so the project has only 1 Gmail API in it enabled. You will need to remove the old project and create a new one from scratch."
583
- msgstr ""
584
-
585
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:686, src/Admin/Pages/Test.php:692
586
- msgid "An issue was detected."
587
- msgstr ""
588
-
589
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:687, src/Admin/Pages/Test.php:693
590
- msgid "This means your test email was unable to be sent."
591
- msgstr ""
592
-
593
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:689, src/Admin/Pages/Test.php:695
594
- msgid "Plugin settings are incorrect (wrong SMTP settings, invalid Mailer configuration, etc)."
595
- msgstr ""
596
-
597
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:691, src/Admin/Pages/Test.php:697
598
- msgid "Your host is rejecting the connection."
599
- msgstr ""
600
-
601
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:694, src/Admin/Pages/Test.php:700
602
- msgid "Triple check the plugin settings, consider reconfiguring to make sure everything is correct (eg bad copy and paste)."
603
- msgstr ""
604
-
605
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:696, src/Admin/Pages/Test.php:702
606
- msgid "Contact your web hosting provider and ask them to verify your server can make outside connections. Additionally, ask them if a firewall or security policy may be preventing the connection - many shared hosts block certain ports.<br><strong>Note: this is the most common cause of this issue.</strong>"
607
- msgstr ""
608
-
609
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:702, src/Admin/Pages/Test.php:708
610
- msgid "Try using a different mailer."
611
- msgstr ""
612
-
613
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:721, src/Admin/Pages/Test.php:727
614
- msgid "There was a problem while sending the test email."
615
- msgstr ""
616
-
617
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:731, src/Admin/Pages/Test.php:737
618
- msgid "Recommended next steps:"
619
- msgstr ""
620
-
621
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:741, src/Admin/Pages/Test.php:747
622
- msgid "Need support?"
623
- msgstr ""
624
-
625
- #. translators: %s - WPForms account area link.
626
- #. translators: %s - WPForms account area link.
627
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:750, src/Admin/Pages/Test.php:756
628
- msgid "As a WPForms Pro user you have access to WP Mail SMTP priority support. Please log in to your WPForms.com account and <a href=\"%s\" target=\"_blank\" rel=\"noopener noreferrer\">submit a support ticket</a>."
629
- msgstr ""
630
-
631
- #. translators: %s - WPForms URL.
632
- #. translators: %s - WPForms URL.
633
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:775, src/Admin/Pages/Test.php:781
634
- msgid "To access priority support from our team, please <a href=\"%s\" target=\"_blank\" rel=\"noopener noreferrer\">purchase a WPForms license</a>. Along with getting priority support for WP Mail SMTP, you will also get access to the best drag & drop WordPress form builder plugin."
635
- msgstr ""
636
-
637
- #. translators: %s - Star icons.
638
- #. translators: %s - Star icons.
639
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:794, src/Admin/Pages/Test.php:800
640
- msgid "WPForms is being used on over 1 million websites and has over 2000+ five star ratings (%s)."
641
- msgstr ""
642
-
643
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:807, src/Admin/Pages/Test.php:813
644
- msgid "You will truly love the WPForms plugin, but most importantly your support will help us continue to maintain and add new features to the WP Mail SMTP plugin while keeping it free for the larger WordPress community."
645
- msgstr ""
646
-
647
- #. translators: %1$s - WP Mail SMTP support policy URL, %2$s - WP Mail SMTP support forum URL, %3$s - WPForms URL.
648
- #. translators: %1$s - WP Mail SMTP support policy URL, %2$s - WP Mail SMTP support forum URL, %3$s - WPForms URL.
649
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:815, src/Admin/Pages/Test.php:821
650
- msgid "Alternatively, we also offer <a href=\"%1$s\" target=\"_blank\" rel=\"noopener noreferrer\">limited support</a> on the WordPress.org support forums. You can <a href=\"%2$s\" target=\"_blank\" rel=\"noopener noreferrer\">create a support thread</a> there, but please understand that free support is not guaranteed and is limited to simple issues. If you have an urgent or complex issue, then please consider <a href=\"%3$s\" target=\"_blank\" rel=\"noopener noreferrer\">purchasing a WPForms license</a> to access our priority support ticket system."
651
- msgstr ""
652
-
653
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:836, src/Admin/Pages/Test.php:842
654
- msgid "Click here to view the full Error Log for debugging"
655
- msgstr ""
656
-
657
- #: build/wp-mail-smtp/src/Admin/Pages/Test.php:845, src/Admin/Pages/Test.php:851
658
- msgid "Please copy only the content of the error debug message above, identified with an orange left border, into the support forum topic if you experience any issues."
659
- msgstr ""
660
-
661
- #. translators: 1: plugin name(s).
662
- #. translators: 1: plugin name(s).
663
- #. translators: 1: plugin name(s).
664
- #. translators: 1: plugin name(s).
665
- #: build/wp-mail-smtp/src/Core.php:243, build/wp-mail-smtp/src/Core.php:249, src/Core.php:243, src/Core.php:249
666
- msgid "Thanks for installing WP Mail SMTP. We also recommend using %1$s. It's the best drag & drop form builder, has over 1 million active installs, and over 2000+ 5 star ratings."
667
- msgid_plural "Thanks for installing WP Mail SMTP. We also recommend using %1$s. It's the best drag & drop form builder, has over 1 million active installs, and over 2000+ 5 star ratings."
668
- msgstr[0] ""
669
- msgstr[1] ""
670
-
671
- #: build/wp-mail-smtp/src/Core.php:254, src/Core.php:254
672
- msgid "Install WPForms Now"
673
- msgid_plural "Begin installing plugins"
674
- msgstr[0] ""
675
- msgstr[1] ""
676
-
677
- #: build/wp-mail-smtp/src/Core.php:259, src/Core.php:259
678
- msgid "Activate WPForms"
679
- msgid_plural "Begin activating plugins"
680
- msgstr[0] ""
681
- msgstr[1] ""
682
-
683
- #: build/wp-mail-smtp/src/Core.php:289, src/Core.php:289
684
- msgid "<strong>EMAIL DELIVERY ERROR:</strong> WP Mail SMTP plugin logged this error during the last time it tried to send an email: "
685
- msgstr ""
686
-
687
- #: build/wp-mail-smtp/src/Core.php:318, src/Core.php:318
688
- msgid "Consider running an email test after fixing it."
689
- msgstr ""
690
-
691
- #. translators: %1$s - Plugin name causing conflict; %2$s - Plugin name causing conflict.
692
- #. translators: %1$s - Plugin name causing conflict; %2$s - Plugin name causing conflict.
693
- #: build/wp-mail-smtp/src/Core.php:468, src/Core.php:468
694
- msgid "Heads up! WP Mail SMTP has detected %1$s is activated. Please deactivate %2$s to prevent conflicts."
695
- msgstr ""
696
-
697
- #: build/wp-mail-smtp/src/Providers/Gmail/Options.php:25, src/Providers/Gmail/Options.php:25
698
- msgid "Gmail"
699
- msgstr ""
700
-
701
- #. translators: %1$s - opening link tag; %2$s - closing link tag.
702
- #. translators: %1$s - opening link tag; %2$s - closing link tag.
703
- #: build/wp-mail-smtp/src/Providers/Gmail/Options.php:29, src/Providers/Gmail/Options.php:29
704
- msgid "Send emails using your Gmail or G Suite (formerly Google Apps) account, all while keeping your login credentials safe. Other Google SMTP methods require enabling less secure apps in your account and entering your password. However, this integration uses the Google API to improve email delivery issues while keeping your site secure.<br><br>Read our %1$sGmail documentation%2$s to learn how to configure Gmail or G Suite."
705
- msgstr ""
706
-
707
- #: build/wp-mail-smtp/src/Providers/Gmail/Options.php:64, src/Providers/Gmail/Options.php:64
708
- msgid "Client ID"
709
- msgstr ""
710
-
711
- #: build/wp-mail-smtp/src/Providers/Gmail/Options.php:79, src/Providers/Gmail/Options.php:79
712
- msgid "Client Secret"
713
- msgstr ""
714
-
715
- #: build/wp-mail-smtp/src/Providers/Gmail/Options.php:94, src/Providers/Gmail/Options.php:94
716
- msgid "Authorized redirect URI"
717
- msgstr ""
718
-
719
- #: build/wp-mail-smtp/src/Providers/Gmail/Options.php:102, src/Providers/Gmail/Options.php:102
720
- msgid "Copy URL to clipboard"
721
- msgstr ""
722
-
723
- #: build/wp-mail-smtp/src/Providers/Gmail/Options.php:107, src/Providers/Gmail/Options.php:107
724
- msgid "This is the path on your site that you will be redirected to after you have authenticated with Google."
725
- msgstr ""
726
-
727
- #: build/wp-mail-smtp/src/Providers/Gmail/Options.php:109, src/Providers/Gmail/Options.php:109
728
- msgid "You need to copy this URL into \"Authorized redirect URIs\" field for you web application on Google APIs site for your project there."
729
- msgstr ""
730
-
731
- #: build/wp-mail-smtp/src/Providers/Gmail/Options.php:118, src/Providers/Gmail/Options.php:118
732
- msgid "Authorization"
733
- msgstr ""
734
-
735
- #: build/wp-mail-smtp/src/Providers/Gmail/Options.php:143, src/Providers/Gmail/Options.php:143
736
- msgid "Are you sure you want to reset the current Gmail connection? You will need to immediately create a new one to be able to send emails."
737
- msgstr ""
738
-
739
- #: build/wp-mail-smtp/src/Providers/Gmail/Options.php:151, src/Providers/Gmail/Options.php:151
740
- msgid "Allow plugin to send emails using your Google account"
741
- msgstr ""
742
-
743
- #: build/wp-mail-smtp/src/Providers/Gmail/Options.php:154, src/Providers/Gmail/Options.php:154
744
- msgid "Click the button above to confirm authorization."
745
- msgstr ""
746
-
747
- #: build/wp-mail-smtp/src/Providers/Gmail/Options.php:160, src/Providers/Gmail/Options.php:160
748
- msgid "Remove Connection"
749
- msgstr ""
750
-
751
- #: build/wp-mail-smtp/src/Providers/Gmail/Options.php:163, src/Providers/Gmail/Options.php:163
752
- msgid "Removing the connection will give you an ability to redo the connection or link to another Google account."
753
- msgstr ""
754
-
755
- #: build/wp-mail-smtp/src/Providers/Gmail/Options.php:171, src/Providers/Gmail/Options.php:171
756
- msgid "To setup Gmail integration properly you should save Client ID and Client Secret."
757
- msgstr ""
758
-
759
- #: build/wp-mail-smtp/src/Providers/Mailgun/Options.php:25, src/Providers/Mailgun/Options.php:25
760
- msgid "Mailgun"
761
- msgstr ""
762
-
763
- #. translators: %1$s - opening link tag; %2$s - closing link tag; %3$s - opening link tag; %4$s - closing link tag.
764
- #. translators: %1$s - opening link tag; %2$s - closing link tag; %3$s - opening link tag; %4$s - closing link tag.
765
- #: build/wp-mail-smtp/src/Providers/Mailgun/Options.php:29, src/Providers/Mailgun/Options.php:29
766
- msgid "%1$sMailgun%2$s is one of the leading transactional email services trusted by over 10,000 website and application developers. They provide users 10,000 free emails per month.<br><br>Read our %3$sMailgun documentation%4$s to learn how to configure Mailgun and improve your email deliverability."
767
- msgstr ""
768
-
769
- #: build/wp-mail-smtp/src/Providers/Mailgun/Options.php:57, src/Providers/Mailgun/Options.php:57
770
- msgid "Private API Key"
771
- msgstr ""
772
-
773
- #. translators: %s - API key link.
774
- #. translators: %s - API key link.
775
- #: build/wp-mail-smtp/src/Providers/Mailgun/Options.php:69, src/Providers/Mailgun/Options.php:69
776
- msgid "Follow this link to get an API Key from Mailgun: %s."
777
- msgstr ""
778
-
779
- #: build/wp-mail-smtp/src/Providers/Mailgun/Options.php:71, src/Providers/Mailgun/Options.php:71
780
- msgid "Get a Private API Key"
781
- msgstr ""
782
-
783
- #: build/wp-mail-smtp/src/Providers/Mailgun/Options.php:82, src/Providers/Mailgun/Options.php:82
784
- msgid "Domain Name"
785
- msgstr ""
786
-
787
- #. translators: %s - Domain Name link.
788
- #. translators: %s - Domain Name link.
789
- #: build/wp-mail-smtp/src/Providers/Mailgun/Options.php:94, src/Providers/Mailgun/Options.php:94
790
- msgid "Follow this link to get a Domain Name from Mailgun: %s."
791
- msgstr ""
792
-
793
- #: build/wp-mail-smtp/src/Providers/Mailgun/Options.php:96, src/Providers/Mailgun/Options.php:96
794
- msgid "Get a Domain Name"
795
- msgstr ""
796
-
797
- #: build/wp-mail-smtp/src/Providers/Mail/Options.php:25, src/Providers/Mail/Options.php:25
798
- msgid "Default (none)"
799
- msgstr ""
800
-
801
- #: build/wp-mail-smtp/src/Providers/Mail/Options.php:37, src/Providers/Mail/Options.php:37
802
- msgid "You currently have the native WordPress option selected. Please select any other Mailer option above to continue the setup."
803
- msgstr ""
804
-
805
- #: build/wp-mail-smtp/src/Providers/OptionsAbstract.php:126, build/wp-mail-smtp/wp_mail_smtp.php:425, src/Providers/OptionsAbstract.php:126, wp_mail_smtp.php:425
806
- msgid "SMTP Host"
807
- msgstr ""
808
-
809
- #: build/wp-mail-smtp/src/Providers/OptionsAbstract.php:140, build/wp-mail-smtp/wp_mail_smtp.php:440, build/wp-mail-smtp/wp_mail_smtp.php:444, build/wp-mail-smtp/wp_mail_smtp.php:559, build/wp-mail-smtp/wp_mail_smtp.php:565, src/Providers/OptionsAbstract.php:140, wp_mail_smtp.php:440, wp_mail_smtp.php:444, wp_mail_smtp.php:559, wp_mail_smtp.php:565
810
- msgid "Encryption"
811
- msgstr ""
812
-
813
- #: build/wp-mail-smtp/src/Providers/OptionsAbstract.php:150, src/Providers/OptionsAbstract.php:150
814
- msgid "None"
815
- msgstr ""
816
-
817
- #: build/wp-mail-smtp/src/Providers/OptionsAbstract.php:159, src/Providers/OptionsAbstract.php:159
818
- msgid "SSL"
819
- msgstr ""
820
-
821
- #: build/wp-mail-smtp/src/Providers/OptionsAbstract.php:168, src/Providers/OptionsAbstract.php:168
822
- msgid "TLS"
823
- msgstr ""
824
-
825
- #: build/wp-mail-smtp/src/Providers/OptionsAbstract.php:172, src/Providers/OptionsAbstract.php:172
826
- msgid "For most servers TLS is the recommended option. If your SMTP provider offers both SSL and TLS options, we recommend using TLS."
827
- msgstr ""
828
-
829
- #: build/wp-mail-smtp/src/Providers/OptionsAbstract.php:180, build/wp-mail-smtp/wp_mail_smtp.php:433, build/wp-mail-smtp/wp_mail_smtp.php:551, src/Providers/OptionsAbstract.php:180, wp_mail_smtp.php:433, wp_mail_smtp.php:551
830
- msgid "SMTP Port"
831
- msgstr ""
832
-
833
- #: build/wp-mail-smtp/src/Providers/OptionsAbstract.php:194, src/Providers/OptionsAbstract.php:194
834
- msgid "Auto TLS"
835
- msgstr ""
836
-
837
- #: build/wp-mail-smtp/src/Providers/OptionsAbstract.php:204, build/wp-mail-smtp/src/Providers/OptionsAbstract.php:226, src/Providers/OptionsAbstract.php:204, src/Providers/OptionsAbstract.php:226
838
- msgid "On"
839
- msgstr ""
840
-
841
- #: build/wp-mail-smtp/src/Providers/OptionsAbstract.php:205, build/wp-mail-smtp/src/Providers/OptionsAbstract.php:227, src/Providers/OptionsAbstract.php:205, src/Providers/OptionsAbstract.php:227
842
- msgid "Off"
843
- msgstr ""
844
-
845
- #: build/wp-mail-smtp/src/Providers/OptionsAbstract.php:208, src/Providers/OptionsAbstract.php:208
846
- msgid "By default TLS encryption is automatically used if the server supports it, which is recommended. In some cases, due to server misconfigurations, this can cause issues and may need to be disabled."
847
- msgstr ""
848
-
849
- #: build/wp-mail-smtp/src/Providers/OptionsAbstract.php:216, build/wp-mail-smtp/wp_mail_smtp.php:467, build/wp-mail-smtp/wp_mail_smtp.php:471, src/Providers/OptionsAbstract.php:216, wp_mail_smtp.php:467, wp_mail_smtp.php:471
850
- msgid "Authentication"
851
- msgstr ""
852
-
853
- #: build/wp-mail-smtp/src/Providers/OptionsAbstract.php:235, src/Providers/OptionsAbstract.php:235
854
- msgid "SMTP Username"
855
- msgstr ""
856
-
857
- #: build/wp-mail-smtp/src/Providers/OptionsAbstract.php:249, src/Providers/OptionsAbstract.php:249
858
- msgid "SMTP Password"
859
- msgstr ""
860
-
861
- #. translators: %s - wp-config.php.
862
- #. translators: %s - wp-config.php.
863
- #: build/wp-mail-smtp/src/Providers/OptionsAbstract.php:263, src/Providers/OptionsAbstract.php:263
864
- msgid "The password is stored in plain text. We highly recommend you setup your password in your WordPress configuration file for improved security; to do this add the lines below to your %s file."
865
- msgstr ""
866
-
867
- #. translators: %1$s - Provider name; %2$s - PHP version required by Provider; %3$s - current PHP version.
868
- #. translators: %1$s - Provider name; %2$s - PHP version required by Provider; %3$s - current PHP version.
869
- #: build/wp-mail-smtp/src/Providers/OptionsAbstract.php:300, src/Providers/OptionsAbstract.php:300
870
- msgid "%1$s requires PHP %2$s to work and does not support your current PHP version %3$s. Please contact your host and request a PHP upgrade to the latest one."
871
- msgstr ""
872
-
873
- #: build/wp-mail-smtp/src/Providers/OptionsAbstract.php:307, src/Providers/OptionsAbstract.php:307
874
- msgid "Meanwhile you can switch to the \"Other SMTP\" Mailer option."
875
- msgstr ""
876
-
877
- #: build/wp-mail-smtp/src/Providers/Pepipost/Options.php:25, src/Providers/Pepipost/Options.php:25
878
- msgid "Pepipost"
879
- msgstr ""
880
-
881
- #: build/wp-mail-smtp/src/Providers/Sendgrid/Options.php:25, src/Providers/Sendgrid/Options.php:25
882
- msgid "SendGrid"
883
- msgstr ""
884
-
885
- #. translators: %1$s - opening link tag; %2$s - closing link tag; %3$s - opening link tag; %4$s - closing link tag.
886
- #. translators: %1$s - opening link tag; %2$s - closing link tag; %3$s - opening link tag; %4$s - closing link tag.
887
- #: build/wp-mail-smtp/src/Providers/Sendgrid/Options.php:29, src/Providers/Sendgrid/Options.php:29
888
- msgid "%1$sSendGrid%2$s is one of the leading transactional email services, sending over 35 billion emails every month. They provide users 100 free emails per month.<br><br>Read our %3$sSendGrid documentation%4$s to learn how to set up SendGrid and improve your email deliverability."
889
- msgstr ""
890
-
891
- #: build/wp-mail-smtp/src/Providers/Sendgrid/Options.php:57, src/Providers/Sendgrid/Options.php:57
892
- msgid "API Key"
893
- msgstr ""
894
-
895
- #. translators: %s - API key link.
896
- #. translators: %s - API key link.
897
- #: build/wp-mail-smtp/src/Providers/Sendgrid/Options.php:69, src/Providers/Sendgrid/Options.php:69
898
- msgid "Follow this link to get an API Key from SendGrid: %s."
899
- msgstr ""
900
-
901
- #: build/wp-mail-smtp/src/Providers/Sendgrid/Options.php:71, src/Providers/Sendgrid/Options.php:71
902
- msgid "Create API Key"
903
- msgstr ""
904
-
905
- #. translators: %s - SendGrid access level.
906
- #. translators: %s - SendGrid access level.
907
- #: build/wp-mail-smtp/src/Providers/Sendgrid/Options.php:79, src/Providers/Sendgrid/Options.php:79
908
- msgid "To send emails you will need only a %s access level for this API key."
909
- msgstr ""
910
-
911
- #: build/wp-mail-smtp/src/Providers/SMTP/Options.php:25, src/Providers/SMTP/Options.php:25
912
- msgid "Other SMTP"
913
- msgstr ""
914
-
915
- #: build/wp-mail-smtp/src/Providers/SMTP/Options.php:29, src/Providers/SMTP/Options.php:29
916
- msgid "Use the SMTP details provided by your hosting provider or email service.<br><br>To see recommended settings for the popular services as well as troubleshooting tips, check out our %1$sSMTP documentation%2$s."
917
- msgstr ""
918
-
919
- #. translators: %s - email address where test mail will be sent to.
920
- #. translators: %s - email address where test mail will be sent to.
921
- #: build/wp-mail-smtp/wp_mail_smtp.php:251, wp_mail_smtp.php:251
922
- msgid "Test mail to %s"
923
- msgstr ""
924
-
925
- #: build/wp-mail-smtp/wp_mail_smtp.php:252, wp_mail_smtp.php:252
926
- msgid "This is a test email generated by the WP Mail SMTP WordPress plugin."
927
- msgstr ""
928
-
929
- #: build/wp-mail-smtp/wp_mail_smtp.php:268, wp_mail_smtp.php:268
930
- msgid "Test Message Sent"
931
- msgstr ""
932
-
933
- #: build/wp-mail-smtp/wp_mail_smtp.php:269, wp_mail_smtp.php:269
934
- msgid "The result was:"
935
- msgstr ""
936
-
937
- #: build/wp-mail-smtp/wp_mail_smtp.php:272, wp_mail_smtp.php:272
938
- msgid "The full debugging output is shown below:"
939
- msgstr ""
940
-
941
- #: build/wp-mail-smtp/wp_mail_smtp.php:275, wp_mail_smtp.php:275
942
- msgid "The SMTP debugging output is shown below:"
943
- msgstr ""
944
-
945
- #: build/wp-mail-smtp/wp_mail_smtp.php:242, build/wp-mail-smtp/wp_mail_smtp.php:616, wp_mail_smtp.php:242, wp_mail_smtp.php:616
946
- msgid "Send Test"
947
- msgstr ""
948
-
949
- #: build/wp-mail-smtp/wp_mail_smtp.php:287, build/wp-mail-smtp/wp_mail_smtp.php:652, wp_mail_smtp.php:287, wp_mail_smtp.php:652
950
- msgid "WP Mail SMTP Settings"
951
- msgstr ""
952
-
953
- #: build/wp-mail-smtp/wp_mail_smtp.php:303, wp_mail_smtp.php:303
954
- msgid "You can specify the email address that emails should be sent from. If you leave this blank, the default email will be used."
955
- msgstr ""
956
-
957
- #: build/wp-mail-smtp/wp_mail_smtp.php:306, wp_mail_smtp.php:306
958
- msgid "<strong>Please Note:</strong> You appear to be using a version of WordPress prior to 2.3. Please ignore the From Name field and instead enter Name&lt;email@domain.com&gt; in this field."
959
- msgstr ""
960
-
961
- #: build/wp-mail-smtp/wp_mail_smtp.php:321, wp_mail_smtp.php:321
962
- msgid "You can specify the name that emails should be sent from. If you leave this blank, the emails will be sent from WordPress."
963
- msgstr ""
964
-
965
- #: build/wp-mail-smtp/wp_mail_smtp.php:340, wp_mail_smtp.php:340
966
- msgid "Send all WordPress emails via SMTP."
967
- msgstr ""
968
-
969
- #: build/wp-mail-smtp/wp_mail_smtp.php:344, wp_mail_smtp.php:344
970
- msgid "Use the PHP mail() function to send emails."
971
- msgstr ""
972
-
973
- #: build/wp-mail-smtp/wp_mail_smtp.php:350, wp_mail_smtp.php:350
974
- msgid "Use Pepipost SMTP to send emails."
975
- msgstr ""
976
-
977
- #. translators: %1$s - link start; %2$s - link end.
978
- #. translators: %1$s - link start; %2$s - link end.
979
- #: build/wp-mail-smtp/wp_mail_smtp.php:356, wp_mail_smtp.php:356
980
- msgid "Looking for high inbox delivery? Try Pepipost with easy setup and free emails. Learn more %1$shere%2$s."
981
- msgstr ""
982
-
983
- #: build/wp-mail-smtp/wp_mail_smtp.php:413, build/wp-mail-smtp/wp_mail_smtp.php:513, build/wp-mail-smtp/wp_mail_smtp.php:589, wp_mail_smtp.php:413, wp_mail_smtp.php:513, wp_mail_smtp.php:589
984
- msgid "Save Changes"
985
- msgstr ""
986
-
987
- #: build/wp-mail-smtp/wp_mail_smtp.php:418, wp_mail_smtp.php:418
988
- msgid "SMTP Options"
989
- msgstr ""
990
-
991
- #: build/wp-mail-smtp/wp_mail_smtp.php:420, wp_mail_smtp.php:420
992
- msgid "These options only apply if you have chosen to send mail by SMTP above."
993
- msgstr ""
994
-
995
- #: build/wp-mail-smtp/wp_mail_smtp.php:449, build/wp-mail-smtp/wp_mail_smtp.php:571, wp_mail_smtp.php:449, wp_mail_smtp.php:571
996
- msgid "No encryption."
997
- msgstr ""
998
-
999
- #: build/wp-mail-smtp/wp_mail_smtp.php:454, build/wp-mail-smtp/wp_mail_smtp.php:576, wp_mail_smtp.php:454, wp_mail_smtp.php:576
1000
- msgid "Use SSL encryption."
1001
- msgstr ""
1002
-
1003
- #: build/wp-mail-smtp/wp_mail_smtp.php:459, build/wp-mail-smtp/wp_mail_smtp.php:581, wp_mail_smtp.php:459, wp_mail_smtp.php:581
1004
- msgid "Use TLS encryption."
1005
- msgstr ""
1006
-
1007
- #: build/wp-mail-smtp/wp_mail_smtp.php:462, wp_mail_smtp.php:462
1008
- msgid "TLS is not the same as STARTTLS. For most servers SSL is the recommended option."
1009
- msgstr ""
1010
-
1011
- #: build/wp-mail-smtp/wp_mail_smtp.php:476, wp_mail_smtp.php:476
1012
- msgid "No: Do not use SMTP authentication."
1013
- msgstr ""
1014
-
1015
- #: build/wp-mail-smtp/wp_mail_smtp.php:481, wp_mail_smtp.php:481
1016
- msgid "Yes: Use SMTP authentication."
1017
- msgstr ""
1018
-
1019
- #: build/wp-mail-smtp/wp_mail_smtp.php:485, wp_mail_smtp.php:485
1020
- msgid "If this is set to no, the values below are ignored."
1021
- msgstr ""
1022
-
1023
- #: build/wp-mail-smtp/wp_mail_smtp.php:492, build/wp-mail-smtp/wp_mail_smtp.php:535, wp_mail_smtp.php:492, wp_mail_smtp.php:535
1024
- msgid "Username"
1025
- msgstr ""
1026
-
1027
- #: build/wp-mail-smtp/wp_mail_smtp.php:500, build/wp-mail-smtp/wp_mail_smtp.php:543, wp_mail_smtp.php:500, wp_mail_smtp.php:543
1028
- msgid "Password"
1029
- msgstr ""
1030
-
1031
- #: build/wp-mail-smtp/wp_mail_smtp.php:506, wp_mail_smtp.php:506
1032
- msgid "This is in plain text because it must not be stored encrypted."
1033
- msgstr ""
1034
-
1035
- #: build/wp-mail-smtp/wp_mail_smtp.php:520, wp_mail_smtp.php:520
1036
- msgid "Pepipost SMTP Options"
1037
- msgstr ""
1038
-
1039
- #. translators: %s - Pepipost registration URL.
1040
- #. translators: %s - Pepipost registration URL.
1041
- #: build/wp-mail-smtp/wp_mail_smtp.php:526, wp_mail_smtp.php:526
1042
- msgid "You need to signup on %s to get the SMTP username/password."
1043
- msgstr ""
1044
-
1045
- #: build/wp-mail-smtp/wp_mail_smtp.php:606, wp_mail_smtp.php:606
1046
- msgid "To"
1047
- msgstr ""
1048
-
1049
- #: build/wp-mail-smtp/wp_mail_smtp.php:610, wp_mail_smtp.php:610
1050
- msgid "Type an email address here and then click Send Test to generate a test email."
1051
- msgstr ""
1052
-
1053
- #: src/Admin/Pages/Test.php:272, src/Admin/Pages/Test.php:299, src/Admin/Pages/Test.php:372
1054
- msgid "This means your web server was unable to connect to the host server."
1055
- msgstr ""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2018 WP Mail SMTP
2
+ # This file is distributed under the same license as the WP Mail SMTP package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: WP Mail SMTP\n"
6
+ "MIME-Version: 1.0\n"
7
+ "Content-Type: text/plain; charset=UTF-8\n"
8
+ "Content-Transfer-Encoding: 8bit\n"
9
+ "Language-Team: WPForms <support@wpforms.com>\n"
10
+ "X-Poedit-Basepath: ..\n"
11
+ "X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;_nx_noop:1,2,3c;_x:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
12
+ "X-Poedit-SearchPath-0: .\n"
13
+ "X-Poedit-SearchPathExcluded-0: *.js\n"
14
+ "X-Poedit-SourceCharset: UTF-8\n"
15
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
16
+
17
+ #. translators: %s - error code, returned by Google API.
18
+ #: src/Admin/Area.php:95
19
+ msgid "There was an error while processing the authentication request: %s. Please try again."
20
+ msgstr ""
21
+
22
+ #: src/Admin/Area.php:102
23
+ msgid "There was an error while processing the authentication request. Please try again."
24
+ msgstr ""
25
+
26
+ #: src/Admin/Area.php:109
27
+ msgid "There was an error while processing the authentication request. Please make sure that you have Client ID and Client Secret both valid and saved."
28
+ msgstr ""
29
+
30
+ #: src/Admin/Area.php:118
31
+ msgid "You have successfully linked the current site with your Google API project. Now you can start sending emails through Google."
32
+ msgstr ""
33
+
34
+ #. translators: %s - Mailer anchor link.
35
+ #: src/Admin/Area.php:150
36
+ msgid "Thanks for using WP Mail SMTP! To complete the plugin setup and start sending emails, <strong>please select and configure your <a href=\"%s\">Mailer</a></strong>."
37
+ msgstr ""
38
+
39
+ #: src/Admin/Area.php:172
40
+ msgid "WP Mail SMTP Options"
41
+ msgstr ""
42
+
43
+ #: src/Admin/Area.php:173, wp_mail_smtp.php:666
44
+ msgid "WP Mail SMTP"
45
+ msgstr ""
46
+
47
+ #. translators: %1$s - WP.org link; %2$s - same WP.org link.
48
+ #: src/Admin/Area.php:245
49
+ msgid "Please rate <strong>WP Mail SMTP</strong> <a href=\"%1$s\" target=\"_blank\" rel=\"noopener noreferrer\">&#9733;&#9733;&#9733;&#9733;&#9733;</a> on <a href=\"%2$s\" target=\"_blank\">WordPress.org</a> to help us spread the word. Thank you from the WP Mail SMTP team!"
50
+ msgstr ""
51
+
52
+ #: src/Admin/Area.php:423
53
+ msgid "WPForms related message was successfully dismissed"
54
+ msgstr ""
55
+
56
+ #: src/Admin/Area.php:457, src/Admin/Pages/Settings.php:26, wp_mail_smtp.php:772
57
+ msgid "Settings"
58
+ msgstr ""
59
+
60
+ #: src/Admin/Pages/Misc.php:24
61
+ msgid "Misc"
62
+ msgstr ""
63
+
64
+ #: src/Admin/Pages/Misc.php:48
65
+ msgid "General"
66
+ msgstr ""
67
+
68
+ #: src/Admin/Pages/Misc.php:56
69
+ msgid "Do Not Send"
70
+ msgstr ""
71
+
72
+ #: src/Admin/Pages/Misc.php:65
73
+ msgid "Check this if you would like to stop sending all emails."
74
+ msgstr ""
75
+
76
+ #: src/Admin/Pages/Misc.php:71
77
+ msgid "Some plugins, like BuddyPress and Events Manager, are using own email delivery solutions. By default, this option does not block their emails, as those plugins do not use default <code>wp_mail()</code> function to send emails."
78
+ msgstr ""
79
+
80
+ #: src/Admin/Pages/Misc.php:79
81
+ msgid "You will need to consult with their documentation to switch them to use default WordPress email delivery."
82
+ msgstr ""
83
+
84
+ #: src/Admin/Pages/Misc.php:81
85
+ msgid "Test emails are allowed to be sent, regardless of this option."
86
+ msgstr ""
87
+
88
+ #: src/Admin/Pages/Misc.php:90, wp_mail_smtp.php:409, wp_mail_smtp.php:414
89
+ msgid "Hide Announcements"
90
+ msgstr ""
91
+
92
+ #: src/Admin/Pages/Misc.php:99, wp_mail_smtp.php:419
93
+ msgid "Check this if you would like to hide plugin announcements and update details."
94
+ msgstr ""
95
+
96
+ #: src/Admin/Pages/Misc.php:108
97
+ msgid "Uninstall WP Mail SMTP"
98
+ msgstr ""
99
+
100
+ #: src/Admin/Pages/Misc.php:116
101
+ msgid "Check this if you would like to remove ALL WP Mail SMTP data upon plugin deletion. All settings will be unrecoverable."
102
+ msgstr ""
103
+
104
+ #: src/Admin/Pages/Misc.php:122, src/Admin/Pages/Settings.php:239
105
+ msgid "Save Settings"
106
+ msgstr ""
107
+
108
+ #: src/Admin/Pages/Misc.php:153, src/Admin/Pages/Settings.php:432
109
+ msgid "Settings were successfully saved."
110
+ msgstr ""
111
+
112
+ #: src/Admin/Pages/Settings.php:52
113
+ msgid "Mail"
114
+ msgstr ""
115
+
116
+ #: src/Admin/Pages/Settings.php:59, wp_mail_smtp.php:310
117
+ msgid "From Email"
118
+ msgstr ""
119
+
120
+ #: src/Admin/Pages/Settings.php:70, src/Admin/Pages/Settings.php:95
121
+ msgid "Gmail doesn't allow to override From Email. Emails will be sent using the email address you used to setup the connection."
122
+ msgstr ""
123
+
124
+ #: src/Admin/Pages/Settings.php:74
125
+ msgid "The email address which emails are sent from."
126
+ msgstr ""
127
+
128
+ #: src/Admin/Pages/Settings.php:75
129
+ msgid "If you using an email provider (Gmail, Yahoo, Outlook.com, etc) this should be your email address for that account."
130
+ msgstr ""
131
+
132
+ #: src/Admin/Pages/Settings.php:78
133
+ msgid "Please note that other plugins can change this, to prevent this use the setting below."
134
+ msgstr ""
135
+
136
+ #: src/Admin/Pages/Settings.php:90
137
+ msgid "Force From Email"
138
+ msgstr ""
139
+
140
+ #: src/Admin/Pages/Settings.php:99
141
+ msgid "If checked, the From Email setting above will be used for all emails, ignoring values set by other plugins."
142
+ msgstr ""
143
+
144
+ #: src/Admin/Pages/Settings.php:109, wp_mail_smtp.php:329
145
+ msgid "From Name"
146
+ msgstr ""
147
+
148
+ #: src/Admin/Pages/Settings.php:120, src/Admin/Pages/Settings.php:141
149
+ msgid "Gmail doesn't allow to override From Name. Emails will not have From Name defined at all."
150
+ msgstr ""
151
+
152
+ #: src/Admin/Pages/Settings.php:124
153
+ msgid "The name which emails are sent from."
154
+ msgstr ""
155
+
156
+ #: src/Admin/Pages/Settings.php:136
157
+ msgid "Force From Name"
158
+ msgstr ""
159
+
160
+ #: src/Admin/Pages/Settings.php:145
161
+ msgid "If checked, the From Name setting above will be used for all emails, ignoring values set by other plugins."
162
+ msgstr ""
163
+
164
+ #: src/Admin/Pages/Settings.php:154, wp_mail_smtp.php:344, wp_mail_smtp.php:349
165
+ msgid "Mailer"
166
+ msgstr ""
167
+
168
+ #: src/Admin/Pages/Settings.php:189, wp_mail_smtp.php:385, wp_mail_smtp.php:390
169
+ msgid "Return Path"
170
+ msgstr ""
171
+
172
+ #: src/Admin/Pages/Settings.php:198, wp_mail_smtp.php:395
173
+ msgid "Set the return-path to match the From Email"
174
+ msgstr ""
175
+
176
+ #: src/Admin/Pages/Settings.php:203
177
+ msgid "Gmail doesn't allow to override Return Path. Emails will be bounced to the same email addresee they were sent from."
178
+ msgstr ""
179
+
180
+ #: src/Admin/Pages/Settings.php:207, wp_mail_smtp.php:399
181
+ msgid "Return Path indicates where non-delivery receipts - or bounce messages - are to be sent."
182
+ msgstr ""
183
+
184
+ #: src/Admin/Pages/Settings.php:208
185
+ msgid "If unchecked bounce messages may be lost."
186
+ msgstr ""
187
+
188
+ #: src/Admin/Pages/Settings.php:283
189
+ msgid "Get WPForms Pro and Support WP Mail SMTP"
190
+ msgstr ""
191
+
192
+ #: src/Admin/Pages/Settings.php:287, src/Admin/Pages/Test.php:1056
193
+ msgid "WP Mail SMTP is a free plugin, and the team behind WPForms maintains it to give back to the WordPress community."
194
+ msgstr ""
195
+
196
+ #. translators: %s - WPForms.com URL.
197
+ #: src/Admin/Pages/Settings.php:295
198
+ msgid "Please consider supporting us by <a href=\"%s\" target=\"_blank\" rel=\"noopener noreferrer\">purchasing a WPForms Pro license</a>. Aside from getting access to the best drag & drop WordPress form builder plugin, your purchase will help us continue to maintain and add new features to the WP Mail SMTP plugin while keeping this SMTP plugin free for the larger WordPress community."
199
+ msgstr ""
200
+
201
+ #. translators: %s - link to WP.org repo and 5 HTML encoded stars as a label.
202
+ #: src/Admin/Pages/Settings.php:313
203
+ msgid "We know that you will truly love WPForms. It has over 2000+ five star ratings (%s) and is active on over 1 million websites."
204
+ msgstr ""
205
+
206
+ #: src/Admin/Pages/Settings.php:319
207
+ msgid "Other Benefits:"
208
+ msgstr ""
209
+
210
+ #: src/Admin/Pages/Settings.php:323
211
+ msgid "Access to premium support for WP Mail SMTP"
212
+ msgstr ""
213
+
214
+ #: src/Admin/Pages/Settings.php:324
215
+ msgid "Get the best drag & drop form builder"
216
+ msgstr ""
217
+
218
+ #: src/Admin/Pages/Settings.php:325
219
+ msgid "All form features like file upload, pagination, etc"
220
+ msgstr ""
221
+
222
+ #: src/Admin/Pages/Settings.php:326
223
+ msgid "Create surveys & polls with the surveys addon"
224
+ msgstr ""
225
+
226
+ #: src/Admin/Pages/Settings.php:329
227
+ msgid "No future ads inside WP Mail SMTP admin"
228
+ msgstr ""
229
+
230
+ #: src/Admin/Pages/Settings.php:330
231
+ msgid "Pre-made form templates and smart conditional logic"
232
+ msgstr ""
233
+
234
+ #: src/Admin/Pages/Settings.php:331
235
+ msgid "500+ integrations with different marketing & payment services"
236
+ msgstr ""
237
+
238
+ #: src/Admin/Pages/Settings.php:332
239
+ msgid "Collect signatures, geo-location data, and more"
240
+ msgstr ""
241
+
242
+ #. translators: %1$s - WPForms.com URL, %2$s - percents off.
243
+ #: src/Admin/Pages/Settings.php:341
244
+ msgid "<a href=\"%1$s\" target=\"_blank\" rel=\"noopener noreferrer\">Get WPForms Pro and support WP Mail SMTP</a> - use coupon \"<strong>thankyou</strong>\" to save %2$s off your purchase."
245
+ msgstr ""
246
+
247
+ #: src/Admin/Pages/Test.php:36
248
+ msgid "Email Test"
249
+ msgstr ""
250
+
251
+ #: src/Admin/Pages/Test.php:58, wp_mail_smtp.php:612
252
+ msgid "Send a Test Email"
253
+ msgstr ""
254
+
255
+ #: src/Admin/Pages/Test.php:65
256
+ msgid "Send To"
257
+ msgstr ""
258
+
259
+ #: src/Admin/Pages/Test.php:71
260
+ msgid "Change an email address a test email will be sent to."
261
+ msgstr ""
262
+
263
+ #: src/Admin/Pages/Test.php:79
264
+ msgid "HTML"
265
+ msgstr ""
266
+
267
+ #: src/Admin/Pages/Test.php:85, src/Providers/OptionsAbstract.php:204, src/Providers/OptionsAbstract.php:226
268
+ msgid "On"
269
+ msgstr ""
270
+
271
+ #: src/Admin/Pages/Test.php:86, src/Providers/OptionsAbstract.php:205, src/Providers/OptionsAbstract.php:227
272
+ msgid "Off"
273
+ msgstr ""
274
+
275
+ #: src/Admin/Pages/Test.php:89
276
+ msgid "Send this email in HTML or in plain text format."
277
+ msgstr ""
278
+
279
+ #: src/Admin/Pages/Test.php:104
280
+ msgid "You cannot send an email. Mailer is not properly configured. Please check your settings."
281
+ msgstr ""
282
+
283
+ #: src/Admin/Pages/Test.php:108
284
+ msgid "Send Email"
285
+ msgstr ""
286
+
287
+ #: src/Admin/Pages/Test.php:136
288
+ msgid "Test failed. Please use a valid email address and try to resend the test email."
289
+ msgstr ""
290
+
291
+ #. translators: %s - email address a test email will be sent to.
292
+ #: src/Admin/Pages/Test.php:158
293
+ msgid "Test email to %s"
294
+ msgstr ""
295
+
296
+ #: src/Admin/Pages/Test.php:173
297
+ msgid "Test plain text email was sent successfully!"
298
+ msgstr ""
299
+
300
+ #. translators: %s - "HTML" in bold.
301
+ #: src/Admin/Pages/Test.php:177
302
+ msgid "Test %s email was sent successfully! Please check your inbox to make sure it is delivered."
303
+ msgstr ""
304
+
305
+ #. translators: %s - mailer name.
306
+ #: src/Admin/Pages/Test.php:365
307
+ msgid "This email was sent by %s mailer, and WP Mail SMTP plugin by WPForms generated it."
308
+ msgstr ""
309
+
310
+ #: src/Admin/Pages/Test.php:530
311
+ msgid "SSL certificate issue."
312
+ msgstr ""
313
+
314
+ #: src/Admin/Pages/Test.php:531
315
+ msgid "This means your web server cannot reliably make secure connections (make requests to HTTPS sites)."
316
+ msgstr ""
317
+
318
+ #: src/Admin/Pages/Test.php:532, src/Admin/Pages/Test.php:583
319
+ msgid "Typically this error is returned when web server is not configured properly."
320
+ msgstr ""
321
+
322
+ #: src/Admin/Pages/Test.php:535
323
+ msgid "Contact your web hosting provider and inform them your site has an issue with SSL certificates."
324
+ msgstr ""
325
+
326
+ #: src/Admin/Pages/Test.php:536, src/Admin/Pages/Test.php:587
327
+ msgid "The exact error you can provide them is in the Error log, available at the bottom of this page."
328
+ msgstr ""
329
+
330
+ #: src/Admin/Pages/Test.php:537, src/Admin/Pages/Test.php:588
331
+ msgid "Ask them to resolve the issue then try again."
332
+ msgstr ""
333
+
334
+ #: src/Admin/Pages/Test.php:548
335
+ msgid "Could not connect to host."
336
+ msgstr ""
337
+
338
+ #. translators: %s - SMTP host address.
339
+ #. translators: %s - SMTP host address.
340
+ #. translators: %s - SMTP host address.
341
+ #: src/Admin/Pages/Test.php:552, src/Admin/Pages/Test.php:579, src/Admin/Pages/Test.php:652
342
+ msgid "This means your web server was unable to connect to %s."
343
+ msgstr ""
344
+
345
+ #: src/Admin/Pages/Test.php:555, src/Admin/Pages/Test.php:582, src/Admin/Pages/Test.php:655
346
+ msgid "This means your web server was unable to connect to the host server."
347
+ msgstr ""
348
+
349
+ #: src/Admin/Pages/Test.php:556
350
+ msgid "Typically this error is returned your web server is blocking the connections or the SMTP host denying the request."
351
+ msgstr ""
352
+
353
+ #. translators: %s - SMTP host address.
354
+ #: src/Admin/Pages/Test.php:561
355
+ msgid "Contact your web hosting provider and ask them to verify your server can connect to %s. Additionally, ask them if a firewall or security policy may be preventing the connection."
356
+ msgstr ""
357
+
358
+ #: src/Admin/Pages/Test.php:564
359
+ msgid "If using \"Other SMTP\" Mailer, triple check your SMTP settings including host address, email, and password."
360
+ msgstr ""
361
+
362
+ #: src/Admin/Pages/Test.php:565
363
+ msgid "If using \"Other SMTP\" Mailer, contact your SMTP host to confirm they are accepting outside connections with the settings you have configured (address, username, port, security, etc)."
364
+ msgstr ""
365
+
366
+ #: src/Admin/Pages/Test.php:575
367
+ msgid "Could not connect to your host."
368
+ msgstr ""
369
+
370
+ #: src/Admin/Pages/Test.php:586
371
+ msgid "Contact your web hosting provider and inform them you are having issues making outbound connections."
372
+ msgstr ""
373
+
374
+ #: src/Admin/Pages/Test.php:598
375
+ msgid "Could not authenticate your SMTP account."
376
+ msgstr ""
377
+
378
+ #: src/Admin/Pages/Test.php:599
379
+ msgid "This means we were able to connect to your SMTP host, but were not able to proceed using the email/password in the settings."
380
+ msgstr ""
381
+
382
+ #: src/Admin/Pages/Test.php:600
383
+ msgid "Typically this error is returned when the email or password is not correct or is not what the SMTP host is expecting."
384
+ msgstr ""
385
+
386
+ #: src/Admin/Pages/Test.php:603
387
+ msgid "Triple check your SMTP settings including host address, email, and password. If you have recently reset your password you will need to update the settings."
388
+ msgstr ""
389
+
390
+ #: src/Admin/Pages/Test.php:604, src/Admin/Pages/Test.php:681
391
+ msgid "Contact your SMTP host to confirm you are using the correct username and password."
392
+ msgstr ""
393
+
394
+ #: src/Admin/Pages/Test.php:605, src/Admin/Pages/Test.php:682
395
+ msgid "Verify with your SMTP host that your account has permissions to send emails using outside connections."
396
+ msgstr ""
397
+
398
+ #: src/Admin/Pages/Test.php:615
399
+ msgid "Error due to unsolicited and/or bulk e-mail."
400
+ msgstr ""
401
+
402
+ #: src/Admin/Pages/Test.php:616
403
+ msgid "This means the connection to your SMTP host was made successfully, but the host rejected the email."
404
+ msgstr ""
405
+
406
+ #: src/Admin/Pages/Test.php:617
407
+ msgid "Typically this error is returned when your are sending too many e-mails or e-mails that have been identified as spam."
408
+ msgstr ""
409
+
410
+ #: src/Admin/Pages/Test.php:620
411
+ msgid "Check the emails that are sending are sending individually. Example: email is not sending to 30 recipients. You can install any WordPress e-mail logging plugin to do that."
412
+ msgstr ""
413
+
414
+ #: src/Admin/Pages/Test.php:621
415
+ msgid "Contact your SMTP host to ask about sending/rate limits."
416
+ msgstr ""
417
+
418
+ #: src/Admin/Pages/Test.php:622
419
+ msgid "Verify with them your SMTP account is in good standing and your account has not been flagged."
420
+ msgstr ""
421
+
422
+ #: src/Admin/Pages/Test.php:632
423
+ msgid "Unauthenticated senders are not allowed."
424
+ msgstr ""
425
+
426
+ #: src/Admin/Pages/Test.php:633
427
+ msgid "This means the connection to your SMTP host was made successfully, but you should enable Authentication and provide correct Username and Password."
428
+ msgstr ""
429
+
430
+ #: src/Admin/Pages/Test.php:636
431
+ msgid "Go to WP Mail SMTP plugin Settings page."
432
+ msgstr ""
433
+
434
+ #: src/Admin/Pages/Test.php:637
435
+ msgid "Enable Authentication"
436
+ msgstr ""
437
+
438
+ #: src/Admin/Pages/Test.php:638
439
+ msgid "Enter correct SMTP Username (usually this is an email address) and Password in the appropriate fields."
440
+ msgstr ""
441
+
442
+ #: src/Admin/Pages/Test.php:648
443
+ msgid "Could not connect to the SMTP host."
444
+ msgstr ""
445
+
446
+ #: src/Admin/Pages/Test.php:656, src/Admin/Pages/Test.php:977
447
+ msgid "Typically this error is returned for one of the following reasons:"
448
+ msgstr ""
449
+
450
+ #: src/Admin/Pages/Test.php:657
451
+ msgid "SMTP settings are incorrect (wrong port, security setting, incorrect host)."
452
+ msgstr ""
453
+
454
+ #: src/Admin/Pages/Test.php:658, src/Admin/Pages/Test.php:979
455
+ msgid "Your web server is blocking the connection."
456
+ msgstr ""
457
+
458
+ #: src/Admin/Pages/Test.php:659
459
+ msgid "Your SMTP host is rejecting the connection."
460
+ msgstr ""
461
+
462
+ #: src/Admin/Pages/Test.php:662
463
+ msgid "Triple check your SMTP settings including host address, email, and password, port, and security."
464
+ msgstr ""
465
+
466
+ #. translators: %1$s - SMTP host address, %2$s - SMTP port, %3$s - SMTP encryption.
467
+ #: src/Admin/Pages/Test.php:666
468
+ msgid "Contact your web hosting provider and ask them to verify your server can connect to %1$s on port %2$s using %3$s encryption. Additionally, ask them if a firewall or security policy may be preventing the connection - many shared hosts block certain ports.<br><strong>Note: this is the most common cause of this issue.</strong>"
469
+ msgstr ""
470
+
471
+ #: src/Admin/Pages/Test.php:679
472
+ msgid "no"
473
+ msgstr ""
474
+
475
+ #: src/Admin/Pages/Test.php:692, src/Admin/Pages/Test.php:708
476
+ msgid "Mailgun failed."
477
+ msgstr ""
478
+
479
+ #: src/Admin/Pages/Test.php:693
480
+ msgid "Typically this error is because there is an issue with your Mailgun settings, in many cases the API key."
481
+ msgstr ""
482
+
483
+ #: src/Admin/Pages/Test.php:696
484
+ msgid "Verify your API key is correct."
485
+ msgstr ""
486
+
487
+ #: src/Admin/Pages/Test.php:697
488
+ msgid "Go to your Mailgun account and view your API key."
489
+ msgstr ""
490
+
491
+ #: src/Admin/Pages/Test.php:698
492
+ msgid "Note that the API key includes the \"key\" prefix, so make sure that it is in the WP Mail SMTP Mailgun API setting."
493
+ msgstr ""
494
+
495
+ #: src/Admin/Pages/Test.php:709
496
+ msgid "Your Mailgun account does not have access to send emails."
497
+ msgstr ""
498
+
499
+ #: src/Admin/Pages/Test.php:710
500
+ msgid "Typically this error is because you have not setup and/or complete domain name verification for your Mailgun account."
501
+ msgstr ""
502
+
503
+ #. translators: %s - Mailgun documentation URL.
504
+ #: src/Admin/Pages/Test.php:716
505
+ msgid "Go to our how-to guide for setting up <a href=\"%s\" target=\"_blank\" rel=\"noopener noreferrer\">Mailgun with WP Mail SMTP</a>."
506
+ msgstr ""
507
+
508
+ #: src/Admin/Pages/Test.php:727
509
+ msgid "Complete the steps in section \"2. Verify Your Domain\"."
510
+ msgstr ""
511
+
512
+ #: src/Admin/Pages/Test.php:737, src/Admin/Pages/Test.php:788, src/Admin/Pages/Test.php:809, src/Admin/Pages/Test.php:836, src/Admin/Pages/Test.php:852, src/Admin/Pages/Test.php:907, src/Admin/Pages/Test.php:934
513
+ msgid "Google API Error."
514
+ msgstr ""
515
+
516
+ #: src/Admin/Pages/Test.php:738
517
+ msgid "You have not properly configured Gmail mailer."
518
+ msgstr ""
519
+
520
+ #: src/Admin/Pages/Test.php:739
521
+ msgid "Make sure that you have clicked the \"Allow plugin to send emails using your Google account\" button under Gmail settings."
522
+ msgstr ""
523
+
524
+ #: src/Admin/Pages/Test.php:742
525
+ msgid "Go to plugin Settings page and click the \"Allow plugin to send emails using your Google account\" button."
526
+ msgstr ""
527
+
528
+ #: src/Admin/Pages/Test.php:743
529
+ msgid "After the click you should be redirected to a Gmail authorization screen, where you will be asked a permission to send emails on your behalf."
530
+ msgstr ""
531
+
532
+ #: src/Admin/Pages/Test.php:744
533
+ msgid "Please click \"Agree\", if you see that button. If not - you will need to enable less secure apps first:"
534
+ msgstr ""
535
+
536
+ #. translators: %s - Google support article URL.
537
+ #: src/Admin/Pages/Test.php:750
538
+ msgid "if you are using regular Gmail account, please <a href=\"%s\" target=\"_blank\" rel=\"noopener noreferrer\">read this article</a> to proceed."
539
+ msgstr ""
540
+
541
+ #. translators: %s - Google support article URL.
542
+ #: src/Admin/Pages/Test.php:766
543
+ msgid "if you are using G Suite, please <a href=\"%s\" target=\"_blank\" rel=\"noopener noreferrer\">read this article</a> to proceed."
544
+ msgstr ""
545
+
546
+ #: src/Admin/Pages/Test.php:789
547
+ msgid "Typically this error is because address the email was sent to is invalid or was empty."
548
+ msgstr ""
549
+
550
+ #: src/Admin/Pages/Test.php:792
551
+ msgid "Check the \"Send To\" email address used and confirm it is a valid email and was not empty."
552
+ msgstr ""
553
+
554
+ #. translators: 1 - correct email address example. 2 - incorrect email address example.
555
+ #: src/Admin/Pages/Test.php:795
556
+ msgid "It should be something like this: %1$s. These are incorrect values: %2$s."
557
+ msgstr ""
558
+
559
+ #: src/Admin/Pages/Test.php:799
560
+ msgid "Make sure that the generated email has a TO header, useful when you are responsible for email creation."
561
+ msgstr ""
562
+
563
+ #: src/Admin/Pages/Test.php:810
564
+ msgid "Unfortunately, this error can be due to many different reasons."
565
+ msgstr ""
566
+
567
+ #. translators: %s - Blog article URL.
568
+ #: src/Admin/Pages/Test.php:816
569
+ msgid "Please <a href=\"%s\" target=\"_blank\" rel=\"noopener noreferrer\">read this article</a> to learn more about what can cause this error and how it can be resolved."
570
+ msgstr ""
571
+
572
+ #: src/Admin/Pages/Test.php:837
573
+ msgid "Authentication code that Google returned to you has already been used on your previous auth attempt."
574
+ msgstr ""
575
+
576
+ #: src/Admin/Pages/Test.php:840
577
+ msgid "Make sure that you are not trying to manually clean up the plugin options to retry the \"Allow...\" step."
578
+ msgstr ""
579
+
580
+ #: src/Admin/Pages/Test.php:841
581
+ msgid "Reinstall the plugin with clean plugin data turned on on Misc page. This will remove all the plugin options and you will be safe to retry."
582
+ msgstr ""
583
+
584
+ #: src/Admin/Pages/Test.php:842
585
+ msgid "Make sure there is no aggressive caching on site admin area pages or try to clean cache between attempts."
586
+ msgstr ""
587
+
588
+ #: src/Admin/Pages/Test.php:853
589
+ msgid "There are various reasons for that, please review the steps below."
590
+ msgstr ""
591
+
592
+ #. translators: %s - Google G Suite Admin area URL.
593
+ #: src/Admin/Pages/Test.php:859
594
+ msgid "Make sure that your G Suite trial period has not expired. You can check the status <a href=\"%s\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>."
595
+ msgstr ""
596
+
597
+ #. translators: %s - Google G Suite Admin area URL.
598
+ #: src/Admin/Pages/Test.php:873
599
+ msgid "Make sure that Gmail app in your G Suite is actually enabled. You can check that in Apps list in <a href=\"%s\" target=\"_blank\" rel=\"noopener noreferrer\">G Suite Admin</a> area."
600
+ msgstr ""
601
+
602
+ #. translators: %s - Google Developers Console URL.
603
+ #: src/Admin/Pages/Test.php:887
604
+ msgid "Make sure that you have Gmail API enabled, and you can do that <a href=\"%s\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>."
605
+ msgstr ""
606
+
607
+ #: src/Admin/Pages/Test.php:910, src/Admin/Pages/Test.php:938
608
+ msgid "Make sure that the used Client ID/Secret correspond to a proper project that has Gmail API enabled."
609
+ msgstr ""
610
+
611
+ #. translators: %s - WPForms.com tutorial URL.
612
+ #: src/Admin/Pages/Test.php:914
613
+ msgid "Please follow our <a href=\"%s\" target=\"_blank\" rel=\"noopener noreferrer\">Gmail tutorial</a> to be sure that all the correct project and data is applied."
614
+ msgstr ""
615
+
616
+ #: src/Admin/Pages/Test.php:935
617
+ msgid "You may have added a new API to a project"
618
+ msgstr ""
619
+
620
+ #: src/Admin/Pages/Test.php:939
621
+ msgid "Try to use a separate project for your emails, so the project has only 1 Gmail API in it enabled. You will need to remove the old project and create a new one from scratch."
622
+ msgstr ""
623
+
624
+ #: src/Admin/Pages/Test.php:975
625
+ msgid "An issue was detected."
626
+ msgstr ""
627
+
628
+ #: src/Admin/Pages/Test.php:976
629
+ msgid "This means your test email was unable to be sent."
630
+ msgstr ""
631
+
632
+ #: src/Admin/Pages/Test.php:978
633
+ msgid "Plugin settings are incorrect (wrong SMTP settings, invalid Mailer configuration, etc)."
634
+ msgstr ""
635
+
636
+ #: src/Admin/Pages/Test.php:980
637
+ msgid "Your host is rejecting the connection."
638
+ msgstr ""
639
+
640
+ #: src/Admin/Pages/Test.php:983
641
+ msgid "Triple check the plugin settings, consider reconfiguring to make sure everything is correct (eg bad copy and paste)."
642
+ msgstr ""
643
+
644
+ #: src/Admin/Pages/Test.php:985
645
+ msgid "Contact your web hosting provider and ask them to verify your server can make outside connections. Additionally, ask them if a firewall or security policy may be preventing the connection - many shared hosts block certain ports.<br><strong>Note: this is the most common cause of this issue.</strong>"
646
+ msgstr ""
647
+
648
+ #: src/Admin/Pages/Test.php:991
649
+ msgid "Try using a different mailer."
650
+ msgstr ""
651
+
652
+ #: src/Admin/Pages/Test.php:1010
653
+ msgid "There was a problem while sending the test email."
654
+ msgstr ""
655
+
656
+ #: src/Admin/Pages/Test.php:1020
657
+ msgid "Recommended next steps:"
658
+ msgstr ""
659
+
660
+ #: src/Admin/Pages/Test.php:1030
661
+ msgid "Need support?"
662
+ msgstr ""
663
+
664
+ #. translators: %s - WPForms account area link.
665
+ #: src/Admin/Pages/Test.php:1039
666
+ msgid "As a WPForms Pro user you have access to WP Mail SMTP priority support. Please log in to your WPForms.com account and <a href=\"%s\" target=\"_blank\" rel=\"noopener noreferrer\">submit a support ticket</a>."
667
+ msgstr ""
668
+
669
+ #. translators: %s - WPForms URL.
670
+ #: src/Admin/Pages/Test.php:1064
671
+ msgid "To access priority support from our team, please <a href=\"%s\" target=\"_blank\" rel=\"noopener noreferrer\">purchase a WPForms license</a>. Along with getting priority support for WP Mail SMTP, you will also get access to the best drag & drop WordPress form builder plugin."
672
+ msgstr ""
673
+
674
+ #. translators: %s - Star icons.
675
+ #: src/Admin/Pages/Test.php:1083
676
+ msgid "WPForms is being used on over 1 million websites and has over 2000+ five star ratings (%s)."
677
+ msgstr ""
678
+
679
+ #: src/Admin/Pages/Test.php:1096
680
+ msgid "You will truly love the WPForms plugin, but most importantly your support will help us continue to maintain and add new features to the WP Mail SMTP plugin while keeping it free for the larger WordPress community."
681
+ msgstr ""
682
+
683
+ #. translators: %1$s - WP Mail SMTP support policy URL, %2$s - WP Mail SMTP support forum URL, %3$s - WPForms URL.
684
+ #: src/Admin/Pages/Test.php:1104
685
+ msgid "Alternatively, we also offer <a href=\"%1$s\" target=\"_blank\" rel=\"noopener noreferrer\">limited support</a> on the WordPress.org support forums. You can <a href=\"%2$s\" target=\"_blank\" rel=\"noopener noreferrer\">create a support thread</a> there, but please understand that free support is not guaranteed and is limited to simple issues. If you have an urgent or complex issue, then please consider <a href=\"%3$s\" target=\"_blank\" rel=\"noopener noreferrer\">purchasing a WPForms license</a> to access our priority support ticket system."
686
+ msgstr ""
687
+
688
+ #: src/Admin/Pages/Test.php:1125
689
+ msgid "Click here to view the full Error Log for debugging"
690
+ msgstr ""
691
+
692
+ #: src/Admin/Pages/Test.php:1134
693
+ msgid "Please copy only the content of the error debug message above, identified with an orange left border, into the support forum topic if you experience any issues."
694
+ msgstr ""
695
+
696
+ #: src/Core.php:262
697
+ msgid "Install Recommended Plugin"
698
+ msgstr ""
699
+
700
+ #: src/Core.php:263
701
+ msgid "Recommended"
702
+ msgstr ""
703
+
704
+ #. translators: 1: plugin name(s).
705
+ #. translators: 1: plugin name(s).
706
+ #: src/Core.php:265, src/Core.php:271
707
+ msgid "Thanks for installing WP Mail SMTP. We also recommend using %1$s. It's the best drag & drop form builder, has over 1 million active installs, and over 2000+ 5 star ratings."
708
+ msgid_plural "Thanks for installing WP Mail SMTP. We also recommend using %1$s. It's the best drag & drop form builder, has over 1 million active installs, and over 2000+ 5 star ratings."
709
+ msgstr[0] ""
710
+ msgstr[1] ""
711
+
712
+ #: src/Core.php:276
713
+ msgid "Install WPForms Now"
714
+ msgid_plural "Begin installing plugins"
715
+ msgstr[0] ""
716
+ msgstr[1] ""
717
+
718
+ #: src/Core.php:277
719
+ msgid "Activate WPForms"
720
+ msgid_plural "Begin activating plugins"
721
+ msgstr[0] ""
722
+ msgstr[1] ""
723
+
724
+ #: src/Core.php:278
725
+ msgid "Return to Recommended Plugin Installer"
726
+ msgstr ""
727
+
728
+ #. translators: 1: dashboard link.
729
+ #: src/Core.php:280
730
+ msgid "The recommended plugin was installed and activated successfully. %1$s"
731
+ msgstr ""
732
+
733
+ #: src/Core.php:281
734
+ msgid "There is one recommended plugin to install, update or activate."
735
+ msgstr ""
736
+
737
+ #. translators: %1$s - plugin name and its version, %2$s - plugin Misc settings page.
738
+ #: src/Core.php:306
739
+ msgid "<strong>EMAILING DISABLED:</strong> The %1$s is currently blocking all emails from being sent. To send emails, go to plugin <a href=\"%2$s\">Misc settings</a> and disable the \"Do Not Send\" option."
740
+ msgstr ""
741
+
742
+ #. translators: %s - plugin name and its version.
743
+ #: src/Core.php:336
744
+ msgid "<strong>EMAIL DELIVERY ERROR:</strong> the plugin %s logged this error during the last time it tried to send an email:"
745
+ msgstr ""
746
+
747
+ #: src/Core.php:367
748
+ msgid "Consider running an email test after fixing it."
749
+ msgstr ""
750
+
751
+ #. translators: %1$s - Plugin name causing conflict; %2$s - Plugin name causing conflict.
752
+ #: src/Core.php:522
753
+ msgid "Heads up! WP Mail SMTP has detected %1$s is activated. Please deactivate %2$s to prevent conflicts."
754
+ msgstr ""
755
+
756
+ #: src/Providers/Gmail/Options.php:25
757
+ msgid "Gmail"
758
+ msgstr ""
759
+
760
+ #. translators: %1$s - opening link tag; %2$s - closing link tag.
761
+ #: src/Providers/Gmail/Options.php:29
762
+ msgid "Send emails using your Gmail or G Suite (formerly Google Apps) account, all while keeping your login credentials safe. Other Google SMTP methods require enabling less secure apps in your account and entering your password. However, this integration uses the Google API to improve email delivery issues while keeping your site secure.<br><br>Read our %1$sGmail documentation%2$s to learn how to configure Gmail or G Suite."
763
+ msgstr ""
764
+
765
+ #: src/Providers/Gmail/Options.php:64
766
+ msgid "Client ID"
767
+ msgstr ""
768
+
769
+ #: src/Providers/Gmail/Options.php:79
770
+ msgid "Client Secret"
771
+ msgstr ""
772
+
773
+ #: src/Providers/Gmail/Options.php:94
774
+ msgid "Authorized redirect URI"
775
+ msgstr ""
776
+
777
+ #: src/Providers/Gmail/Options.php:102
778
+ msgid "Copy URL to clipboard"
779
+ msgstr ""
780
+
781
+ #: src/Providers/Gmail/Options.php:107
782
+ msgid "This is the path on your site that you will be redirected to after you have authenticated with Google."
783
+ msgstr ""
784
+
785
+ #: src/Providers/Gmail/Options.php:109
786
+ msgid "You need to copy this URL into \"Authorized redirect URIs\" field for you web application on Google APIs site for your project there."
787
+ msgstr ""
788
+
789
+ #: src/Providers/Gmail/Options.php:118
790
+ msgid "Authorization"
791
+ msgstr ""
792
+
793
+ #: src/Providers/Gmail/Options.php:143
794
+ msgid "Are you sure you want to reset the current Gmail connection? You will need to immediately create a new one to be able to send emails."
795
+ msgstr ""
796
+
797
+ #: src/Providers/Gmail/Options.php:151
798
+ msgid "Allow plugin to send emails using your Google account"
799
+ msgstr ""
800
+
801
+ #: src/Providers/Gmail/Options.php:154
802
+ msgid "Click the button above to confirm authorization."
803
+ msgstr ""
804
+
805
+ #: src/Providers/Gmail/Options.php:160
806
+ msgid "Remove Connection"
807
+ msgstr ""
808
+
809
+ #: src/Providers/Gmail/Options.php:163
810
+ msgid "Removing the connection will give you an ability to redo the connection or link to another Google account."
811
+ msgstr ""
812
+
813
+ #: src/Providers/Gmail/Options.php:171
814
+ msgid "To setup Gmail integration properly you should save Client ID and Client Secret."
815
+ msgstr ""
816
+
817
+ #: src/Providers/Mailgun/Options.php:25
818
+ msgid "Mailgun"
819
+ msgstr ""
820
+
821
+ #. translators: %1$s - opening link tag; %2$s - closing link tag; %3$s - opening link tag; %4$s - closing link tag.
822
+ #: src/Providers/Mailgun/Options.php:29
823
+ msgid "%1$sMailgun%2$s is one of the leading transactional email services trusted by over 10,000 website and application developers. They provide users 10,000 free emails per month.<br><br>Read our %3$sMailgun documentation%4$s to learn how to configure Mailgun and improve your email deliverability."
824
+ msgstr ""
825
+
826
+ #: src/Providers/Mailgun/Options.php:57
827
+ msgid "Private API Key"
828
+ msgstr ""
829
+
830
+ #. translators: %s - API key link.
831
+ #: src/Providers/Mailgun/Options.php:69
832
+ msgid "Follow this link to get an API Key from Mailgun: %s."
833
+ msgstr ""
834
+
835
+ #: src/Providers/Mailgun/Options.php:71
836
+ msgid "Get a Private API Key"
837
+ msgstr ""
838
+
839
+ #: src/Providers/Mailgun/Options.php:82
840
+ msgid "Domain Name"
841
+ msgstr ""
842
+
843
+ #. translators: %s - Domain Name link.
844
+ #: src/Providers/Mailgun/Options.php:94
845
+ msgid "Follow this link to get a Domain Name from Mailgun: %s."
846
+ msgstr ""
847
+
848
+ #: src/Providers/Mailgun/Options.php:96
849
+ msgid "Get a Domain Name"
850
+ msgstr ""
851
+
852
+ #: src/Providers/Mailgun/Options.php:107
853
+ msgid "Region"
854
+ msgstr ""
855
+
856
+ #: src/Providers/Mailgun/Options.php:117
857
+ msgid "US"
858
+ msgstr ""
859
+
860
+ #: src/Providers/Mailgun/Options.php:126
861
+ msgid "EU"
862
+ msgstr ""
863
+
864
+ #: src/Providers/Mailgun/Options.php:130
865
+ msgid "Define which endpoint you want to use for sending messages."
866
+ msgstr ""
867
+
868
+ #: src/Providers/Mailgun/Options.php:131
869
+ msgid "If you are operating under EU laws, you may be required to use EU region."
870
+ msgstr ""
871
+
872
+ #. translators: %s - URL to Mailgun.com page.
873
+ #: src/Providers/Mailgun/Options.php:136
874
+ msgid "<a href=\"%s\" rel=\"\" target=\"_blank\">More information</a> on Mailgun.com."
875
+ msgstr ""
876
+
877
+ #: src/Providers/Mail/Options.php:25
878
+ msgid "Default (none)"
879
+ msgstr ""
880
+
881
+ #: src/Providers/Mail/Options.php:37
882
+ msgid "You currently have the native WordPress option selected. Please select any other Mailer option above to continue the setup."
883
+ msgstr ""
884
+
885
+ #: src/Providers/OptionsAbstract.php:126, wp_mail_smtp.php:439
886
+ msgid "SMTP Host"
887
+ msgstr ""
888
+
889
+ #: src/Providers/OptionsAbstract.php:140, wp_mail_smtp.php:454, wp_mail_smtp.php:458, wp_mail_smtp.php:573, wp_mail_smtp.php:579
890
+ msgid "Encryption"
891
+ msgstr ""
892
+
893
+ #: src/Providers/OptionsAbstract.php:150
894
+ msgid "None"
895
+ msgstr ""
896
+
897
+ #: src/Providers/OptionsAbstract.php:159
898
+ msgid "SSL"
899
+ msgstr ""
900
+
901
+ #: src/Providers/OptionsAbstract.php:168
902
+ msgid "TLS"
903
+ msgstr ""
904
+
905
+ #: src/Providers/OptionsAbstract.php:172
906
+ msgid "For most servers TLS is the recommended option. If your SMTP provider offers both SSL and TLS options, we recommend using TLS."
907
+ msgstr ""
908
+
909
+ #: src/Providers/OptionsAbstract.php:180, wp_mail_smtp.php:447, wp_mail_smtp.php:565
910
+ msgid "SMTP Port"
911
+ msgstr ""
912
+
913
+ #: src/Providers/OptionsAbstract.php:194
914
+ msgid "Auto TLS"
915
+ msgstr ""
916
+
917
+ #: src/Providers/OptionsAbstract.php:208
918
+ msgid "By default TLS encryption is automatically used if the server supports it, which is recommended. In some cases, due to server misconfigurations, this can cause issues and may need to be disabled."
919
+ msgstr ""
920
+
921
+ #: src/Providers/OptionsAbstract.php:216, wp_mail_smtp.php:481, wp_mail_smtp.php:485
922
+ msgid "Authentication"
923
+ msgstr ""
924
+
925
+ #: src/Providers/OptionsAbstract.php:235
926
+ msgid "SMTP Username"
927
+ msgstr ""
928
+
929
+ #: src/Providers/OptionsAbstract.php:249
930
+ msgid "SMTP Password"
931
+ msgstr ""
932
+
933
+ #. translators: %s - wp-config.php.
934
+ #: src/Providers/OptionsAbstract.php:263
935
+ msgid "The password is stored in plain text. We highly recommend you setup your password in your WordPress configuration file for improved security; to do this add the lines below to your %s file."
936
+ msgstr ""
937
+
938
+ #. translators: %1$s - Provider name; %2$s - PHP version required by Provider; %3$s - current PHP version.
939
+ #: src/Providers/OptionsAbstract.php:300
940
+ msgid "%1$s requires PHP %2$s to work and does not support your current PHP version %3$s. Please contact your host and request a PHP upgrade to the latest one."
941
+ msgstr ""
942
+
943
+ #: src/Providers/OptionsAbstract.php:307
944
+ msgid "Meanwhile you can switch to the \"Other SMTP\" Mailer option."
945
+ msgstr ""
946
+
947
+ #: src/Providers/Pepipost/Options.php:25
948
+ msgid "Pepipost"
949
+ msgstr ""
950
+
951
+ #: src/Providers/Sendgrid/Options.php:25
952
+ msgid "SendGrid"
953
+ msgstr ""
954
+
955
+ #. translators: %1$s - opening link tag; %2$s - closing link tag; %3$s - opening link tag; %4$s - closing link tag.
956
+ #: src/Providers/Sendgrid/Options.php:29
957
+ msgid "%1$sSendGrid%2$s is one of the leading transactional email services, sending over 35 billion emails every month. They provide users 100 free emails per month.<br><br>Read our %3$sSendGrid documentation%4$s to learn how to set up SendGrid and improve your email deliverability."
958
+ msgstr ""
959
+
960
+ #: src/Providers/Sendgrid/Options.php:57
961
+ msgid "API Key"
962
+ msgstr ""
963
+
964
+ #. translators: %s - API key link.
965
+ #: src/Providers/Sendgrid/Options.php:69
966
+ msgid "Follow this link to get an API Key from SendGrid: %s."
967
+ msgstr ""
968
+
969
+ #: src/Providers/Sendgrid/Options.php:71
970
+ msgid "Create API Key"
971
+ msgstr ""
972
+
973
+ #. translators: %s - SendGrid access level.
974
+ #: src/Providers/Sendgrid/Options.php:79
975
+ msgid "To send emails you will need only a %s access level for this API key."
976
+ msgstr ""
977
+
978
+ #: src/Providers/SMTP/Options.php:25
979
+ msgid "Other SMTP"
980
+ msgstr ""
981
+
982
+ #: src/Providers/SMTP/Options.php:29
983
+ msgid "Use the SMTP details provided by your hosting provider or email service.<br><br>To see recommended settings for the popular services as well as troubleshooting tips, check out our %1$sSMTP documentation%2$s."
984
+ msgstr ""
985
+
986
+ #. translators: %s - email address where test mail will be sent to.
987
+ #: wp_mail_smtp.php:265
988
+ msgid "Test mail to %s"
989
+ msgstr ""
990
+
991
+ #: wp_mail_smtp.php:266
992
+ msgid "This is a test email generated by the WP Mail SMTP WordPress plugin."
993
+ msgstr ""
994
+
995
+ #: wp_mail_smtp.php:282
996
+ msgid "Test Message Sent"
997
+ msgstr ""
998
+
999
+ #: wp_mail_smtp.php:283
1000
+ msgid "The result was:"
1001
+ msgstr ""
1002
+
1003
+ #: wp_mail_smtp.php:286
1004
+ msgid "The full debugging output is shown below:"
1005
+ msgstr ""
1006
+
1007
+ #: wp_mail_smtp.php:289
1008
+ msgid "The SMTP debugging output is shown below:"
1009
+ msgstr ""
1010
+
1011
+ #: wp_mail_smtp.php:256, wp_mail_smtp.php:630
1012
+ msgid "Send Test"
1013
+ msgstr ""
1014
+
1015
+ #: wp_mail_smtp.php:301, wp_mail_smtp.php:666
1016
+ msgid "WP Mail SMTP Settings"
1017
+ msgstr ""
1018
+
1019
+ #: wp_mail_smtp.php:317
1020
+ msgid "You can specify the email address that emails should be sent from. If you leave this blank, the default email will be used."
1021
+ msgstr ""
1022
+
1023
+ #: wp_mail_smtp.php:320
1024
+ msgid "<strong>Please Note:</strong> You appear to be using a version of WordPress prior to 2.3. Please ignore the From Name field and instead enter Name&lt;email@domain.com&gt; in this field."
1025
+ msgstr ""
1026
+
1027
+ #: wp_mail_smtp.php:335
1028
+ msgid "You can specify the name that emails should be sent from. If you leave this blank, the emails will be sent from WordPress."
1029
+ msgstr ""
1030
+
1031
+ #: wp_mail_smtp.php:354
1032
+ msgid "Send all WordPress emails via SMTP."
1033
+ msgstr ""
1034
+
1035
+ #: wp_mail_smtp.php:358
1036
+ msgid "Use the PHP mail() function to send emails."
1037
+ msgstr ""
1038
+
1039
+ #: wp_mail_smtp.php:364
1040
+ msgid "Use Pepipost SMTP to send emails."
1041
+ msgstr ""
1042
+
1043
+ #. translators: %1$s - link start; %2$s - link end.
1044
+ #: wp_mail_smtp.php:370
1045
+ msgid "Looking for high inbox delivery? Try Pepipost with easy setup and free emails. Learn more %1$shere%2$s."
1046
+ msgstr ""
1047
+
1048
+ #: wp_mail_smtp.php:427, wp_mail_smtp.php:527, wp_mail_smtp.php:603
1049
+ msgid "Save Changes"
1050
+ msgstr ""
1051
+
1052
+ #: wp_mail_smtp.php:432
1053
+ msgid "SMTP Options"
1054
+ msgstr ""
1055
+
1056
+ #: wp_mail_smtp.php:434
1057
+ msgid "These options only apply if you have chosen to send mail by SMTP above."
1058
+ msgstr ""
1059
+
1060
+ #: wp_mail_smtp.php:463, wp_mail_smtp.php:585
1061
+ msgid "No encryption."
1062
+ msgstr ""
1063
+
1064
+ #: wp_mail_smtp.php:468, wp_mail_smtp.php:590
1065
+ msgid "Use SSL encryption."
1066
+ msgstr ""
1067
+
1068
+ #: wp_mail_smtp.php:473, wp_mail_smtp.php:595
1069
+ msgid "Use TLS encryption."
1070
+ msgstr ""
1071
+
1072
+ #: wp_mail_smtp.php:476
1073
+ msgid "TLS is not the same as STARTTLS. For most servers SSL is the recommended option."
1074
+ msgstr ""
1075
+
1076
+ #: wp_mail_smtp.php:490
1077
+ msgid "No: Do not use SMTP authentication."
1078
+ msgstr ""
1079
+
1080
+ #: wp_mail_smtp.php:495
1081
+ msgid "Yes: Use SMTP authentication."
1082
+ msgstr ""
1083
+
1084
+ #: wp_mail_smtp.php:499
1085
+ msgid "If this is set to no, the values below are ignored."
1086
+ msgstr ""
1087
+
1088
+ #: wp_mail_smtp.php:506, wp_mail_smtp.php:549
1089
+ msgid "Username"
1090
+ msgstr ""
1091
+
1092
+ #: wp_mail_smtp.php:514, wp_mail_smtp.php:557
1093
+ msgid "Password"
1094
+ msgstr ""
1095
+
1096
+ #: wp_mail_smtp.php:520
1097
+ msgid "This is in plain text because it must not be stored encrypted."
1098
+ msgstr ""
1099
+
1100
+ #: wp_mail_smtp.php:534
1101
+ msgid "Pepipost SMTP Options"
1102
+ msgstr ""
1103
+
1104
+ #. translators: %s - Pepipost registration URL.
1105
+ #: wp_mail_smtp.php:540
1106
+ msgid "You need to signup on %s to get the SMTP username/password."
1107
+ msgstr ""
1108
+
1109
+ #: wp_mail_smtp.php:620
1110
+ msgid "To"
1111
+ msgstr ""
1112
+
1113
+ #: wp_mail_smtp.php:624
1114
+ msgid "Type an email address here and then click Send Test to generate a test email."
1115
+ msgstr ""
readme.txt CHANGED
@@ -2,17 +2,17 @@
2
  Contributors: wpforms, jaredatch, smub, slaFFik
3
  Tags: smtp, wp mail smtp, wordpress smtp, gmail smtp, sendgrid smtp, mailgun smtp, mail, mailer, phpmailer, wp_mail, email, mailgun, sengrid, gmail, wp smtp
4
  Requires at least: 3.6
5
- Tested up to: 4.9
6
- Stable tag: trunk
7
  Requires PHP: 5.3
8
 
9
- The most popular WordPress SMTP and PHP Mailer plugin. Trusted by over 900k sites.
10
 
11
  == Description ==
12
 
13
  = WordPress Mail SMTP Plugin =
14
 
15
- Having problems with your WordPress site not sending emails? You're not alone. Over 900,000 websites use WP Mail SMTP to fix their email deliverability issues.
16
 
17
  WP Mail SMTP fixes your email deliverability by reconfiguring the wp_mail() PHP function to use a proper SMTP provider.
18
 
@@ -146,6 +146,25 @@ By all means please contact us to discuss features or options you'd like to see
146
 
147
  == Changelog ==
148
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
149
  ## [1.3.3] - 2018-07-05
150
  * Fixed: Compatibility with other plugins, that are using Google Service or Google Client classes.
151
  * Changed: Optimize code loading.
2
  Contributors: wpforms, jaredatch, smub, slaFFik
3
  Tags: smtp, wp mail smtp, wordpress smtp, gmail smtp, sendgrid smtp, mailgun smtp, mail, mailer, phpmailer, wp_mail, email, mailgun, sengrid, gmail, wp smtp
4
  Requires at least: 3.6
5
+ Tested up to: 5.0
6
+ Stable tag: 1.4.0
7
  Requires PHP: 5.3
8
 
9
+ The most popular WordPress SMTP and PHP Mailer plugin. Trusted by over 1 million sites.
10
 
11
  == Description ==
12
 
13
  = WordPress Mail SMTP Plugin =
14
 
15
+ Having problems with your WordPress site not sending emails? You're not alone. Over 1 million websites use WP Mail SMTP to fix their email deliverability issues.
16
 
17
  WP Mail SMTP fixes your email deliverability by reconfiguring the wp_mail() PHP function to use a proper SMTP provider.
18
 
146
 
147
  == Changelog ==
148
 
149
+ ## [1.4.0] - 2018-11-29
150
+ * Added: New option: Do Not Send - block emails from being sent.
151
+ * Added: New option: Send HTML or plain text emails when doing an Email Test.
152
+ * Added: New option: Mailgun region selection - US and EU (US is default to preserve compatibility).
153
+ * Fixed: Compatibility with WordPress 3.6+.
154
+ * Fixed: Compatibility with WordPress 5.0.
155
+ * Fixed: Constants usage is much more reliable now, works correctly on Multisite. Constants are global accross the whole network.
156
+ * Fixed: Preserve multipart emails when using Sendgrid/Mailgun mailers (were converted to HTML-only).
157
+ * Fixed: Security hardening.
158
+ * Changed: Prefill Email Test page From field with currently logged in user email.
159
+ * Changed: Update libraries: google/apiclient-services, google/auth, phpseclib/phpseclib and their dependecies.
160
+ * Changed: Display in debug output cURL version if Gmail mailing failed.
161
+ * Changed: Display in debug output OpenSSL version if it exists if Gmail/SMTP mailing failed.
162
+ * Changed: Display plugin version in dashboard error notice when emailing failed.
163
+ * Changed: Do not allow to send Test Email if mailer not configured properly.
164
+ * Changed: Notify in plugin admin area that Gmail doesn't allow to redefine From Name/Email etc.
165
+ * Changed: List all constants with descriptions in plugin main file: wp_mail_smtp.php.
166
+ * Changed: TGMPA: change descriptions from "Required" to "Recommended" (labels were incorrect).
167
+
168
  ## [1.3.3] - 2018-07-05
169
  * Fixed: Compatibility with other plugins, that are using Google Service or Google Client classes.
170
  * Changed: Optimize code loading.
src/AM_Notification.php CHANGED
@@ -9,12 +9,13 @@ namespace WPMailSMTP;
9
  * retrieve notifications for this product.
10
  *
11
  * @package AwesomeMotive
12
- * @author Benjamin Rojas
13
  * @license GPL-2.0+
14
- * @copyright Copyright (c) 2017, Retyp LLC
15
- * @version 1.0.2
16
  */
17
  class AM_Notification {
 
18
  /**
19
  * The api url we are calling.
20
  *
@@ -77,9 +78,10 @@ class AM_Notification {
77
  */
78
  public function custom_post_type() {
79
  register_post_type( 'amn_' . $this->plugin, array(
80
- 'label' => $this->plugin . ' Announcements',
81
- 'can_export' => false,
82
- 'supports' => false,
 
83
  ) );
84
  }
85
 
@@ -89,7 +91,7 @@ class AM_Notification {
89
  * @since 1.0.0
90
  */
91
  public function get_remote_notifications() {
92
- if ( ! current_user_can( apply_filters( 'am_notifications_display', 'manage_options' ) ) ) {
93
  return;
94
  }
95
 
@@ -133,10 +135,12 @@ class AM_Notification {
133
  }
134
 
135
  if ( empty( $notifications ) ) {
136
- $new_notification_id = wp_insert_post( array(
137
- 'post_content' => wp_kses_post( $data->content ),
138
- 'post_type' => 'amn_' . $this->plugin,
139
- ) );
 
 
140
 
141
  update_post_meta( $new_notification_id, 'notification_id', absint( $data->id ) );
142
  update_post_meta( $new_notification_id, 'type', sanitize_text_field( trim( $data->type ) ) );
@@ -167,9 +171,9 @@ class AM_Notification {
167
  * @param integer $limit Set the limit for how many posts to retrieve.
168
  * @param array $args Any top-level arguments to add to the array.
169
  *
170
- * @return WP_Post[] WP_Post that match the query.
171
  */
172
- public function get_plugin_notifications( $limit = -1, $args = array() ) {
173
  return get_posts(
174
  array(
175
  'posts_per_page' => $limit,
@@ -184,11 +188,11 @@ class AM_Notification {
184
  * @since 1.0.0
185
  */
186
  public function display_notifications() {
187
- if ( ! current_user_can( apply_filters( 'am_notifications_display', 'manage_options' ) ) ) {
188
  return;
189
  }
190
 
191
- $plugin_notifications = $this->get_plugin_notifications( -1, array(
192
  'post_status' => 'all',
193
  'meta_key' => 'viewed',
194
  'meta_value' => '0',
@@ -201,18 +205,18 @@ class AM_Notification {
201
  $dismissable = get_post_meta( $notification->ID, 'dismissable', true );
202
  $type = get_post_meta( $notification->ID, 'type', true );
203
  ?>
204
- <div class="am-notification am-notification-<?php echo $notification->ID; ?> notice notice-<?php echo $type; ?><?php echo $dismissable ? ' is-dismissible' : ''; ?>">
205
- <?php echo $notification->post_content; ?>
206
  </div>
207
  <script type="text/javascript">
208
- jQuery(document).ready(function ($) {
209
- $(document).on('click', '.am-notification-<?php echo $notification->ID; ?> button.notice-dismiss', function (event) {
210
- $.post(ajaxurl, {
211
  action: 'am_notification_dismiss',
212
- notification_id: '<?php echo $notification->ID; ?>'
213
- });
214
- });
215
- });
216
  </script>
217
  <?php
218
  }
@@ -327,11 +331,11 @@ class AM_Notification {
327
  */
328
  public function get_plan_level() {
329
  // Prepare variables.
330
- $key = '';
331
- $level = '';
332
- $option = false;
333
  switch ( $this->plugin ) {
334
- case 'wpforms' :
335
  $option = get_option( 'wpforms_license' );
336
  $key = is_array( $option ) && isset( $option['key'] ) ? $option['key'] : '';
337
  $level = is_array( $option ) && isset( $option['type'] ) ? $option['type'] : '';
@@ -341,37 +345,33 @@ class AM_Notification {
341
  $key = WPFORMS_LICENSE_KEY;
342
  }
343
  break;
344
- case 'mi' :
345
- $option = get_option( 'monsterinsights_license' );
346
- $key = is_array( $option ) && isset( $option['key'] ) ? $option['key'] : '';
347
- $level = is_array( $option ) && isset( $option['type'] ) ? $option['type'] : '';
348
-
349
- // Possibly check for a constant.
350
- if ( empty( $key ) && defined( 'MONSTERINSIGHTS_LICENSE_KEY' ) && is_string( MONSTERINSIGHTS_LICENSE_KEY ) && strlen( MONSTERINSIGHTS_LICENSE_KEY ) > 10 ) {
351
- $key = MONSTERINSIGHTS_LICENSE_KEY;
352
- }
353
- break;
354
- case 'sol' :
355
- $option = get_option( 'soliloquy' );
356
- $key = is_array( $option ) && isset( $option['key'] ) ? $option['key'] : '';
357
- $level = is_array( $option ) && isset( $option['type'] ) ? $option['type'] : '';
358
-
359
- // Possibly check for a constant.
360
- if ( empty( $key ) && defined( 'SOLILOQUY_LICENSE_KEY' ) ) {
361
- $key = SOLILOQUY_LICENSE_KEY;
362
- }
363
- break;
364
- case 'envira' :
365
- $option = get_option( 'envira_gallery' );
366
- $key = is_array( $option ) && isset( $option['key'] ) ? $option['key'] : '';
367
- $level = is_array( $option ) && isset( $option['type'] ) ? $option['type'] : '';
368
 
369
- // Possibly check for a constant.
370
- if ( empty( $key ) && defined( 'ENVIRA_LICENSE_KEY' ) ) {
371
- $key = ENVIRA_LICENSE_KEY;
 
 
 
 
 
 
 
 
 
 
372
  }
373
  break;
374
- case 'om' :
375
  $option = get_option( 'optin_monster_api' );
376
  $key = is_array( $option ) && isset( $option['api']['apikey'] ) ? $option['api']['apikey'] : '';
377
 
@@ -392,22 +392,27 @@ class AM_Notification {
392
  $level = 'none';
393
  }
394
 
 
 
 
 
 
395
  // Normalize the level.
396
  switch ( $level ) {
397
- case 'bronze' :
398
- case 'personal' :
399
  $level = 'basic';
400
  break;
401
- case 'silver' :
402
- case 'multi' :
403
  $level = 'plus';
404
  break;
405
- case 'gold' :
406
- case 'developer' :
407
  $level = 'pro';
408
  break;
409
- case 'platinum' :
410
- case 'master' :
411
  $level = 'ultimate';
412
  break;
413
  }
@@ -422,7 +427,7 @@ class AM_Notification {
422
  * @since 1.0.0
423
  */
424
  public function dismiss_notification() {
425
- if ( ! current_user_can( apply_filters( 'am_notifications_display', 'manage_options' ) ) ) {
426
  die;
427
  }
428
 
@@ -441,7 +446,7 @@ class AM_Notification {
441
  public function revoke_notifications( $ids ) {
442
  // Loop through each of the IDs and find the post that has it as meta.
443
  foreach ( (array) $ids as $id ) {
444
- $notifications = $this->get_plugin_notifications( -1, array( 'post_status' => 'all', 'meta_key' => 'notification_id', 'meta_value' => $id ) );
445
  if ( $notifications ) {
446
  foreach ( $notifications as $notification ) {
447
  update_post_meta( $notification->ID, 'viewed', 1 );
9
  * retrieve notifications for this product.
10
  *
11
  * @package AwesomeMotive
12
+ * @author AwesomeMotive Team
13
  * @license GPL-2.0+
14
+ * @copyright Copyright (c) 2018, Awesome Motive LLC
15
+ * @version 1.0.7
16
  */
17
  class AM_Notification {
18
+
19
  /**
20
  * The api url we are calling.
21
  *
78
  */
79
  public function custom_post_type() {
80
  register_post_type( 'amn_' . $this->plugin, array(
81
+ 'label' => $this->plugin . ' Announcements',
82
+ 'can_export' => false,
83
+ 'supports' => false,
84
+ 'capability_type' => 'manage_options',
85
  ) );
86
  }
87
 
91
  * @since 1.0.0
92
  */
93
  public function get_remote_notifications() {
94
+ if ( ! apply_filters( 'am_notifications_display', is_super_admin() ) ) {
95
  return;
96
  }
97
 
135
  }
136
 
137
  if ( empty( $notifications ) ) {
138
+ $new_notification_id = wp_insert_post(
139
+ array(
140
+ 'post_content' => wp_kses_post( $data->content ),
141
+ 'post_type' => 'amn_' . $this->plugin,
142
+ )
143
+ );
144
 
145
  update_post_meta( $new_notification_id, 'notification_id', absint( $data->id ) );
146
  update_post_meta( $new_notification_id, 'type', sanitize_text_field( trim( $data->type ) ) );
171
  * @param integer $limit Set the limit for how many posts to retrieve.
172
  * @param array $args Any top-level arguments to add to the array.
173
  *
174
+ * @return \WP_Post[] WP_Post that match the query.
175
  */
176
+ public function get_plugin_notifications( $limit = - 1, $args = array() ) {
177
  return get_posts(
178
  array(
179
  'posts_per_page' => $limit,
188
  * @since 1.0.0
189
  */
190
  public function display_notifications() {
191
+ if ( ! apply_filters( 'am_notifications_display', is_super_admin() ) ) {
192
  return;
193
  }
194
 
195
+ $plugin_notifications = $this->get_plugin_notifications( - 1, array(
196
  'post_status' => 'all',
197
  'meta_key' => 'viewed',
198
  'meta_value' => '0',
205
  $dismissable = get_post_meta( $notification->ID, 'dismissable', true );
206
  $type = get_post_meta( $notification->ID, 'type', true );
207
  ?>
208
+ <div class="am-notification am-notification-<?php echo absint( $notification->ID ); ?> notice notice-<?php echo esc_attr( $type ); ?><?php echo $dismissable ? ' is-dismissible' : ''; ?>">
209
+ <?php echo wp_kses_post( $notification->post_content ); ?>
210
  </div>
211
  <script type="text/javascript">
212
+ jQuery( document ).ready( function ( $ ) {
213
+ $( document ).on( 'click', '.am-notification-<?php echo absint( $notification->ID ); ?> button.notice-dismiss', function ( event ) {
214
+ $.post( ajaxurl, {
215
  action: 'am_notification_dismiss',
216
+ notification_id: '<?php echo absint( $notification->ID ); ?>'
217
+ } );
218
+ } );
219
+ } );
220
  </script>
221
  <?php
222
  }
331
  */
332
  public function get_plan_level() {
333
  // Prepare variables.
334
+ $key = '';
335
+ $level = '';
336
+
337
  switch ( $this->plugin ) {
338
+ case 'wpforms':
339
  $option = get_option( 'wpforms_license' );
340
  $key = is_array( $option ) && isset( $option['key'] ) ? $option['key'] : '';
341
  $level = is_array( $option ) && isset( $option['type'] ) ? $option['type'] : '';
345
  $key = WPFORMS_LICENSE_KEY;
346
  }
347
  break;
348
+ case 'mi-lite':
349
+ case 'mi':
350
+ if ( defined( 'MONSTERINSIGHTS_VERSION' ) && version_compare( MONSTERINSIGHTS_VERSION, '6.9.0', '>=' ) ) {
351
+ if ( \MonsterInsights()->license->get_site_license_type() ) {
352
+ $key = \MonsterInsights()->license->get_site_license_key();
353
+ $type = \MonsterInsights()->license->get_site_license_type();
354
+ } else if ( \MonsterInsights()->license->get_network_license_type() ) {
355
+ $key = \MonsterInsights()->license->get_network_license_key();
356
+ $type = \MonsterInsights()->license->get_network_license_type();
357
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
358
 
359
+ // Check key fallbacks.
360
+ if ( empty( $key ) ) {
361
+ $key = \MonsterInsights()->license->get_license_key();
362
+ }
363
+ } else {
364
+ $option = get_option( 'monsterinsights_license' );
365
+ $key = is_array( $option ) && isset( $option['key'] ) ? $option['key'] : '';
366
+ $level = is_array( $option ) && isset( $option['type'] ) ? $option['type'] : '';
367
+
368
+ // Possibly check for a constant.
369
+ if ( empty( $key ) && defined( 'MONSTERINSIGHTS_LICENSE_KEY' ) && is_string( MONSTERINSIGHTS_LICENSE_KEY ) && strlen( MONSTERINSIGHTS_LICENSE_KEY ) > 10 ) {
370
+ $key = MONSTERINSIGHTS_LICENSE_KEY;
371
+ }
372
  }
373
  break;
374
+ case 'om':
375
  $option = get_option( 'optin_monster_api' );
376
  $key = is_array( $option ) && isset( $option['api']['apikey'] ) ? $option['api']['apikey'] : '';
377
 
392
  $level = 'none';
393
  }
394
 
395
+ // Possibly set the level to 'unknown' if a key is entered, but no level can be determined (such as manually entered key).
396
+ if ( ! empty( $key ) && empty( $level ) ) {
397
+ $level = 'unknown';
398
+ }
399
+
400
  // Normalize the level.
401
  switch ( $level ) {
402
+ case 'bronze':
403
+ case 'personal':
404
  $level = 'basic';
405
  break;
406
+ case 'silver':
407
+ case 'multi':
408
  $level = 'plus';
409
  break;
410
+ case 'gold':
411
+ case 'developer':
412
  $level = 'pro';
413
  break;
414
+ case 'platinum':
415
+ case 'master':
416
  $level = 'ultimate';
417
  break;
418
  }
427
  * @since 1.0.0
428
  */
429
  public function dismiss_notification() {
430
+ if ( ! apply_filters( 'am_notifications_display', is_super_admin() ) ) {
431
  die;
432
  }
433
 
446
  public function revoke_notifications( $ids ) {
447
  // Loop through each of the IDs and find the post that has it as meta.
448
  foreach ( (array) $ids as $id ) {
449
+ $notifications = $this->get_plugin_notifications( - 1, array( 'post_status' => 'all', 'meta_key' => 'notification_id', 'meta_value' => $id ) );
450
  if ( $notifications ) {
451
  foreach ( $notifications as $notification ) {
452
  update_post_meta( $notification->ID, 'viewed', 1 );
src/Admin/Area.php CHANGED
@@ -134,8 +134,11 @@ class Area {
134
  return;
135
  }
136
 
 
 
 
137
  // Check if the current settings are the same as the default settings.
138
- if ( wp_json_encode( Options::init()->get_all() ) !== wp_json_encode( Options::get_defaults() ) ) {
139
  return;
140
  }
141
 
134
  return;
135
  }
136
 
137
+ $default_options = function_exists( 'wp_json_encode' ) ? wp_json_encode( Options::get_defaults() ) : json_encode( Options::get_defaults() ); // phpcs:ignore
138
+ $current_options = function_exists( 'wp_json_encode' ) ? wp_json_encode( Options::init()->get_all() ) : json_encode( Options::init()->get_all() ); // phpcs:ignore
139
+
140
  // Check if the current settings are the same as the default settings.
141
+ if ( $current_options !== $default_options ) {
142
  return;
143
  }
144
 
src/Admin/Pages/Misc.php CHANGED
@@ -49,30 +49,72 @@ class Misc extends PageAbstract {
49
  </div>
50
  </div>
51
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
  <!-- Hide Announcements -->
53
  <div id="wp-mail-smtp-setting-row-am_notifications_hidden" class="wp-mail-smtp-setting-row wp-mail-smtp-setting-row-checkbox wp-mail-smtp-clear">
54
  <div class="wp-mail-smtp-setting-label">
55
- <label for="wp-mail-smtp-setting-am_notifications_hidden"><?php esc_html_e( 'Hide Announcements', 'wp-mail-smtp' ); ?></label>
 
 
56
  </div>
57
  <div class="wp-mail-smtp-setting-field">
58
  <input name="wp-mail-smtp[general][am_notifications_hidden]" type="checkbox"
59
  value="true" <?php checked( true, $options->get( 'general', 'am_notifications_hidden' ) ); ?>
60
  id="wp-mail-smtp-setting-am_notifications_hidden"
61
  >
62
- <label for="wp-mail-smtp-setting-am_notifications_hidden"><?php esc_html_e( 'Check this if you would like to hide plugin announcements and update details.', 'wp-mail-smtp' ); ?></label>
 
 
63
  </div>
64
  </div>
65
 
66
  <!-- Uninstall -->
67
  <div id="wp-mail-smtp-setting-row-uninstall" class="wp-mail-smtp-setting-row wp-mail-smtp-setting-row-checkbox wp-mail-smtp-clear">
68
  <div class="wp-mail-smtp-setting-label">
69
- <label for="wp-mail-smtp-setting-uninstall"><?php esc_html_e( 'Uninstall WP Mail SMTP', 'wp-mail-smtp' ); ?></label>
 
 
70
  </div>
71
  <div class="wp-mail-smtp-setting-field">
72
  <input name="wp-mail-smtp[general][uninstall]" type="checkbox"
73
  value="true" <?php checked( true, $options->get( 'general', 'uninstall' ) ); ?>
74
  id="wp-mail-smtp-setting-uninstall">
75
- <label for="wp-mail-smtp-setting-uninstall"><?php esc_html_e( 'Check this if you would like to remove ALL WP Mail SMTP data upon plugin deletion. All settings will be unrecoverable.', 'wp-mail-smtp' ); ?></label>
 
 
76
  </div>
77
  </div>
78
 
49
  </div>
50
  </div>
51
 
52
+ <!-- Do not send -->
53
+ <div id="wp-mail-smtp-setting-row-do_not_send" class="wp-mail-smtp-setting-row wp-mail-smtp-setting-row-checkbox wp-mail-smtp-clear">
54
+ <div class="wp-mail-smtp-setting-label">
55
+ <label for="wp-mail-smtp-setting-do_not_send">
56
+ <?php esc_html_e( 'Do Not Send', 'wp-mail-smtp' ); ?>
57
+ </label>
58
+ </div>
59
+ <div class="wp-mail-smtp-setting-field">
60
+ <input name="wp-mail-smtp[general][do_not_send]" type="checkbox"
61
+ value="true" <?php checked( true, $options->get( 'general', 'do_not_send' ) ); ?>
62
+ id="wp-mail-smtp-setting-do_not_send"
63
+ >
64
+ <label for="wp-mail-smtp-setting-do_not_send">
65
+ <?php esc_html_e( 'Check this if you would like to stop sending all emails.', 'wp-mail-smtp' ); ?>
66
+ </label>
67
+ <p class="desc">
68
+ <?php
69
+ printf(
70
+ wp_kses(
71
+ __( 'Some plugins, like BuddyPress and Events Manager, are using own email delivery solutions. By default, this option does not block their emails, as those plugins do not use default <code>wp_mail()</code> function to send emails.', 'wp-mail-smtp' ),
72
+ array(
73
+ 'code' => array(),
74
+ )
75
+ )
76
+ );
77
+ ?>
78
+ <br>
79
+ <?php esc_html_e( 'You will need to consult with their documentation to switch them to use default WordPress email delivery.', 'wp-mail-smtp' ); ?>
80
+ <br>
81
+ <?php esc_html_e( 'Test emails are allowed to be sent, regardless of this option.', 'wp-mail-smtp' ); ?>
82
+ </p>
83
+ </div>
84
+ </div>
85
+
86
  <!-- Hide Announcements -->
87
  <div id="wp-mail-smtp-setting-row-am_notifications_hidden" class="wp-mail-smtp-setting-row wp-mail-smtp-setting-row-checkbox wp-mail-smtp-clear">
88
  <div class="wp-mail-smtp-setting-label">
89
+ <label for="wp-mail-smtp-setting-am_notifications_hidden">
90
+ <?php esc_html_e( 'Hide Announcements', 'wp-mail-smtp' ); ?>
91
+ </label>
92
  </div>
93
  <div class="wp-mail-smtp-setting-field">
94
  <input name="wp-mail-smtp[general][am_notifications_hidden]" type="checkbox"
95
  value="true" <?php checked( true, $options->get( 'general', 'am_notifications_hidden' ) ); ?>
96
  id="wp-mail-smtp-setting-am_notifications_hidden"
97
  >
98
+ <label for="wp-mail-smtp-setting-am_notifications_hidden">
99
+ <?php esc_html_e( 'Check this if you would like to hide plugin announcements and update details.', 'wp-mail-smtp' ); ?>
100
+ </label>
101
  </div>
102
  </div>
103
 
104
  <!-- Uninstall -->
105
  <div id="wp-mail-smtp-setting-row-uninstall" class="wp-mail-smtp-setting-row wp-mail-smtp-setting-row-checkbox wp-mail-smtp-clear">
106
  <div class="wp-mail-smtp-setting-label">
107
+ <label for="wp-mail-smtp-setting-uninstall">
108
+ <?php esc_html_e( 'Uninstall WP Mail SMTP', 'wp-mail-smtp' ); ?>
109
+ </label>
110
  </div>
111
  <div class="wp-mail-smtp-setting-field">
112
  <input name="wp-mail-smtp[general][uninstall]" type="checkbox"
113
  value="true" <?php checked( true, $options->get( 'general', 'uninstall' ) ); ?>
114
  id="wp-mail-smtp-setting-uninstall">
115
+ <label for="wp-mail-smtp-setting-uninstall">
116
+ <?php esc_html_e( 'Check this if you would like to remove ALL WP Mail SMTP data upon plugin deletion. All settings will be unrecoverable.', 'wp-mail-smtp' ); ?>
117
+ </label>
118
  </div>
119
  </div>
120
 
src/Admin/Pages/Settings.php CHANGED
@@ -38,8 +38,9 @@ class Settings extends PageAbstract {
38
  */
39
  public function display() {
40
 
41
- $options = new Options();
42
- $mailer = $options->get( 'mail', 'mailer' );
 
43
  ?>
44
 
45
  <form method="POST" action="" autocomplete="off">
@@ -60,33 +61,45 @@ class Settings extends PageAbstract {
60
  <div class="wp-mail-smtp-setting-field">
61
  <input name="wp-mail-smtp[mail][from_email]" type="email"
62
  value="<?php echo esc_attr( $options->get( 'mail', 'from_email' ) ); ?>"
63
- <?php echo $options->is_const_defined( 'mail', 'from_email' ) ? 'disabled' : ''; ?>
64
  id="wp-mail-smtp-setting-from_email" spellcheck="false"
65
  placeholder="<?php echo esc_attr( wp_mail_smtp()->get_processor()->get_default_email() ); ?>">
66
 
67
- <p class="desc">
68
- <?php esc_html_e( 'The email address which emails are sent from.', 'wp-mail-smtp' ); ?><br/>
69
- <?php esc_html_e( 'If you using an email provider (Gmail, Yahoo, Outlook.com, etc) this should be your email address for that account.', 'wp-mail-smtp' ); ?>
70
- </p>
71
-
72
- <p class="desc">
73
- <?php esc_html_e( 'Please note that other plugins can change this, to prevent this use the setting below.', 'wp-mail-smtp' ); ?>
74
- </p>
 
 
 
 
 
75
 
76
  <hr class="wp-mail-smtp-setting-mid-row-sep">
77
 
78
  <input name="wp-mail-smtp[mail][from_email_force]" type="checkbox"
79
  value="true" <?php checked( true, (bool) $options->get( 'mail', 'from_email_force' ) ); ?>
80
- <?php echo $options->is_const_defined( 'mail', 'from_email_force' ) ? 'disabled' : ''; ?>
81
  id="wp-mail-smtp-setting-from_email_force">
82
 
83
  <label for="wp-mail-smtp-setting-from_email_force">
84
  <?php esc_html_e( 'Force From Email', 'wp-mail-smtp' ); ?>
85
  </label>
86
 
87
- <p class="desc">
88
- <?php esc_html_e( 'If checked, the From Email setting above will be used for all emails, ignoring values set by other plugins.', 'wp-mail-smtp' ); ?>
89
- </p>
 
 
 
 
 
 
 
90
  </div>
91
  </div>
92
 
@@ -98,28 +111,40 @@ class Settings extends PageAbstract {
98
  <div class="wp-mail-smtp-setting-field">
99
  <input name="wp-mail-smtp[mail][from_name]" type="text"
100
  value="<?php echo esc_attr( $options->get( 'mail', 'from_name' ) ); ?>"
101
- <?php echo $options->is_const_defined( 'mail', 'from_name' ) ? 'disabled' : ''; ?>
102
  id="wp-mail-smtp-setting-from_name" spellcheck="false"
103
  placeholder="<?php echo esc_attr( wp_mail_smtp()->get_processor()->get_default_name() ); ?>">
104
 
105
- <p class="desc">
106
- <?php esc_html_e( 'The name which emails are sent from.', 'wp-mail-smtp' ); ?>
107
- </p>
 
 
 
 
 
 
108
 
109
  <hr class="wp-mail-smtp-setting-mid-row-sep">
110
 
111
  <input name="wp-mail-smtp[mail][from_name_force]" type="checkbox"
112
  value="true" <?php checked( true, (bool) $options->get( 'mail', 'from_name_force' ) ); ?>
113
- <?php echo $options->is_const_defined( 'mail', 'from_name_force' ) ? 'disabled' : ''; ?>
114
  id="wp-mail-smtp-setting-from_name_force">
115
 
116
  <label for="wp-mail-smtp-setting-from_name_force">
117
  <?php esc_html_e( 'Force From Name', 'wp-mail-smtp' ); ?>
118
  </label>
119
 
120
- <p class="desc">
121
- <?php esc_html_e( 'If checked, the From Name setting above will be used for all emails, ignoring values set by other plugins.', 'wp-mail-smtp' ); ?>
122
- </p>
 
 
 
 
 
 
123
  </div>
124
  </div>
125
 
@@ -146,7 +171,9 @@ class Settings extends PageAbstract {
146
  <?php checked( $provider->get_slug(), $mailer ); ?>
147
  <?php echo $options->is_const_defined( 'mail', 'mailer' ) ? 'disabled' : ''; ?>
148
  />
149
- <label for="wp-mail-smtp-setting-mailer-<?php echo esc_attr( $provider->get_slug() ); ?>"><?php echo $provider->get_title(); ?></label>
 
 
150
  </div>
151
  </div>
152
 
@@ -164,17 +191,23 @@ class Settings extends PageAbstract {
164
  <div class="wp-mail-smtp-setting-field">
165
  <input name="wp-mail-smtp[mail][return_path]" type="checkbox"
166
  value="true" <?php checked( true, (bool) $options->get( 'mail', 'return_path' ) ); ?>
167
- <?php echo $options->is_const_defined( 'mail', 'return_path' ) ? 'disabled' : ''; ?>
168
  id="wp-mail-smtp-setting-return_path">
169
 
170
  <label for="wp-mail-smtp-setting-return_path">
171
  <?php esc_html_e( 'Set the return-path to match the From Email', 'wp-mail-smtp' ); ?>
172
  </label>
173
 
174
- <p class="desc">
175
- <?php esc_html_e( 'Return Path indicates where non-delivery receipts - or bounce messages - are to be sent.', 'wp-mail-smtp' ); ?><br/>
176
- <?php esc_html_e( 'If unchecked bounce messages may be lost.', 'wp-mail-smtp' ); ?>
177
- </p>
 
 
 
 
 
 
178
  </div>
179
  </div>
180
 
@@ -216,9 +249,15 @@ class Settings extends PageAbstract {
216
  * Display a WPForms-related message.
217
  *
218
  * @since 1.3.0
 
219
  */
220
  protected function display_wpforms() {
221
 
 
 
 
 
 
222
  // Do not display if WPForms Pro already installed.
223
  if ( class_exists( 'WPForms_Pro', false ) ) {
224
  return;
@@ -348,7 +387,11 @@ class Settings extends PageAbstract {
348
  }
349
 
350
  // Remove all debug messages when switching mailers.
351
- if ( $old_opt['mail']['mailer'] !== $data['mail']['mailer'] ) {
 
 
 
 
352
  Debug::clear();
353
  }
354
 
38
  */
39
  public function display() {
40
 
41
+ $options = new Options();
42
+ $mailer = $options->get( 'mail', 'mailer' );
43
+ $disabled = 'gmail' === $mailer ? 'disabled' : '';
44
  ?>
45
 
46
  <form method="POST" action="" autocomplete="off">
61
  <div class="wp-mail-smtp-setting-field">
62
  <input name="wp-mail-smtp[mail][from_email]" type="email"
63
  value="<?php echo esc_attr( $options->get( 'mail', 'from_email' ) ); ?>"
64
+ <?php echo $options->is_const_defined( 'mail', 'from_email' ) || ! empty( $disabled ) ? 'disabled' : ''; ?>
65
  id="wp-mail-smtp-setting-from_email" spellcheck="false"
66
  placeholder="<?php echo esc_attr( wp_mail_smtp()->get_processor()->get_default_email() ); ?>">
67
 
68
+ <?php if ( ! empty( $disabled ) ) : ?>
69
+ <p class="desc">
70
+ <?php esc_html_e( 'Gmail doesn\'t allow to override From Email. Emails will be sent using the email address you used to setup the connection.', 'wp-mail-smtp' ); ?>
71
+ </p>
72
+ <?php else : ?>
73
+ <p class="desc">
74
+ <?php esc_html_e( 'The email address which emails are sent from.', 'wp-mail-smtp' ); ?><br/>
75
+ <?php esc_html_e( 'If you using an email provider (Gmail, Yahoo, Outlook.com, etc) this should be your email address for that account.', 'wp-mail-smtp' ); ?>
76
+ </p>
77
+ <p class="desc">
78
+ <?php esc_html_e( 'Please note that other plugins can change this, to prevent this use the setting below.', 'wp-mail-smtp' ); ?>
79
+ </p>
80
+ <?php endif; ?>
81
 
82
  <hr class="wp-mail-smtp-setting-mid-row-sep">
83
 
84
  <input name="wp-mail-smtp[mail][from_email_force]" type="checkbox"
85
  value="true" <?php checked( true, (bool) $options->get( 'mail', 'from_email_force' ) ); ?>
86
+ <?php echo $options->is_const_defined( 'mail', 'from_email_force' ) || ! empty( $disabled ) ? 'disabled' : ''; ?>
87
  id="wp-mail-smtp-setting-from_email_force">
88
 
89
  <label for="wp-mail-smtp-setting-from_email_force">
90
  <?php esc_html_e( 'Force From Email', 'wp-mail-smtp' ); ?>
91
  </label>
92
 
93
+ <?php if ( ! empty( $disabled ) ) : ?>
94
+ <p class="desc">
95
+ <?php esc_html_e( 'Gmail doesn\'t allow to override From Email. Emails will be sent using the email address you used to setup the connection.', 'wp-mail-smtp' ); ?>
96
+ </p>
97
+ <?php else : ?>
98
+ <p class="desc">
99
+ <?php esc_html_e( 'If checked, the From Email setting above will be used for all emails, ignoring values set by other plugins.', 'wp-mail-smtp' ); ?>
100
+ </p>
101
+ <?php endif; ?>
102
+
103
  </div>
104
  </div>
105
 
111
  <div class="wp-mail-smtp-setting-field">
112
  <input name="wp-mail-smtp[mail][from_name]" type="text"
113
  value="<?php echo esc_attr( $options->get( 'mail', 'from_name' ) ); ?>"
114
+ <?php echo $options->is_const_defined( 'mail', 'from_name' ) || ! empty( $disabled ) ? 'disabled' : ''; ?>
115
  id="wp-mail-smtp-setting-from_name" spellcheck="false"
116
  placeholder="<?php echo esc_attr( wp_mail_smtp()->get_processor()->get_default_name() ); ?>">
117
 
118
+ <?php if ( ! empty( $disabled ) ) : ?>
119
+ <p class="desc">
120
+ <?php esc_html_e( 'Gmail doesn\'t allow to override From Name. Emails will not have From Name defined at all.', 'wp-mail-smtp' ); ?>
121
+ </p>
122
+ <?php else : ?>
123
+ <p class="desc">
124
+ <?php esc_html_e( 'The name which emails are sent from.', 'wp-mail-smtp' ); ?>
125
+ </p>
126
+ <?php endif; ?>
127
 
128
  <hr class="wp-mail-smtp-setting-mid-row-sep">
129
 
130
  <input name="wp-mail-smtp[mail][from_name_force]" type="checkbox"
131
  value="true" <?php checked( true, (bool) $options->get( 'mail', 'from_name_force' ) ); ?>
132
+ <?php echo $options->is_const_defined( 'mail', 'from_name_force' ) || ! empty( $disabled ) ? 'disabled' : ''; ?>
133
  id="wp-mail-smtp-setting-from_name_force">
134
 
135
  <label for="wp-mail-smtp-setting-from_name_force">
136
  <?php esc_html_e( 'Force From Name', 'wp-mail-smtp' ); ?>
137
  </label>
138
 
139
+ <?php if ( ! empty( $disabled ) ) : ?>
140
+ <p class="desc">
141
+ <?php esc_html_e( 'Gmail doesn\'t allow to override From Name. Emails will not have From Name defined at all.', 'wp-mail-smtp' ); ?>
142
+ </p>
143
+ <?php else : ?>
144
+ <p class="desc">
145
+ <?php esc_html_e( 'If checked, the From Name setting above will be used for all emails, ignoring values set by other plugins.', 'wp-mail-smtp' ); ?>
146
+ </p>
147
+ <?php endif; ?>
148
  </div>
149
  </div>
150
 
171
  <?php checked( $provider->get_slug(), $mailer ); ?>
172
  <?php echo $options->is_const_defined( 'mail', 'mailer' ) ? 'disabled' : ''; ?>
173
  />
174
+ <label for="wp-mail-smtp-setting-mailer-<?php echo esc_attr( $provider->get_slug() ); ?>">
175
+ <?php echo esc_html( $provider->get_title() ); ?>
176
+ </label>
177
  </div>
178
  </div>
179
 
191
  <div class="wp-mail-smtp-setting-field">
192
  <input name="wp-mail-smtp[mail][return_path]" type="checkbox"
193
  value="true" <?php checked( true, (bool) $options->get( 'mail', 'return_path' ) ); ?>
194
+ <?php echo $options->is_const_defined( 'mail', 'return_path' ) || ! empty( $disabled ) ? 'disabled' : ''; ?>
195
  id="wp-mail-smtp-setting-return_path">
196
 
197
  <label for="wp-mail-smtp-setting-return_path">
198
  <?php esc_html_e( 'Set the return-path to match the From Email', 'wp-mail-smtp' ); ?>
199
  </label>
200
 
201
+ <?php if ( ! empty( $disabled ) ) : ?>
202
+ <p class="desc">
203
+ <?php esc_html_e( 'Gmail doesn\'t allow to override Return Path. Emails will be bounced to the same email addresee they were sent from.', 'wp-mail-smtp' ); ?>
204
+ </p>
205
+ <?php else : ?>
206
+ <p class="desc">
207
+ <?php esc_html_e( 'Return Path indicates where non-delivery receipts - or bounce messages - are to be sent.', 'wp-mail-smtp' ); ?><br/>
208
+ <?php esc_html_e( 'If unchecked bounce messages may be lost.', 'wp-mail-smtp' ); ?>
209
+ </p>
210
+ <?php endif; ?>
211
  </div>
212
  </div>
213
 
249
  * Display a WPForms-related message.
250
  *
251
  * @since 1.3.0
252
+ * @since 1.4.0 Display only to site admins.
253
  */
254
  protected function display_wpforms() {
255
 
256
+ // Display only to site admins. Only site admins can install plugins.
257
+ if ( ! is_super_admin() ) {
258
+ return;
259
+ }
260
+
261
  // Do not display if WPForms Pro already installed.
262
  if ( class_exists( 'WPForms_Pro', false ) ) {
263
  return;
387
  }
388
 
389
  // Remove all debug messages when switching mailers.
390
+ if (
391
+ ! empty( $old_opt['mail']['mailer'] ) &&
392
+ ! empty( $data['mail']['mailer'] ) &&
393
+ $old_opt['mail']['mailer'] !== $data['mail']['mailer']
394
+ ) {
395
  Debug::clear();
396
  }
397
 
src/Admin/Pages/Test.php CHANGED
@@ -65,15 +65,49 @@ class Test extends PageAbstract {
65
  <label for="wp-mail-smtp-setting-test_email"><?php esc_html_e( 'Send To', 'wp-mail-smtp' ); ?></label>
66
  </div>
67
  <div class="wp-mail-smtp-setting-field">
68
- <input name="wp-mail-smtp[test_email]" type="email" id="wp-mail-smtp-setting-test_email" spellcheck="false" required>
 
69
  <p class="desc">
70
- <?php esc_html_e( 'Type an email address here and then click a button below to generate a test email.', 'wp-mail-smtp' ); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
71
  </p>
72
  </div>
73
  </div>
74
 
75
  <p class="wp-mail-smtp-submit">
76
- <button type="submit" class="wp-mail-smtp-btn wp-mail-smtp-btn-md wp-mail-smtp-btn-orange"><?php esc_html_e( 'Send Email', 'wp-mail-smtp' ); ?></button>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
77
  </p>
78
  </form>
79
 
@@ -88,11 +122,16 @@ class Test extends PageAbstract {
88
 
89
  $this->check_admin_referer();
90
 
91
- if ( isset( $data['test_email'] ) ) {
92
- $data['test_email'] = filter_var( $data['test_email'], FILTER_VALIDATE_EMAIL );
 
 
 
 
 
93
  }
94
 
95
- if ( empty( $data['test_email'] ) ) {
96
  WP::add_admin_notice(
97
  esc_html__( 'Test failed. Please use a valid email address and try to resend the test email.', 'wp-mail-smtp' ),
98
  WP::ADMIN_NOTICE_WARNING
@@ -100,40 +139,47 @@ class Test extends PageAbstract {
100
  return;
101
  }
102
 
103
- global $phpmailer;
104
-
105
- // Make sure the PHPMailer class has been instantiated.
106
- if ( ! is_object( $phpmailer ) || ! is_a( $phpmailer, 'PHPMailer' ) ) {
107
- require_once ABSPATH . WPINC . '/class-phpmailer.php';
108
- $phpmailer = new MailCatcher( true );
109
- }
110
 
111
  // Set SMTPDebug level, default is 3 (commands + data + connection status).
112
  $phpmailer->SMTPDebug = apply_filters( 'wp_mail_smtp_admin_test_email_smtp_debug', 3 );
113
 
 
 
 
 
114
  // Start output buffering to grab smtp debugging output.
115
  ob_start();
116
 
117
  // Send the test mail.
118
  $result = wp_mail(
119
- $data['test_email'],
120
  /* translators: %s - email address a test email will be sent to. */
121
- 'WP Mail SMTP: ' . sprintf( esc_html__( 'Test email to %s', 'wp-mail-smtp' ), $data['test_email'] ),
122
- sprintf(
123
- /* translators: %s - mailer name. */
124
- esc_html__( 'This email was sent by %s mailer, and generated by the WP Mail SMTP WordPress plugin.', 'wp-mail-smtp' ),
125
- wp_mail_smtp()->get_providers()->get_options( Options::init()->get( 'mail', 'mailer' ) )->get_title()
126
- )
127
  );
128
 
129
  $smtp_debug = ob_get_clean();
130
 
 
 
 
 
131
  /*
132
  * Notify a user about the results.
133
  */
134
  if ( $result ) {
 
 
 
 
 
 
 
 
135
  WP::add_admin_notice(
136
- esc_html__( 'Your email was sent successfully!', 'wp-mail-smtp' ),
137
  WP::ADMIN_NOTICE_SUCCESS
138
  );
139
  } else {
@@ -144,6 +190,240 @@ class Test extends PageAbstract {
144
  }
145
  }
146
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
147
  /**
148
  * Prepare debug information, that will help users to identify the error.
149
  *
@@ -198,8 +478,8 @@ class Test extends PageAbstract {
198
  }
199
 
200
  /*
201
- * SMTP Debug.
202
- */
203
 
204
  $smtp_text = '';
205
  if ( $options->is_mailer_smtp() ) {
@@ -211,12 +491,15 @@ class Test extends PageAbstract {
211
  }
212
  }
213
 
214
- $errors = apply_filters( 'wp_mail_smtp_admin_test_get_debug_messages', array(
215
- $versions_text,
216
- $mailer_text,
217
- $debug_text,
218
- $smtp_text,
219
- ) );
 
 
 
220
 
221
  return '<pre>' . implode( '<br>', array_filter( $errors ) ) . '</pre>';
222
  }
@@ -737,16 +1020,16 @@ class Test extends PageAbstract {
737
  <h2><?php esc_html_e( 'Recommended next steps:', 'wp-mail-smtp' ); ?></h2>
738
 
739
  <ol>
740
- <?php
741
- foreach ( $debug['steps'] as $step ) {
742
- echo '<li>' . $step . '</li>';
743
- }
744
- ?>
745
  </ol>
746
 
747
  <h2><?php esc_html_e( 'Need support?', 'wp-mail-smtp' ); ?></h2>
748
 
749
- <?php if ( class_exists( 'WPForms_Pro' ) ) : ?>
750
 
751
  <p>
752
  <?php
65
  <label for="wp-mail-smtp-setting-test_email"><?php esc_html_e( 'Send To', 'wp-mail-smtp' ); ?></label>
66
  </div>
67
  <div class="wp-mail-smtp-setting-field">
68
+ <input name="wp-mail-smtp[test][email]" value="<?php echo esc_attr( wp_get_current_user()->user_email ); ?>"
69
+ type="email" id="wp-mail-smtp-setting-test_email" spellcheck="false" required>
70
  <p class="desc">
71
+ <?php esc_html_e( 'Change an email address a test email will be sent to.', 'wp-mail-smtp' ); ?>
72
+ </p>
73
+ </div>
74
+ </div>
75
+
76
+ <!-- HTML/Plain -->
77
+ <div id="wp-mail-smtp-setting-row-test_email_html" class="wp-mail-smtp-setting-row wp-mail-smtp-setting-row-checkbox-toggle wp-mail-smtp-clear">
78
+ <div class="wp-mail-smtp-setting-label">
79
+ <label for="wp-mail-smtp-setting-test_email_html"><?php esc_html_e( 'HTML', 'wp-mail-smtp' ); ?></label>
80
+ </div>
81
+ <div class="wp-mail-smtp-setting-field">
82
+ <label for="wp-mail-smtp-setting-test_email_html">
83
+ <input type="checkbox" id="wp-mail-smtp-setting-test_email_html" name="wp-mail-smtp[test][html]" value="yes" checked />
84
+ <span class="wp-mail-smtp-setting-toggle-switch"></span>
85
+ <span class="wp-mail-smtp-setting-toggle-checked-label"><?php esc_html_e( 'On', 'wp-mail-smtp' ); ?></span>
86
+ <span class="wp-mail-smtp-setting-toggle-unchecked-label"><?php esc_html_e( 'Off', 'wp-mail-smtp' ); ?></span>
87
+ </label>
88
+ <p class="desc">
89
+ <?php esc_html_e( 'Send this email in HTML or in plain text format.', 'wp-mail-smtp' ); ?>
90
  </p>
91
  </div>
92
  </div>
93
 
94
  <p class="wp-mail-smtp-submit">
95
+ <?php
96
+ $btn = 'wp-mail-smtp-btn-orange';
97
+ $disabled = '';
98
+ $help_text = '';
99
+
100
+ if ( ! wp_mail_smtp()->get_providers()->get_mailer( Options::init()->get( 'mail', 'mailer' ), $this->get_phpmailer() )->is_mailer_complete() ) {
101
+ $btn = 'wp-mail-smtp-btn-red';
102
+ $disabled = 'disabled';
103
+
104
+ $help_text = '<span class="help-text"><strong>' . esc_html__( 'You cannot send an email. Mailer is not properly configured. Please check your settings.', 'wp-mail-smtp' ) . '</strong></span>';
105
+ }
106
+ ?>
107
+ <button type="submit" class="wp-mail-smtp-btn wp-mail-smtp-btn-md <?php echo esc_attr( $btn ); ?>" <?php echo esc_attr( $disabled ); ?>>
108
+ <?php esc_html_e( 'Send Email', 'wp-mail-smtp' ); ?>
109
+ </button>
110
+ <?php echo $help_text; ?>
111
  </p>
112
  </form>
113
 
122
 
123
  $this->check_admin_referer();
124
 
125
+ if ( ! empty( $data['test']['email'] ) ) {
126
+ $data['test']['email'] = filter_var( $data['test']['email'], FILTER_VALIDATE_EMAIL );
127
+ }
128
+
129
+ $is_html = true;
130
+ if ( empty( $data['test']['html'] ) ) {
131
+ $is_html = false;
132
  }
133
 
134
+ if ( empty( $data['test']['email'] ) ) {
135
  WP::add_admin_notice(
136
  esc_html__( 'Test failed. Please use a valid email address and try to resend the test email.', 'wp-mail-smtp' ),
137
  WP::ADMIN_NOTICE_WARNING
139
  return;
140
  }
141
 
142
+ $phpmailer = $this->get_phpmailer();
 
 
 
 
 
 
143
 
144
  // Set SMTPDebug level, default is 3 (commands + data + connection status).
145
  $phpmailer->SMTPDebug = apply_filters( 'wp_mail_smtp_admin_test_email_smtp_debug', 3 );
146
 
147
+ if ( $is_html ) {
148
+ add_filter( 'wp_mail_content_type', array( __CLASS__, 'set_test_html_content_type' ) );
149
+ }
150
+
151
  // Start output buffering to grab smtp debugging output.
152
  ob_start();
153
 
154
  // Send the test mail.
155
  $result = wp_mail(
156
+ $data['test']['email'],
157
  /* translators: %s - email address a test email will be sent to. */
158
+ 'WP Mail SMTP: ' . sprintf( esc_html__( 'Test email to %s', 'wp-mail-smtp' ), $data['test']['email'] ),
159
+ $this->get_email_message( $is_html ),
160
+ 'X-Mailer-Type:WPMailSMTP\Admin\Test'
 
 
 
161
  );
162
 
163
  $smtp_debug = ob_get_clean();
164
 
165
+ if ( $is_html ) {
166
+ remove_filter( 'wp_mail_content_type', array( __NAMESPACE__, 'set_test_html_content_type' ) );
167
+ }
168
+
169
  /*
170
  * Notify a user about the results.
171
  */
172
  if ( $result ) {
173
+ $result_message = esc_html__( 'Test plain text email was sent successfully!', 'wp-mail-smtp' );
174
+ if ( $is_html ) {
175
+ $result_message = sprintf(
176
+ /* translators: %s - "HTML" in bold. */
177
+ esc_html__( 'Test %s email was sent successfully! Please check your inbox to make sure it is delivered.', 'wp-mail-smtp' ),
178
+ '<strong>HTML</strong>'
179
+ );
180
+ }
181
  WP::add_admin_notice(
182
+ $result_message,
183
  WP::ADMIN_NOTICE_SUCCESS
184
  );
185
  } else {
190
  }
191
  }
192
 
193
+ /**
194
+ * Get the phpmailer.
195
+ *
196
+ * @since 1.4.0
197
+ *
198
+ * @return \WPMailSMTP\MailCatcher
199
+ */
200
+ protected function get_phpmailer() {
201
+
202
+ global $phpmailer;
203
+
204
+ // Make sure the PHPMailer class has been instantiated.
205
+ if ( ! is_object( $phpmailer ) || ! is_a( $phpmailer, 'PHPMailer' ) ) {
206
+ require_once ABSPATH . WPINC . '/class-phpmailer.php';
207
+ $phpmailer = new MailCatcher( true ); // phpcs:ignore
208
+ }
209
+
210
+ return $phpmailer;
211
+ }
212
+
213
+ /**
214
+ * Get the email message that should be sent.
215
+ *
216
+ * @since 1.4.0
217
+ *
218
+ * @param bool $is_html Whether to send an HTML email or plain text.
219
+ *
220
+ * @return string
221
+ */
222
+ private function get_email_message( $is_html = true ) {
223
+
224
+ // Default plain text version of the email.
225
+ $message = $this->get_email_message_text();
226
+
227
+ if ( $is_html ) {
228
+ $message = $this->get_email_message_html();
229
+ }
230
+
231
+ return $message;
232
+ }
233
+
234
+ /**
235
+ * Get the HTML prepared message for test email.
236
+ *
237
+ * @since 1.4.0
238
+ *
239
+ * @return string
240
+ */
241
+ private function get_email_message_html() {
242
+
243
+ ob_start();
244
+ ?>
245
+ <!doctype html>
246
+ <html lang="en">
247
+ <head>
248
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
249
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
250
+ <meta name="viewport" content="width=device-width">
251
+ <title>WP Mail SMTP Test Email</title>
252
+ <style type="text/css">@media only screen and (max-width: 599px) {table.body .container {width: 95% !important;}.header {padding: 15px 15px 12px 15px !important;}.header img {width: 200px !important;height: auto !important;}.content, .aside {padding: 30px 40px 20px 40px !important;}}</style>
253
+ </head>
254
+ <body style="height: 100% !important; width: 100% !important; min-width: 100%; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; -webkit-font-smoothing: antialiased !important; -moz-osx-font-smoothing: grayscale !important; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; color: #444; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-weight: normal; padding: 0; margin: 0; Margin: 0; font-size: 14px; mso-line-height-rule: exactly; line-height: 140%; background-color: #f1f1f1; text-align: center;">
255
+ <table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%" class="body" style="border-collapse: collapse; border-spacing: 0; vertical-align: top; mso-table-lspace: 0pt; mso-table-rspace: 0pt; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; height: 100% !important; width: 100% !important; min-width: 100%; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; -webkit-font-smoothing: antialiased !important; -moz-osx-font-smoothing: grayscale !important; background-color: #f1f1f1; color: #444; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-weight: normal; padding: 0; margin: 0; Margin: 0; text-align: left; font-size: 14px; mso-line-height-rule: exactly; line-height: 140%;">
256
+ <tr style="padding: 0; vertical-align: top; text-align: left;">
257
+ <td align="center" valign="top" class="body-inner wp-mail-smtp" style="word-wrap: break-word; -webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; border-collapse: collapse !important; vertical-align: top; mso-table-lspace: 0pt; mso-table-rspace: 0pt; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; color: #444; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-weight: normal; padding: 0; margin: 0; Margin: 0; font-size: 14px; mso-line-height-rule: exactly; line-height: 140%; text-align: center;">
258
+ <!-- Container -->
259
+ <table border="0" cellpadding="0" cellspacing="0" class="container" style="border-collapse: collapse; border-spacing: 0; padding: 0; vertical-align: top; mso-table-lspace: 0pt; mso-table-rspace: 0pt; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; width: 600px; margin: 0 auto 0 auto; Margin: 0 auto 0 auto; text-align: inherit;">
260
+ <!-- Header -->
261
+ <tr style="padding: 0; vertical-align: top; text-align: left;">
262
+ <td align="center" valign="middle" class="header" style="word-wrap: break-word; -webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; border-collapse: collapse !important; vertical-align: top; mso-table-lspace: 0pt; mso-table-rspace: 0pt; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; color: #444; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-weight: normal; margin: 0; Margin: 0; font-size: 14px; mso-line-height-rule: exactly; line-height: 140%; text-align: center; padding: 30px 30px 22px 30px;">
263
+ <img src="<?php echo esc_url( wp_mail_smtp()->plugin_url . '/assets/images/email/wp-mail-smtp.png' ); ?>" width="250" alt="WP Mail SMTP Logo" style="outline: none; text-decoration: none; max-width: 100%; clear: both; -ms-interpolation-mode: bicubic; display: inline-block !important; width: 250px;">
264
+ </td>
265
+ </tr>
266
+ <!-- Content -->
267
+ <tr style="padding: 0; vertical-align: top; text-align: left;">
268
+ <td align="left" valign="top" class="content" style="word-wrap: break-word; -webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; border-collapse: collapse !important; vertical-align: top; mso-table-lspace: 0pt; mso-table-rspace: 0pt; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; color: #444; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-weight: normal; margin: 0; Margin: 0; text-align: left; font-size: 14px; mso-line-height-rule: exactly; line-height: 140%; background-color: #ffffff; padding: 60px 75px 45px 75px; border-right: 1px solid #ddd; border-bottom: 1px solid #ddd; border-left: 1px solid #ddd; border-top: 3px solid #809eb0;">
269
+ <div class="success" style="text-align: center;">
270
+ <p class="check" style="-ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; color: #444; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-weight: normal; padding: 0; font-size: 14px; mso-line-height-rule: exactly; line-height: 140%; margin: 0 auto 16px auto; Margin: 0 auto 16px auto; text-align: center;">
271
+ <img src="<?php echo esc_url( wp_mail_smtp()->plugin_url . '/assets/images/email/icon-check.png' ); ?>" width="70" alt="Success" style="outline: none; text-decoration: none; max-width: 100%; clear: both; -ms-interpolation-mode: bicubic; display: block; margin: 0 auto 0 auto; Margin: 0 auto 0 auto; width: 50px;">
272
+ </p>
273
+ <p class="text-extra-large text-center congrats" style="-ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; color: #444; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-weight: normal; padding: 0; mso-line-height-rule: exactly; line-height: 140%; font-size: 20px; text-align: center; margin: 0 0 20px 0; Margin: 0 0 20px 0;">
274
+ Congrats, test email was sent successfully!
275
+ </p>
276
+ <p class="text-large" style="-ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; color: #444; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-weight: normal; padding: 0; text-align: left; mso-line-height-rule: exactly; line-height: 140%; margin: 0 0 15px 0; Margin: 0 0 15px 0; font-size: 16px;">
277
+ Thank you for trying out WP Mail SMTP. We're on a mission to make sure that your emails actually get delivered.
278
+ </p>
279
+ <?php if ( ! class_exists( 'WPForms_Pro', false ) ) : ?>
280
+ <p class="text-large" style="-ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; color: #444; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-weight: normal; padding: 0; text-align: left; mso-line-height-rule: exactly; line-height: 140%; margin: 0 0 15px 0; Margin: 0 0 15px 0; font-size: 16px;">
281
+ If you find this free plugin useful, please consider giving our sister plugin a try!
282
+ </p>
283
+ <?php endif; ?>
284
+ <p class="signature" style="-ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; color: #444; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-weight: normal; padding: 0; font-size: 14px; mso-line-height-rule: exactly; line-height: 140%; text-align: left; margin: 20px 0 0 0; Margin: 20px 0 0 0;">
285
+ <img src="<?php echo esc_url( wp_mail_smtp()->plugin_url . '/assets/images/email/signature.png' ); ?>" width="180" alt="Signature" style="outline: none; text-decoration: none; max-width: 100%; clear: both; -ms-interpolation-mode: bicubic; width: 180px; display: block; margin: 0 0 0 0; Margin: 0 0 0 0;">
286
+ </p>
287
+ <p style="-ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; color: #444; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-weight: normal; padding: 0; text-align: left; font-size: 14px; mso-line-height-rule: exactly; line-height: 140%; margin: 0 0 15px 0; Margin: 0 0 15px 0;">
288
+ Jared Atchison<br>Lead Developer, WP Mail SMTP
289
+ </p>
290
+ </div>
291
+ </td>
292
+ </tr>
293
+ <!-- Aside -->
294
+ <?php if ( ! class_exists( 'WPForms_Pro', false ) ) : ?>
295
+ <tr style="padding: 0; vertical-align: top; text-align: left;">
296
+ <td align="left" valign="top" class="aside upsell-mi" style="word-wrap: break-word; -webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; border-collapse: collapse !important; vertical-align: top; mso-table-lspace: 0pt; mso-table-rspace: 0pt; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; color: #444; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-weight: normal; margin: 0; Margin: 0; font-size: 14px; mso-line-height-rule: exactly; line-height: 140%; background-color: #f8f8f8; border-top: 1px solid #dddddd; border-right: 1px solid #dddddd; border-bottom: 1px solid #dddddd; border-left: 1px solid #dddddd; text-align: center !important; padding: 30px 75px 25px 75px;">
297
+ <table class="icon-wrap" border="0" cellpadding="0" cellspacing="0" width="100%" style="border-collapse: collapse; border-spacing: 0; padding: 0; vertical-align: top; text-align: left; mso-table-lspace: 0pt; mso-table-rspace: 0pt; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;">
298
+ <tr style="padding: 0; vertical-align: top; text-align: left;">
299
+ <td style="word-wrap: break-word; -webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; border-collapse: collapse !important; vertical-align: top; mso-table-lspace: 0pt; mso-table-rspace: 0pt; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; color: #444; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-weight: normal; margin: 0; Margin: 0; font-size: 14px; mso-line-height-rule: exactly; line-height: 140%; text-align: center; padding: 0 0 10px 0;">
300
+ <img src="<?php echo esc_url( wp_mail_smtp()->plugin_url . '/assets/images/email/wpforms-pro.png' ); ?>" width="90" alt="WPForms Logo" class="icon" style="outline: none; text-decoration: none; max-width: 100%; clear: both; -ms-interpolation-mode: bicubic; width: 90px; height: 90px; display: inline-block;">
301
+ </td>
302
+ </tr>
303
+ </table>
304
+ <h6 style="padding: 0; color: #444444; word-wrap: normal; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-weight: bold; mso-line-height-rule: exactly; line-height: 130%; font-size: 18px; text-align: center; margin: 0 0 4px 0; Margin: 0 0 4px 0;">
305
+ Drag &amp; Drop WordPress Form Builder
306
+ </h6>
307
+ <p style="-ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; color: #444; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-weight: normal; padding: 0; font-size: 14px; mso-line-height-rule: exactly; line-height: 140%; margin: 0 0 15px 0; Margin: 0 0 15px 0; text-align: center;">
308
+ Finally, a WordPress form plugin that's both Easy and Powerful.
309
+ </p>
310
+ <p class="text-large" style="-ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; color: #444; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-weight: normal; padding: 0; mso-line-height-rule: exactly; line-height: 140%; margin: 0 0 15px 0; Margin: 0 0 15px 0; font-size: 16px; text-align: center;">
311
+ Create a form and start collecting leads in under 5 minutes.
312
+ </p>
313
+ <p class="text-large last" style="-ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; color: #444; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-weight: normal; padding: 0; mso-line-height-rule: exactly; line-height: 140%; font-size: 16px; text-align: center; margin: 0 0 0 0; Margin: 0 0 0 0;">
314
+ Over 1 million websites use WPForms. See why it's the fastest growing WordPress forms plugin in the market.
315
+ </p>
316
+ <center style="width: 100%;">
317
+ <table class="button large expanded orange" style="border-collapse: collapse; border-spacing: 0; padding: 0; vertical-align: top; text-align: left; mso-table-lspace: 0pt; mso-table-rspace: 0pt; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; color: #e27730; width: 100% !important;">
318
+ <tr style="padding: 0; vertical-align: top; text-align: left;">
319
+ <td class="button-inner" style="word-wrap: break-word; -webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; border-collapse: collapse !important; vertical-align: top; mso-table-lspace: 0pt; mso-table-rspace: 0pt; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; color: #444; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-weight: normal; margin: 0; Margin: 0; text-align: left; font-size: 14px; mso-line-height-rule: exactly; line-height: 100%; padding: 20px 0 20px 0;">
320
+ <table style="border-collapse: collapse; border-spacing: 0; padding: 0; vertical-align: top; text-align: left; mso-table-lspace: 0pt; mso-table-rspace: 0pt; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; width: 100% !important;">
321
+ <tr style="padding: 0; vertical-align: top; text-align: left;">
322
+ <td style="word-wrap: break-word; -webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; border-collapse: collapse !important; vertical-align: top; mso-table-lspace: 0pt; mso-table-rspace: 0pt; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-weight: normal; padding: 0; margin: 0; Margin: 0; font-size: 14px; text-align: center; color: #ffffff; background: #e27730; border: 1px solid #c45e1b; border-bottom: 3px solid #c45e1b; mso-line-height-rule: exactly; line-height: 100%;">
323
+ <a href="https://wpforms.com/?discount=THANKYOU&utm_source=WordPress&utm_medium=email-cta&utm_campaign=smtpplugin" style="-ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; margin: 0; Margin: 0; font-family: Helvetica, Arial, sans-serif; font-weight: bold; color: #ffffff; text-decoration: none; display: inline-block; border: 0 solid #c45e1b; mso-line-height-rule: exactly; line-height: 100%; padding: 14px 20px 12px 20px; font-size: 20px; text-align: center; width: 100%; padding-left: 0; padding-right: 0;">
324
+ <?php if ( class_exists( 'WPForms_Lite', false ) ) : ?>
325
+ Upgrade to WPForms Pro Today
326
+ <?php else : ?>
327
+ Get WPForms Today
328
+ <?php endif; ?>
329
+ </a>
330
+ </td>
331
+ </tr>
332
+ </table>
333
+ </td>
334
+ </tr>
335
+ </table>
336
+ </center>
337
+ </td>
338
+ </tr>
339
+ <?php endif; ?>
340
+ </table>
341
+ </td>
342
+ </tr>
343
+ </table>
344
+ </body>
345
+ </html>
346
+
347
+ <?php
348
+ $message = ob_get_clean();
349
+
350
+ return $message;
351
+ }
352
+
353
+ /**
354
+ * Get the plain text prepared message for test email.
355
+ *
356
+ * @since 1.4.0
357
+ *
358
+ * @return string
359
+ */
360
+ private function get_email_message_text() {
361
+
362
+ // Default message in case anything below will fail.
363
+ $message = sprintf(
364
+ /* translators: %s - mailer name. */
365
+ esc_html__( 'This email was sent by %s mailer, and WP Mail SMTP plugin by WPForms generated it.', 'wp-mail-smtp' ),
366
+ wp_mail_smtp()->get_providers()->get_options( Options::init()->get( 'mail', 'mailer' ) )->get_title()
367
+ );
368
+
369
+ // phpcs:disable
370
+ if ( ! function_exists( 'wpforms' ) ) {
371
+ // WPForms not installed.
372
+ $message =
373
+ 'Congrats, test email was sent successfully!
374
+
375
+ Thank you for trying out WP Mail SMTP. We are on a mission to make sure your emails actually get delivered.
376
+
377
+ If you find this plugin useful, please consider giving our sister plugin, WPForms, a try!
378
+
379
+ https://wpforms.com/
380
+
381
+ WPForms is a drag & drop form builder plugin that is both easy and powerful. Trusted by over 1 million websites.
382
+
383
+ - Jared Atchison
384
+ Lead Developer, WP Mail SMTP';
385
+ } elseif ( class_exists( 'WPForms_Lite', false ) ) {
386
+ // WPForms Lite installed.
387
+ $message =
388
+ 'Congrats, test email was sent successfully!
389
+
390
+ Thank you for trying out WP Mail SMTP. We are on a mission to make sure your emails actually get delivered.
391
+
392
+ If you find this plugin useful, please consider giving our sister plugin, WPForms Pro, a try!
393
+
394
+ https://wpforms.com/lite-upgrade/
395
+
396
+ Upgrade to WPForms Pro and unlock all the awesome features.
397
+
398
+ - Jared Atchison
399
+ Lead Developer, WP Mail SMTP';
400
+ } elseif ( class_exists( 'WPForms_Pro', false ) ) {
401
+ // WPForms paid installed.
402
+ $message =
403
+ 'Congrats, test email was sent successfully!
404
+
405
+ Thank you for trying out WP Mail SMTP. We are on a mission to make sure your emails actually get delivered.
406
+
407
+ - Jared Atchison
408
+ Lead Developer, WP Mail SMTP';
409
+ }
410
+ // phpcs:enable
411
+
412
+ return $message;
413
+ }
414
+
415
+ /**
416
+ * Set the HTML content type for a test email.
417
+ *
418
+ * @since 1.4.0
419
+ *
420
+ * @return string
421
+ */
422
+ public static function set_test_html_content_type() {
423
+
424
+ return 'text/html';
425
+ }
426
+
427
  /**
428
  * Prepare debug information, that will help users to identify the error.
429
  *
478
  }
479
 
480
  /*
481
+ * SMTP Debug.
482
+ */
483
 
484
  $smtp_text = '';
485
  if ( $options->is_mailer_smtp() ) {
491
  }
492
  }
493
 
494
+ $errors = apply_filters(
495
+ 'wp_mail_smtp_admin_test_get_debug_messages',
496
+ array(
497
+ $versions_text,
498
+ $mailer_text,
499
+ $debug_text,
500
+ $smtp_text,
501
+ )
502
+ );
503
 
504
  return '<pre>' . implode( '<br>', array_filter( $errors ) ) . '</pre>';
505
  }
1020
  <h2><?php esc_html_e( 'Recommended next steps:', 'wp-mail-smtp' ); ?></h2>
1021
 
1022
  <ol>
1023
+ <?php
1024
+ foreach ( $debug['steps'] as $step ) {
1025
+ echo '<li>' . $step . '</li>';
1026
+ }
1027
+ ?>
1028
  </ol>
1029
 
1030
  <h2><?php esc_html_e( 'Need support?', 'wp-mail-smtp' ); ?></h2>
1031
 
1032
+ <?php if ( class_exists( 'WPForms_Pro', false ) ) : ?>
1033
 
1034
  <p>
1035
  <?php
src/Core.php CHANGED
@@ -91,7 +91,7 @@ class Core {
91
  // Plugin admin area notices. Display to "admins" only.
92
  if ( current_user_can( 'manage_options' ) ) {
93
  add_action( 'admin_notices', array( '\WPMailSMTP\WP', 'display_admin_notices' ) );
94
- add_action( 'admin_notices', array( $this, 'display_debug_notices' ) );
95
  }
96
  }
97
 
@@ -207,63 +207,82 @@ class Core {
207
  * Recommend WPForms Lite using TGM Activation.
208
  *
209
  * @since 1.3.0
 
210
  */
211
  public function init_recommendations() {
212
 
 
 
 
 
 
213
  // Recommend only for new installs.
214
  if ( ! $this->is_new_install() ) {
215
  return;
216
  }
217
 
218
  // Specify a plugin that we want to recommend.
219
- $plugins = apply_filters( 'wp_mail_smtp_core_recommendations_plugins', array(
 
220
  array(
221
- 'name' => 'Contact Form by WPForms',
222
- 'slug' => 'wpforms-lite',
223
- 'required' => false,
224
- 'is_callable' => 'wpforms', // This will target the Pro version as well, not only the one from WP.org repository.
225
- ),
226
- ) );
 
 
227
 
228
  /*
229
  * Array of configuration settings.
230
  */
231
- $config = apply_filters( 'wp_mail_smtp_core_recommendations_config', array(
232
- 'id' => 'wp-mail-smtp', // Unique ID for hashing notices for multiple instances of TGMPA.
233
- 'menu' => 'wp-mail-smtp-install-plugins', // Menu slug.
234
- 'parent_slug' => 'plugins.php', // Parent menu slug.
235
- 'capability' => 'manage_options', // Capability needed to view plugin install page, should be a capability associated with the parent menu used.
236
- 'has_notices' => true, // Show admin notices or not.
237
- 'dismissable' => true, // If false, a user cannot dismiss the nag message.
238
- 'dismiss_msg' => '', // If 'dismissable' is false, this message will be output at top of nag.
239
- 'is_automatic' => false, // Automatically activate plugins after installation or not.
240
- 'message' => '', // Message to output right before the plugins table.
241
- 'strings' => array(
242
- /* translators: 1: plugin name(s). */
243
- 'notice_can_install_recommended' => _n_noop(
244
- 'Thanks for installing WP Mail SMTP. We also recommend using %1$s. It\'s the best drag & drop form builder, has over 1 million active installs, and over 2000+ 5 star ratings.',
245
- 'Thanks for installing WP Mail SMTP. We also recommend using %1$s. It\'s the best drag & drop form builder, has over 1 million active installs, and over 2000+ 5 star ratings.',
246
- 'wp-mail-smtp'
247
- ),
248
- /* translators: 1: plugin name(s). */
249
- 'notice_can_activate_recommended' => _n_noop(
250
- 'Thanks for installing WP Mail SMTP. We also recommend using %1$s. It\'s the best drag & drop form builder, has over 1 million active installs, and over 2000+ 5 star ratings.',
251
- 'Thanks for installing WP Mail SMTP. We also recommend using %1$s. It\'s the best drag & drop form builder, has over 1 million active installs, and over 2000+ 5 star ratings.',
252
- 'wp-mail-smtp'
253
- ),
254
- 'install_link' => _n_noop(
255
- 'Install WPForms Now',
256
- 'Begin installing plugins',
257
- 'wp-mail-smtp'
258
- ),
259
- 'activate_link' => _n_noop(
260
- 'Activate WPForms',
261
- 'Begin activating plugins',
262
- 'wp-mail-smtp'
 
 
 
 
 
 
 
 
 
 
 
263
  ),
264
- 'nag_type' => 'notice-info',
265
- ),
266
- ) );
267
 
268
  \WPMailSMTP\tgmpa( (array) $plugins, (array) $config );
269
  }
@@ -273,52 +292,87 @@ class Core {
273
  *
274
  * @since 1.3.0
275
  */
276
- public static function display_debug_notices() {
277
 
278
- $notice = Debug::get_last();
 
279
 
280
- if ( empty( $notice ) ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
281
  return;
282
  }
283
- ?>
284
 
285
- <div id="message" class="<?php echo WP::ADMIN_NOTICE_ERROR; ?> notice">
286
- <p>
287
- <?php
288
- echo wp_kses(
289
- __( '<strong>EMAIL DELIVERY ERROR:</strong> WP Mail SMTP plugin logged this error during the last time it tried to send an email: ', 'wp-mail-smtp' ),
290
- array(
291
- 'strong' => array(),
292
- )
293
- );
294
- ?>
295
- </p>
296
 
297
- <blockquote>
298
- <pre><?php echo $notice; ?></pre>
299
- </blockquote>
300
 
301
- <p>
302
- <?php
303
- if ( ! wp_mail_smtp()->get_admin()->is_admin_page() ) {
304
  printf(
305
  wp_kses(
306
- /* translators: %s - plugin admin page URL. */
307
- __( 'Please review your WP Mail SMTP settings in <a href="%s">plugin admin area</a>.' ) . ' ',
308
  array(
309
- 'a' => array(
310
- 'href' => array(),
311
- ),
312
  )
313
  ),
314
- wp_mail_smtp()->get_admin()->get_admin_page_url()
315
  );
316
- }
317
-
318
- esc_html_e( 'Consider running an email test after fixing it.', 'wp-mail-smtp' );
319
- ?>
320
- </p>
321
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
322
 
323
  <?php
324
  }
91
  // Plugin admin area notices. Display to "admins" only.
92
  if ( current_user_can( 'manage_options' ) ) {
93
  add_action( 'admin_notices', array( '\WPMailSMTP\WP', 'display_admin_notices' ) );
94
+ add_action( 'admin_notices', array( $this, 'display_general_notices' ) );
95
  }
96
  }
97
 
207
  * Recommend WPForms Lite using TGM Activation.
208
  *
209
  * @since 1.3.0
210
+ * @since 1.4.0 Display to site admins only.
211
  */
212
  public function init_recommendations() {
213
 
214
+ // Recommend only fot site admins who can install plugins.
215
+ if ( ! is_super_admin() ) {
216
+ return;
217
+ }
218
+
219
  // Recommend only for new installs.
220
  if ( ! $this->is_new_install() ) {
221
  return;
222
  }
223
 
224
  // Specify a plugin that we want to recommend.
225
+ $plugins = apply_filters(
226
+ 'wp_mail_smtp_core_recommendations_plugins',
227
  array(
228
+ array(
229
+ 'name' => 'Contact Form by WPForms',
230
+ 'slug' => 'wpforms-lite',
231
+ 'required' => false,
232
+ 'is_callable' => 'wpforms', // This will target the Pro version as well, not only the one from WP.org repository.
233
+ ),
234
+ )
235
+ );
236
 
237
  /*
238
  * Array of configuration settings.
239
  */
240
+ $config = apply_filters(
241
+ 'wp_mail_smtp_core_recommendations_config',
242
+ array(
243
+ 'id' => 'wp-mail-smtp',
244
+ // Unique ID for hashing notices for multiple instances of TGMPA.
245
+ 'menu' => 'wp-mail-smtp-install-plugins',
246
+ // Menu slug.
247
+ 'parent_slug' => 'plugins.php',
248
+ // Parent menu slug.
249
+ 'capability' => 'manage_options',
250
+ // Capability needed to view plugin install page, should be a capability associated with the parent menu used.
251
+ 'has_notices' => true,
252
+ // Show admin notices or not.
253
+ 'dismissable' => true,
254
+ // If false, a user cannot dismiss the nag message.
255
+ 'dismiss_msg' => '',
256
+ // If 'dismissable' is false, this message will be output at top of nag.
257
+ 'is_automatic' => false,
258
+ // Automatically activate plugins after installation or not.
259
+ 'message' => '',
260
+ // Message to output right before the plugins table.
261
+ 'strings' => array(
262
+ 'page_title' => esc_html__( 'Install Recommended Plugin', 'wp-mail-smtp' ),
263
+ 'menu_title' => esc_html__( 'Recommended', 'wp-mail-smtp' ),
264
+ /* translators: 1: plugin name(s). */
265
+ 'notice_can_install_recommended' => _n_noop(
266
+ 'Thanks for installing WP Mail SMTP. We also recommend using %1$s. It\'s the best drag & drop form builder, has over 1 million active installs, and over 2000+ 5 star ratings.',
267
+ 'Thanks for installing WP Mail SMTP. We also recommend using %1$s. It\'s the best drag & drop form builder, has over 1 million active installs, and over 2000+ 5 star ratings.',
268
+ 'wp-mail-smtp'
269
+ ),
270
+ /* translators: 1: plugin name(s). */
271
+ 'notice_can_activate_recommended' => _n_noop(
272
+ 'Thanks for installing WP Mail SMTP. We also recommend using %1$s. It\'s the best drag & drop form builder, has over 1 million active installs, and over 2000+ 5 star ratings.',
273
+ 'Thanks for installing WP Mail SMTP. We also recommend using %1$s. It\'s the best drag & drop form builder, has over 1 million active installs, and over 2000+ 5 star ratings.',
274
+ 'wp-mail-smtp'
275
+ ),
276
+ 'install_link' => _n_noop( 'Install WPForms Now', 'Begin installing plugins', 'wp-mail-smtp' ),
277
+ 'activate_link' => _n_noop( 'Activate WPForms', 'Begin activating plugins', 'wp-mail-smtp' ),
278
+ 'return' => esc_html__( 'Return to Recommended Plugin Installer', 'wp-mail-smtp' ),
279
+ /* translators: 1: dashboard link. */
280
+ 'complete' => esc_html__( 'The recommended plugin was installed and activated successfully. %1$s', 'wp-mail-smtp' ),
281
+ 'notice_cannot_install_activate' => esc_html__( 'There is one recommended plugin to install, update or activate.', 'wp-mail-smtp' ),
282
+ 'nag_type' => 'notice-info',
283
  ),
284
+ )
285
+ );
 
286
 
287
  \WPMailSMTP\tgmpa( (array) $plugins, (array) $config );
288
  }
292
  *
293
  * @since 1.3.0
294
  */
295
+ public static function display_general_notices() {
296
 
297
+ if ( Options::init()->get( 'general', 'do_not_send' ) ) {
298
+ ?>
299
 
300
+ <div id="message" class="<?php echo WP::ADMIN_NOTICE_ERROR; ?> notice">
301
+ <p>
302
+ <?php
303
+ printf(
304
+ wp_kses(
305
+ /* translators: %1$s - plugin name and its version, %2$s - plugin Misc settings page. */
306
+ __( '<strong>EMAILING DISABLED:</strong> The %1$s is currently blocking all emails from being sent. To send emails, go to plugin <a href="%2$s">Misc settings</a> and disable the "Do Not Send" option.', 'wp-mail-smtp' ),
307
+ array(
308
+ 'strong' => array(),
309
+ 'a' => array(
310
+ 'href' => array(),
311
+ ),
312
+ )
313
+ ),
314
+ esc_html( 'WP Mail SMTP v' . WPMS_PLUGIN_VER ),
315
+ esc_url( add_query_arg( 'tab', 'misc', wp_mail_smtp()->get_admin()->get_admin_page_url() ) )
316
+ );
317
+ ?>
318
+ </p>
319
+ </div>
320
+
321
+ <?php
322
  return;
323
  }
 
324
 
325
+ $notice = Debug::get_last();
 
 
 
 
 
 
 
 
 
 
326
 
327
+ if ( ! empty( $notice ) ) {
328
+ ?>
 
329
 
330
+ <div id="message" class="<?php echo WP::ADMIN_NOTICE_ERROR; ?> notice">
331
+ <p>
332
+ <?php
333
  printf(
334
  wp_kses(
335
+ /* translators: %s - plugin name and its version. */
336
+ __( '<strong>EMAIL DELIVERY ERROR:</strong> the plugin %s logged this error during the last time it tried to send an email:', 'wp-mail-smtp' ),
337
  array(
338
+ 'strong' => array(),
 
 
339
  )
340
  ),
341
+ esc_html( 'WP Mail SMTP v' . WPMS_PLUGIN_VER )
342
  );
343
+ ?>
344
+ </p>
345
+
346
+ <blockquote>
347
+ <pre><?php echo $notice; ?></pre>
348
+ </blockquote>
349
+
350
+ <p>
351
+ <?php
352
+ if ( ! wp_mail_smtp()->get_admin()->is_admin_page() ) {
353
+ printf(
354
+ wp_kses(
355
+ /* translators: %s - plugin admin page URL. */
356
+ __( 'Please review your WP Mail SMTP settings in <a href="%s">plugin admin area</a>.' ) . ' ',
357
+ array(
358
+ 'a' => array(
359
+ 'href' => array(),
360
+ ),
361
+ )
362
+ ),
363
+ esc_url( wp_mail_smtp()->get_admin()->get_admin_page_url() )
364
+ );
365
+ }
366
+
367
+ esc_html_e( 'Consider running an email test after fixing it.', 'wp-mail-smtp' );
368
+ ?>
369
+ </p>
370
+ </div>
371
+
372
+ <?php
373
+ return;
374
+ }
375
+ ?>
376
 
377
  <?php
378
  }
src/MailCatcher.php CHANGED
@@ -40,7 +40,31 @@ class MailCatcher extends \PHPMailer {
40
  */
41
  public function send() {
42
 
43
- $options = new Options();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  $mail_mailer = $options->get( 'mail', 'mailer' );
45
 
46
  // Define a custom header, that will be used in Gmail/SMTP mailers.
40
  */
41
  public function send() {
42
 
43
+ $options = new Options();
44
+
45
+ $is_emailing_blocked = false;
46
+
47
+ if ( $options->get( 'general', 'do_not_send' ) ) {
48
+ $is_emailing_blocked = true;
49
+ }
50
+
51
+ foreach ( (array) $this->getCustomHeaders() as $header ) {
52
+ if (
53
+ ! empty( $header[0] ) &&
54
+ ! empty( $header[1] ) &&
55
+ $header[0] === 'X-Mailer-Type' &&
56
+ trim( $header[1] ) === 'WPMailSMTP\Admin\Test'
57
+ ) {
58
+ // Se we are working with a test email - allow to send it.
59
+ $is_emailing_blocked = false;
60
+ }
61
+ };
62
+
63
+ // Do not send emails if admin desired that.
64
+ if ( $is_emailing_blocked ) {
65
+ return false;
66
+ }
67
+
68
  $mail_mailer = $options->get( 'mail', 'mailer' );
69
 
70
  // Define a custom header, that will be used in Gmail/SMTP mailers.
src/Migration.php CHANGED
@@ -172,7 +172,7 @@ class Migration {
172
  $converted['mail']['mailer'] = $this->old_values[ $old_key ];
173
  break;
174
  case 'wp_mail_smtp_am_notifications_hidden':
175
- $converted['general']['am_notifications_hidden'] = ( $this->old_values[ $old_key ] === 'true' );
176
  break;
177
  }
178
  }
172
  $converted['mail']['mailer'] = $this->old_values[ $old_key ];
173
  break;
174
  case 'wp_mail_smtp_am_notifications_hidden':
175
+ $converted['general']['am_notifications_hidden'] = ( isset( $this->old_values[ $old_key ] ) && $this->old_values[ $old_key ] === 'true' );
176
  break;
177
  }
178
  }
src/Options.php CHANGED
@@ -13,6 +13,13 @@ namespace WPMailSMTP;
13
  class Options {
14
 
15
  /**
 
 
 
 
 
 
 
16
  * @var array Map of all the default options of the plugin.
17
  */
18
  private static $map = array(
@@ -40,6 +47,7 @@ class Options {
40
  'mailgun' => array(
41
  'api_key',
42
  'domain',
 
43
  ),
44
  'sendgrid' => array(
45
  'api_key',
@@ -197,29 +205,39 @@ class Options {
197
  * @param string $group
198
  * @param string $key
199
  *
200
- * @return mixed
201
  */
202
  public function get( $group, $key ) {
203
 
204
  // Just to feel safe.
205
  $group = sanitize_key( $group );
206
  $key = sanitize_key( $key );
207
-
208
- // Get the options group.
209
- if ( isset( $this->_options[ $group ] ) ) {
210
-
211
- // Get the options key of a group.
212
- if ( isset( $this->_options[ $group ][ $key ] ) ) {
213
- $value = $this->get_const_value( $group, $key, $this->_options[ $group ][ $key ] );
214
- } else {
215
- $value = $this->postprocess_key_defaults( $group, $key );
216
- }
217
- } else {
218
- // check on maps
219
- if ( isset( self::$map[ $group ] ) && in_array( $key, self::$map[ $group ] ) ) {
220
- $value = $this->get_const_value( $group, $key, false );
 
221
  } else {
222
- $value = $this->postprocess_key_defaults( $group, $key );
 
 
 
 
 
 
 
 
 
223
  }
224
  }
225
 
@@ -235,6 +253,7 @@ class Options {
235
  * so we need to postprocess them to convert.
236
  *
237
  * @since 1.0.0
 
238
  *
239
  * @param string $group
240
  * @param string $key
@@ -252,10 +271,18 @@ class Options {
252
  $value = $group === 'mail' ? false : true;
253
  break;
254
 
 
 
 
 
255
  case 'encryption':
256
  $value = in_array( $group, array( 'smtp', 'pepipost' ), true ) ? 'none' : $value;
257
  break;
258
 
 
 
 
 
259
  case 'auth':
260
  case 'autotls':
261
  $value = in_array( $group, array( 'smtp', 'pepipost' ), true ) ? false : true;
@@ -276,6 +303,7 @@ class Options {
276
  * General section of options won't have constants, so we are omitting those checks and just return default value.
277
  *
278
  * @since 1.0.0
 
279
  *
280
  * @param string $group
281
  * @param string $key
@@ -324,9 +352,7 @@ class Options {
324
  return $this->is_const_defined( $group, $key ) ? WPMS_SMTP_PORT : $value;
325
  case 'encryption':
326
  /** @noinspection PhpUndefinedConstantInspection */
327
- return $this->is_const_defined( $group, $key )
328
- ? ( WPMS_SSL === '' ? 'none' : WPMS_SSL )
329
- : $value;
330
  case 'auth':
331
  /** @noinspection PhpUndefinedConstantInspection */
332
  return $this->is_const_defined( $group, $key ) ? WPMS_SMTP_AUTH : $value;
@@ -363,6 +389,9 @@ class Options {
363
  case 'domain':
364
  /** @noinspection PhpUndefinedConstantInspection */
365
  return $this->is_const_defined( $group, $key ) ? WPMS_MAILGUN_DOMAIN : $value;
 
 
 
366
  }
367
 
368
  break;
@@ -469,6 +498,8 @@ class Options {
469
  return defined( 'WPMS_MAILGUN_API_KEY' ) && WPMS_MAILGUN_API_KEY;
470
  case 'domain':
471
  return defined( 'WPMS_MAILGUN_DOMAIN' ) && WPMS_MAILGUN_DOMAIN;
 
 
472
  }
473
 
474
  break;
@@ -490,86 +521,89 @@ class Options {
490
  *
491
  * @since 1.0.0
492
  * @since 1.3.0 Added $once argument to save option only if they don't exist already.
 
493
  *
494
  * @param array $options Plugin options to save.
495
  * @param bool $once Whether to update existing options or to add these options only once.
496
  */
497
  public function set( $options, $once = false ) {
498
-
 
 
499
  foreach ( (array) $options as $group => $keys ) {
500
- foreach ( $keys as $key_name => $key_value ) {
501
  switch ( $group ) {
502
  case 'mail':
503
- switch ( $key_name ) {
504
  case 'from_name':
505
  case 'mailer':
506
- $options[ $group ][ $key_name ] = $this->get_const_value( $group, $key_name, wp_strip_all_tags( $options[ $group ][ $key_name ], true ) );
507
  break;
508
  case 'from_email':
509
- if ( filter_var( $options[ $group ][ $key_name ], FILTER_VALIDATE_EMAIL ) ) {
510
- $options[ $group ][ $key_name ] = $this->get_const_value( $group, $key_name, sanitize_email( $options[ $group ][ $key_name ] ) );
511
  }
512
  break;
513
  case 'return_path':
514
  case 'from_name_force':
515
  case 'from_email_force':
516
- $options[ $group ][ $key_name ] = $this->get_const_value( $group, $key_name, (bool) $options[ $group ][ $key_name ] );
517
  break;
518
  }
519
  break;
520
 
521
  case 'general':
522
- switch ( $key_name ) {
 
523
  case 'am_notifications_hidden':
524
  case 'uninstall':
525
- $options[ $group ][ $key_name ] = (bool) $options[ $group ][ $key_name ];
526
  break;
527
  }
528
  }
529
  }
530
  }
531
 
 
 
 
532
  if (
 
533
  isset( $options[ $options['mail']['mailer'] ] ) &&
534
  in_array( $options['mail']['mailer'], array( 'pepipost', 'smtp', 'sendgrid', 'mailgun', 'gmail' ), true )
535
  ) {
536
 
537
  $mailer = $options['mail']['mailer'];
538
 
539
- foreach ( $options[ $mailer ] as $key_name => $key_value ) {
540
- switch ( $key_name ) {
541
- case 'host':
542
- case 'user':
543
- $options[ $mailer ][ $key_name ] = $this->get_const_value( $mailer, $key_name, wp_strip_all_tags( $options[ $mailer ][ $key_name ], true ) );
544
- break;
 
 
545
  case 'port':
546
- $options[ $mailer ][ $key_name ] = $this->get_const_value( $mailer, $key_name, intval( $options[ $mailer ][ $key_name ] ) );
547
- break;
548
- case 'encryption':
549
- $options[ $mailer ][ $key_name ] = $this->get_const_value( $mailer, $key_name, wp_strip_all_tags( $options[ $mailer ][ $key_name ], true ) );
550
  break;
551
- case 'auth':
552
- case 'autotls':
553
- $value = $options[ $mailer ][ $key_name ] === 'yes' || $options[ $mailer ][ $key_name ] === true ? true : false;
554
 
555
- $options[ $mailer ][ $key_name ] = $this->get_const_value( $mailer, $key_name, $value );
556
  break;
557
 
558
- case 'pass':
559
- case 'api_key':
560
- case 'domain':
561
- case 'client_id':
562
- case 'client_secret':
563
- case 'auth_code':
564
- case 'access_token':
565
- if ( is_string( $options[ $mailer ][ $key_name ] ) ) {
566
- $value = trim( $options[ $mailer ][ $key_name ] );
567
- } else {
568
- $value = $options[ $mailer ][ $key_name ];
569
- }
570
 
571
  // Do not process as they may contain certain special characters, but allow to be overwritten using constants.
572
- $options[ $mailer ][ $key_name ] = $this->get_const_value( $mailer, $key_name, $value );
573
  break;
574
  }
575
  }
13
  class Options {
14
 
15
  /**
16
+ * All the options keys.
17
+ *
18
+ * @since 1.3.0
19
+ * @since 1.4.0 Added Mailgun:region.
20
+ *
21
+ * @since
22
+ *
23
  * @var array Map of all the default options of the plugin.
24
  */
25
  private static $map = array(
47
  'mailgun' => array(
48
  'api_key',
49
  'domain',
50
+ 'region',
51
  ),
52
  'sendgrid' => array(
53
  'api_key',
205
  * @param string $group
206
  * @param string $key
207
  *
208
+ * @return mixed|null Null if value doesn't exist anywhere: in constants, in DB, in a map. So it's completely custom or a typo.
209
  */
210
  public function get( $group, $key ) {
211
 
212
  // Just to feel safe.
213
  $group = sanitize_key( $group );
214
  $key = sanitize_key( $key );
215
+ $value = null;
216
+
217
+ // Get the const value if we have one.
218
+ $value = $this->get_const_value( $group, $key, $value );
219
+
220
+ // We don't have a const value.
221
+ if ( $value === null ) {
222
+ // Ordinary database or default values.
223
+ if ( isset( $this->_options[ $group ] ) ) {
224
+ // Get the options key of a group.
225
+ if ( isset( $this->_options[ $group ][ $key ] ) ) {
226
+ $value = $this->_options[ $group ][ $key ];
227
+ } else {
228
+ $value = $this->postprocess_key_defaults( $group, $key );
229
+ }
230
  } else {
231
+ /*
232
+ * Fallback to default if it doesn't exist in a map.
233
+ * Allow to retrive only values from a map.
234
+ */
235
+ if (
236
+ isset( self::$map[ $group ] ) &&
237
+ in_array( $key, self::$map[ $group ], true )
238
+ ) {
239
+ $value = $this->postprocess_key_defaults( $group, $key );
240
+ }
241
  }
242
  }
243
 
253
  * so we need to postprocess them to convert.
254
  *
255
  * @since 1.0.0
256
+ * @since 1.4.0 Added Mailgun:region support.
257
  *
258
  * @param string $group
259
  * @param string $key
271
  $value = $group === 'mail' ? false : true;
272
  break;
273
 
274
+ case 'mailer':
275
+ $value = 'mail';
276
+ break;
277
+
278
  case 'encryption':
279
  $value = in_array( $group, array( 'smtp', 'pepipost' ), true ) ? 'none' : $value;
280
  break;
281
 
282
+ case 'region':
283
+ $value = $group === 'mailgun' ? 'US' : $value;
284
+ break;
285
+
286
  case 'auth':
287
  case 'autotls':
288
  $value = in_array( $group, array( 'smtp', 'pepipost' ), true ) ? false : true;
303
  * General section of options won't have constants, so we are omitting those checks and just return default value.
304
  *
305
  * @since 1.0.0
306
+ * @since 1.4.0 Added WPMS_MAILGUN_REGION support.
307
  *
308
  * @param string $group
309
  * @param string $key
352
  return $this->is_const_defined( $group, $key ) ? WPMS_SMTP_PORT : $value;
353
  case 'encryption':
354
  /** @noinspection PhpUndefinedConstantInspection */
355
+ return $this->is_const_defined( $group, $key ) ? ( WPMS_SSL === '' ? 'none' : WPMS_SSL ) : $value;
 
 
356
  case 'auth':
357
  /** @noinspection PhpUndefinedConstantInspection */
358
  return $this->is_const_defined( $group, $key ) ? WPMS_SMTP_AUTH : $value;
389
  case 'domain':
390
  /** @noinspection PhpUndefinedConstantInspection */
391
  return $this->is_const_defined( $group, $key ) ? WPMS_MAILGUN_DOMAIN : $value;
392
+ case 'region':
393
+ /** @noinspection PhpUndefinedConstantInspection */
394
+ return $this->is_const_defined( $group, $key ) ? WPMS_MAILGUN_REGION : $value;
395
  }
396
 
397
  break;
498
  return defined( 'WPMS_MAILGUN_API_KEY' ) && WPMS_MAILGUN_API_KEY;
499
  case 'domain':
500
  return defined( 'WPMS_MAILGUN_DOMAIN' ) && WPMS_MAILGUN_DOMAIN;
501
+ case 'region':
502
+ return defined( 'WPMS_MAILGUN_REGION' ) && WPMS_MAILGUN_REGION;
503
  }
504
 
505
  break;
521
  *
522
  * @since 1.0.0
523
  * @since 1.3.0 Added $once argument to save option only if they don't exist already.
524
+ * @since 1.4.0 Added Mailgun:region support.
525
  *
526
  * @param array $options Plugin options to save.
527
  * @param bool $once Whether to update existing options or to add these options only once.
528
  */
529
  public function set( $options, $once = false ) {
530
+ /*
531
+ * Process general options.
532
+ */
533
  foreach ( (array) $options as $group => $keys ) {
534
+ foreach ( $keys as $option_name => $option_value ) {
535
  switch ( $group ) {
536
  case 'mail':
537
+ switch ( $option_name ) {
538
  case 'from_name':
539
  case 'mailer':
540
+ $options[ $group ][ $option_name ] = $this->get_const_value( $group, $option_name, sanitize_text_field( $option_value ) );
541
  break;
542
  case 'from_email':
543
+ if ( filter_var( $option_value, FILTER_VALIDATE_EMAIL ) ) {
544
+ $options[ $group ][ $option_name ] = $this->get_const_value( $group, $option_name, sanitize_email( $option_value ) );
545
  }
546
  break;
547
  case 'return_path':
548
  case 'from_name_force':
549
  case 'from_email_force':
550
+ $options[ $group ][ $option_name ] = $this->get_const_value( $group, $option_name, (bool) $option_value );
551
  break;
552
  }
553
  break;
554
 
555
  case 'general':
556
+ switch ( $option_name ) {
557
+ case 'do_not_send':
558
  case 'am_notifications_hidden':
559
  case 'uninstall':
560
+ $options[ $group ][ $option_name ] = (bool) $option_value;
561
  break;
562
  }
563
  }
564
  }
565
  }
566
 
567
+ /*
568
+ * Process mailers-specific options.
569
+ */
570
  if (
571
+ ! empty( $options['mail']['mailer'] ) &&
572
  isset( $options[ $options['mail']['mailer'] ] ) &&
573
  in_array( $options['mail']['mailer'], array( 'pepipost', 'smtp', 'sendgrid', 'mailgun', 'gmail' ), true )
574
  ) {
575
 
576
  $mailer = $options['mail']['mailer'];
577
 
578
+ foreach ( $options[ $mailer ] as $option_name => $option_value ) {
579
+ switch ( $option_name ) {
580
+ case 'host': // smtp.
581
+ case 'user': // smtp.
582
+ case 'encryption': // smtp.
583
+ case 'region': // mailgun.
584
+ $options[ $mailer ][ $option_name ] = $this->get_const_value( $mailer, $option_name, sanitize_text_field( $option_value ) );
585
+ break; // smtp.
586
  case 'port':
587
+ $options[ $mailer ][ $option_name ] = $this->get_const_value( $mailer, $option_name, (int) $option_value );
 
 
 
588
  break;
589
+ case 'auth': // smtp.
590
+ case 'autotls': // smtp.
591
+ $option_value = $option_value === 'yes' || $option_value === true;
592
 
593
+ $options[ $mailer ][ $option_name ] = $this->get_const_value( $mailer, $option_name, $option_value );
594
  break;
595
 
596
+ case 'pass': // smtp.
597
+ case 'api_key': // mailgun/sendgrid.
598
+ case 'domain': // mailgun.
599
+ case 'client_id': // gmail.
600
+ case 'client_secret': // gmail.
601
+ case 'auth_code': // gmail.
602
+ case 'access_token': // gmail.
603
+ $option_value = is_string( $option_value ) ? sanitize_text_field( $option_value ) : $option_value;
 
 
 
 
604
 
605
  // Do not process as they may contain certain special characters, but allow to be overwritten using constants.
606
+ $options[ $mailer ][ $option_name ] = $this->get_const_value( $mailer, $option_name, $option_value );
607
  break;
608
  }
609
  }
src/Providers/Gmail/Mailer.php CHANGED
@@ -148,8 +148,13 @@ class Mailer extends MailerAbstract {
148
 
149
  $gmail_text = array();
150
 
151
- $options = new \WPMailSMTP\Options();
152
- $gmail = $options->get_group( 'gmail' );
 
 
 
 
 
153
 
154
  $gmail_text[] = '<strong>Client ID/Secret:</strong> ' . ( ! empty( $gmail['client_id'] ) && ! empty( $gmail['client_secret'] ) ? 'Yes' : 'No' );
155
  $gmail_text[] = '<strong>Auth Code:</strong> ' . ( ! empty( $gmail['auth_code'] ) ? 'Yes' : 'No' );
@@ -157,11 +162,11 @@ class Mailer extends MailerAbstract {
157
 
158
  $gmail_text[] = '<br><strong>Server:</strong>';
159
 
160
- $gmail_text[] = '<strong>OpenSSL:</strong> ' . ( extension_loaded( 'openssl' ) ? 'Yes' : 'No' );
161
  $gmail_text[] = '<strong>PHP.allow_url_fopen:</strong> ' . ( ini_get( 'allow_url_fopen' ) ? 'Yes' : 'No' );
162
  $gmail_text[] = '<strong>PHP.stream_socket_client():</strong> ' . ( function_exists( 'stream_socket_client' ) ? 'Yes' : 'No' );
163
  $gmail_text[] = '<strong>PHP.fsockopen():</strong> ' . ( function_exists( 'fsockopen' ) ? 'Yes' : 'No' );
164
- $gmail_text[] = '<strong>PHP.curl_version():</strong> ' . ( function_exists( 'curl_version' ) ? 'Yes' : 'No' );
165
  if ( function_exists( 'apache_get_modules' ) ) {
166
  $modules = apache_get_modules();
167
  $gmail_text[] = '<strong>Apache.mod_security:</strong> ' . ( in_array( 'mod_security', $modules, true ) || in_array( 'mod_security2', $modules, true ) ? 'Yes' : 'No' );
@@ -175,4 +180,25 @@ class Mailer extends MailerAbstract {
175
 
176
  return implode( '<br>', $gmail_text );
177
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
178
  }
148
 
149
  $gmail_text = array();
150
 
151
+ $options = new \WPMailSMTP\Options();
152
+ $gmail = $options->get_group( 'gmail' );
153
+ $curl_ver = 'No';
154
+ if ( function_exists( 'curl_version' ) ) {
155
+ $curl = curl_version(); // phpcs:ignore
156
+ $curl_ver = $curl['version'];
157
+ }
158
 
159
  $gmail_text[] = '<strong>Client ID/Secret:</strong> ' . ( ! empty( $gmail['client_id'] ) && ! empty( $gmail['client_secret'] ) ? 'Yes' : 'No' );
160
  $gmail_text[] = '<strong>Auth Code:</strong> ' . ( ! empty( $gmail['auth_code'] ) ? 'Yes' : 'No' );
162
 
163
  $gmail_text[] = '<br><strong>Server:</strong>';
164
 
165
+ $gmail_text[] = '<strong>OpenSSL:</strong> ' . ( extension_loaded( 'openssl' ) && defined( 'OPENSSL_VERSION_TEXT' ) ? OPENSSL_VERSION_TEXT : 'No' );
166
  $gmail_text[] = '<strong>PHP.allow_url_fopen:</strong> ' . ( ini_get( 'allow_url_fopen' ) ? 'Yes' : 'No' );
167
  $gmail_text[] = '<strong>PHP.stream_socket_client():</strong> ' . ( function_exists( 'stream_socket_client' ) ? 'Yes' : 'No' );
168
  $gmail_text[] = '<strong>PHP.fsockopen():</strong> ' . ( function_exists( 'fsockopen' ) ? 'Yes' : 'No' );
169
+ $gmail_text[] = '<strong>PHP.curl_version():</strong> ' . $curl_ver; // phpcs:ignore
170
  if ( function_exists( 'apache_get_modules' ) ) {
171
  $modules = apache_get_modules();
172
  $gmail_text[] = '<strong>Apache.mod_security:</strong> ' . ( in_array( 'mod_security', $modules, true ) || in_array( 'mod_security2', $modules, true ) ? 'Yes' : 'No' );
180
 
181
  return implode( '<br>', $gmail_text );
182
  }
183
+
184
+ /**
185
+ * @inheritdoc
186
+ */
187
+ public function is_mailer_complete() {
188
+
189
+ if ( ! $this->is_php_compatible() ) {
190
+ return false;
191
+ }
192
+
193
+ $auth = new Auth();
194
+
195
+ if (
196
+ $auth->is_clients_saved() &&
197
+ ! $auth->is_auth_required()
198
+ ) {
199
+ return true;
200
+ }
201
+
202
+ return false;
203
+ }
204
  }
src/Providers/Gmail/Options.php CHANGED
@@ -156,7 +156,7 @@ class Options extends OptionsAbstract {
156
 
157
  <?php else : ?>
158
 
159
- <a href="<?php echo wp_nonce_url( wp_mail_smtp()->get_admin()->get_admin_page_url(), 'gmail_remove', 'gmail_remove_nonce' ); ?>#wp-mail-smtp-setting-row-gmail-authorize" class="wp-mail-smtp-btn wp-mail-smtp-btn-md wp-mail-smtp-btn-red" id="wp-mail-smtp-gmail-remove">
160
  <?php esc_html_e( 'Remove Connection', 'wp-mail-smtp' ); ?>
161
  </a>
162
  <p class="desc">
156
 
157
  <?php else : ?>
158
 
159
+ <a href="<?php echo esc_url( wp_nonce_url( wp_mail_smtp()->get_admin()->get_admin_page_url(), 'gmail_remove', 'gmail_remove_nonce' ) ); ?>#wp-mail-smtp-setting-row-gmail-authorize" class="wp-mail-smtp-btn wp-mail-smtp-btn-md wp-mail-smtp-btn-red" id="wp-mail-smtp-gmail-remove">
160
  <?php esc_html_e( 'Remove Connection', 'wp-mail-smtp' ); ?>
161
  </a>
162
  <p class="desc">
src/Providers/Mail/Mailer.php CHANGED
@@ -38,4 +38,19 @@ class Mailer extends MailerAbstract {
38
 
39
  return implode( '<br>', $mail_text );
40
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
  }
38
 
39
  return implode( '<br>', $mail_text );
40
  }
41
+
42
+ /**
43
+ * @inheritdoc
44
+ */
45
+ public function is_mailer_complete() {
46
+
47
+ // Do not allow to send test emails when using a default mailer Mail.
48
+ if (
49
+ $this->mailer !== \WPMailSMTP\Options::init()->get( 'mail', 'mailer' )
50
+ ) {
51
+ return true;
52
+ }
53
+
54
+ return false;
55
+ }
56
  }
src/Providers/MailerAbstract.php CHANGED
@@ -105,15 +105,15 @@ abstract class MailerAbstract implements MailerInterface {
105
  )
106
  );
107
  $this->set_subject( $this->phpmailer->Subject );
108
- if ( $this->phpmailer->ContentType === 'text/html' ) {
 
 
109
  $this->set_content(
110
  array(
111
  'text' => $this->phpmailer->AltBody,
112
  'html' => $this->phpmailer->Body,
113
  )
114
  );
115
- } else {
116
- $this->set_content( $this->phpmailer->Body );
117
  }
118
  $this->set_return_path( $this->phpmailer->From );
119
  $this->set_reply_to( $this->phpmailer->getReplyToAddresses() );
@@ -225,10 +225,13 @@ abstract class MailerAbstract implements MailerInterface {
225
  */
226
  public function send() {
227
 
228
- $params = Options::array_merge_recursive( $this->get_default_params(), array(
229
- 'headers' => $this->get_headers(),
230
- 'body' => $this->get_body(),
231
- ) );
 
 
 
232
 
233
  $response = wp_safe_remote_post( $this->url, $params );
234
 
@@ -271,11 +274,14 @@ abstract class MailerAbstract implements MailerInterface {
271
  */
272
  protected function get_default_params() {
273
 
274
- return apply_filters( 'wp_mail_smtp_providers_mailer_get_default_params', array(
275
- 'timeout' => 15,
276
- 'httpversion' => '1.1',
277
- 'blocking' => true,
278
- ) );
 
 
 
279
  }
280
 
281
  /**
@@ -368,7 +374,7 @@ abstract class MailerAbstract implements MailerInterface {
368
  }
369
 
370
  $smtp_text[] = '<br><strong>Server:</strong>';
371
- $smtp_text[] = '<strong>OpenSSL:</strong> ' . ( extension_loaded( 'openssl' ) ? 'Yes' : 'No' );
372
  if ( function_exists( 'apache_get_modules' ) ) {
373
  $modules = apache_get_modules();
374
  $smtp_text[] = '<strong>Apache.mod_security:</strong> ' . ( in_array( 'mod_security', $modules, true ) || in_array( 'mod_security2', $modules, true ) ? 'Yes' : 'No' );
105
  )
106
  );
107
  $this->set_subject( $this->phpmailer->Subject );
108
+ if ( $this->phpmailer->ContentType === 'text/plain' ) {
109
+ $this->set_content( $this->phpmailer->Body );
110
+ } else {
111
  $this->set_content(
112
  array(
113
  'text' => $this->phpmailer->AltBody,
114
  'html' => $this->phpmailer->Body,
115
  )
116
  );
 
 
117
  }
118
  $this->set_return_path( $this->phpmailer->From );
119
  $this->set_reply_to( $this->phpmailer->getReplyToAddresses() );
225
  */
226
  public function send() {
227
 
228
+ $params = Options::array_merge_recursive(
229
+ $this->get_default_params(),
230
+ array(
231
+ 'headers' => $this->get_headers(),
232
+ 'body' => $this->get_body(),
233
+ )
234
+ );
235
 
236
  $response = wp_safe_remote_post( $this->url, $params );
237
 
274
  */
275
  protected function get_default_params() {
276
 
277
+ return apply_filters(
278
+ 'wp_mail_smtp_providers_mailer_get_default_params',
279
+ array(
280
+ 'timeout' => 15,
281
+ 'httpversion' => '1.1',
282
+ 'blocking' => true,
283
+ )
284
+ );
285
  }
286
 
287
  /**
374
  }
375
 
376
  $smtp_text[] = '<br><strong>Server:</strong>';
377
+ $smtp_text[] = '<strong>OpenSSL:</strong> ' . ( extension_loaded( 'openssl' ) && defined( 'OPENSSL_VERSION_TEXT' ) ? OPENSSL_VERSION_TEXT : 'No' );
378
  if ( function_exists( 'apache_get_modules' ) ) {
379
  $modules = apache_get_modules();
380
  $smtp_text[] = '<strong>Apache.mod_security:</strong> ' . ( in_array( 'mod_security', $modules, true ) || in_array( 'mod_security2', $modules, true ) ? 'Yes' : 'No' );
src/Providers/MailerInterface.php CHANGED
@@ -36,6 +36,15 @@ interface MailerInterface {
36
  */
37
  public function is_php_compatible();
38
 
 
 
 
 
 
 
 
 
 
39
  /**
40
  * Get the email body.
41
  *
36
  */
37
  public function is_php_compatible();
38
 
39
+ /**
40
+ * Whether the mailer has all its settings correctly set up and saved.
41
+ *
42
+ * @since 1.4.0
43
+ *
44
+ * @return bool
45
+ */
46
+ public function is_mailer_complete();
47
+
48
  /**
49
  * Get the email body.
50
  *
src/Providers/Mailgun/Mailer.php CHANGED
@@ -14,25 +14,55 @@ class Mailer extends MailerAbstract {
14
  /**
15
  * Which response code from HTTP provider is considered to be successful?
16
  *
 
 
17
  * @var int
18
  */
19
  protected $email_sent_code = 200;
20
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  /**
22
  * URL to make an API request to.
23
  *
 
 
24
  * @var string
25
  */
26
- protected $url = 'https://api.mailgun.net/v3/';
27
 
28
  /**
29
  * @inheritdoc
30
  */
31
  public function __construct( $phpmailer ) {
32
 
 
 
 
33
  // We want to prefill everything from \WPMailSMTP\MailCatcher class, which extends \PHPMailer.
34
  parent::__construct( $phpmailer );
35
 
 
 
 
 
 
36
  /*
37
  * Append the url with a domain,
38
  * to avoid passing the domain name as a query parameter with all requests.
@@ -342,4 +372,22 @@ class Mailer extends MailerAbstract {
342
 
343
  return implode( '<br>', $mg_text );
344
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
345
  }
14
  /**
15
  * Which response code from HTTP provider is considered to be successful?
16
  *
17
+ * @since 1.0.0
18
+ *
19
  * @var int
20
  */
21
  protected $email_sent_code = 200;
22
 
23
+ /**
24
+ * API endpoint used for sites from all regions.
25
+ *
26
+ * @since 1.4.0
27
+ *
28
+ * @var string
29
+ */
30
+ const API_BASE_US = 'https://api.mailgun.net/v3/';
31
+
32
+ /**
33
+ * API endpoint used for sites from EU region.
34
+ *
35
+ * @since 1.4.0
36
+ *
37
+ * @var string
38
+ */
39
+ const API_BASE_EU = 'https://api.eu.mailgun.net/v3/';
40
+
41
  /**
42
  * URL to make an API request to.
43
  *
44
+ * @since 1.0.0
45
+ *
46
  * @var string
47
  */
48
+ protected $url = '';
49
 
50
  /**
51
  * @inheritdoc
52
  */
53
  public function __construct( $phpmailer ) {
54
 
55
+ // Default value should be defined before the parent class contructor fires.
56
+ $this->url = self::API_BASE_US;
57
+
58
  // We want to prefill everything from \WPMailSMTP\MailCatcher class, which extends \PHPMailer.
59
  parent::__construct( $phpmailer );
60
 
61
+ // We have a special API URL to query in case of EU region.
62
+ if ( 'EU' === $this->options->get( $this->mailer, 'region' ) ) {
63
+ $this->url = self::API_BASE_EU;
64
+ }
65
+
66
  /*
67
  * Append the url with a domain,
68
  * to avoid passing the domain name as a query parameter with all requests.
372
 
373
  return implode( '<br>', $mg_text );
374
  }
375
+
376
+ /**
377
+ * @inheritdoc
378
+ */
379
+ public function is_mailer_complete() {
380
+
381
+ $options = $this->options->get_group( $this->mailer );
382
+
383
+ // API key is the only required option.
384
+ if (
385
+ ! empty( $options['api_key'] ) &&
386
+ ! empty( $options['domain'] )
387
+ ) {
388
+ return true;
389
+ }
390
+
391
+ return false;
392
+ }
393
  }
src/Providers/Mailgun/Options.php CHANGED
@@ -101,6 +101,54 @@ class Options extends OptionsAbstract {
101
  </div>
102
  </div>
103
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
104
  <?php
105
  }
106
  }
101
  </div>
102
  </div>
103
 
104
+ <!-- Region -->
105
+ <div id="wp-mail-smtp-setting-row-<?php echo esc_attr( $this->get_slug() ); ?>-region" class="wp-mail-smtp-setting-row wp-mail-smtp-setting-row-radio wp-mail-smtp-clear">
106
+ <div class="wp-mail-smtp-setting-label">
107
+ <label><?php esc_html_e( 'Region', 'wp-mail-smtp' ); ?></label>
108
+ </div>
109
+ <div class="wp-mail-smtp-setting-field">
110
+
111
+ <label for="wp-mail-smtp-setting-<?php echo esc_attr( $this->get_slug() ); ?>-region-us">
112
+ <input type="radio" id="wp-mail-smtp-setting-<?php echo esc_attr( $this->get_slug() ); ?>-region-us"
113
+ name="wp-mail-smtp[<?php echo esc_attr( $this->get_slug() ); ?>][region]" value="US"
114
+ <?php echo $this->options->is_const_defined( $this->get_slug(), 'region' ) ? 'disabled' : ''; ?>
115
+ <?php checked( 'US', $this->options->get( $this->get_slug(), 'region' ) ); ?>
116
+ />
117
+ <?php esc_html_e( 'US', 'wp-mail-smtp' ); ?>
118
+ </label>
119
+
120
+ <label for="wp-mail-smtp-setting-<?php echo esc_attr( $this->get_slug() ); ?>-region-eu">
121
+ <input type="radio" id="wp-mail-smtp-setting-<?php echo esc_attr( $this->get_slug() ); ?>-region-eu"
122
+ name="wp-mail-smtp[<?php echo esc_attr( $this->get_slug() ); ?>][region]" value="EU"
123
+ <?php echo $this->options->is_const_defined( $this->get_slug(), 'region' ) ? 'disabled' : ''; ?>
124
+ <?php checked( 'EU', $this->options->get( $this->get_slug(), 'region' ) ); ?>
125
+ />
126
+ <?php esc_html_e( 'EU', 'wp-mail-smtp' ); ?>
127
+ </label>
128
+
129
+ <p class="desc">
130
+ <?php esc_html_e( 'Define which endpoint you want to use for sending messages.', 'wp-mail-smtp' ); ?><br>
131
+ <?php esc_html_e( 'If you are operating under EU laws, you may be required to use EU region.', 'wp-mail-smtp' ); ?>
132
+ <?php
133
+ printf(
134
+ wp_kses(
135
+ /* translators: %s - URL to Mailgun.com page. */
136
+ __( '<a href="%s" rel="" target="_blank">More information</a> on Mailgun.com.', 'wp-mail-smtp' ),
137
+ array(
138
+ 'a' => array(
139
+ 'href' => array(),
140
+ 'rel' => array(),
141
+ 'target' => array(),
142
+ ),
143
+ )
144
+ ),
145
+ 'https://www.mailgun.com/regions'
146
+ );
147
+ ?>
148
+ </p>
149
+ </div>
150
+ </div>
151
+
152
  <?php
153
  }
154
  }
src/Providers/OptionsAbstract.php CHANGED
@@ -282,7 +282,7 @@ abstract class OptionsAbstract implements OptionsInterface {
282
  *
283
  * @return bool
284
  */
285
- protected function is_php_correct() {
286
  return version_compare( phpversion(), $this->php, '>=' );
287
  }
288
 
282
  *
283
  * @return bool
284
  */
285
+ public function is_php_correct() {
286
  return version_compare( phpversion(), $this->php, '>=' );
287
  }
288
 
src/Providers/Pepipost/Mailer.php CHANGED
@@ -12,4 +12,21 @@ use WPMailSMTP\Providers\MailerAbstract;
12
  */
13
  class Mailer extends MailerAbstract {
14
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  }
12
  */
13
  class Mailer extends MailerAbstract {
14
 
15
+ /**
16
+ * @inheritdoc
17
+ */
18
+ public function is_mailer_complete() {
19
+
20
+ $options = $this->options->get_group( $this->mailer );
21
+
22
+ // Host and Port are the only really required options.
23
+ if (
24
+ ! empty( $options['host'] ) &&
25
+ ! empty( $options['port'] )
26
+ ) {
27
+ return true;
28
+ }
29
+
30
+ return false;
31
+ }
32
  }
src/Providers/SMTP/Mailer.php CHANGED
@@ -12,4 +12,21 @@ use WPMailSMTP\Providers\MailerAbstract;
12
  */
13
  class Mailer extends MailerAbstract {
14
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  }
12
  */
13
  class Mailer extends MailerAbstract {
14
 
15
+ /**
16
+ * @inheritdoc
17
+ */
18
+ public function is_mailer_complete() {
19
+
20
+ $options = $this->options->get_group( $this->mailer );
21
+
22
+ // Host and Port are the only really required options.
23
+ if (
24
+ ! empty( $options['host'] ) &&
25
+ ! empty( $options['port'] )
26
+ ) {
27
+ return true;
28
+ }
29
+
30
+ return false;
31
+ }
32
  }
src/Providers/Sendgrid/Mailer.php CHANGED
@@ -52,7 +52,7 @@ class Mailer extends MailerAbstract {
52
 
53
  $body = parent::get_body();
54
 
55
- return wp_json_encode( $body );
56
  }
57
 
58
  /**
@@ -341,4 +341,19 @@ class Mailer extends MailerAbstract {
341
 
342
  return implode( '<br>', $mg_text );
343
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
344
  }
52
 
53
  $body = parent::get_body();
54
 
55
+ return function_exists( 'wp_json_encode' ) ? wp_json_encode( $body ) : json_encode( $body ); // phpcs:ignore
56
  }
57
 
58
  /**
341
 
342
  return implode( '<br>', $mg_text );
343
  }
344
+
345
+ /**
346
+ * @inheritdoc
347
+ */
348
+ public function is_mailer_complete() {
349
+
350
+ $options = $this->options->get_group( $this->mailer );
351
+
352
+ // API key is the only required option.
353
+ if ( ! empty( $options['api_key'] ) ) {
354
+ return true;
355
+ }
356
+
357
+ return false;
358
+ }
359
  }
uninstall.php CHANGED
@@ -20,6 +20,7 @@ if ( empty( $settings['general']['uninstall'] ) ) {
20
  $options = array(
21
  'wp_mail_smtp_initial_version',
22
  'wp_mail_smtp_version',
 
23
  'wp_mail_smtp',
24
  '_amn_smtp_last_checked',
25
  // Legacy options.
@@ -44,13 +45,15 @@ foreach ( $options as $option ) {
44
  delete_option( $option );
45
  }
46
 
47
- // Remove product annoucements.
48
- $annoucements = get_posts( array(
49
- 'post_type' => array( 'amn_smtp' ),
50
- 'post_status' => 'any',
51
- 'numberposts' => -1,
52
- 'fields' => 'ids',
53
- ) );
 
 
54
  if ( ! empty( $annoucements ) ) {
55
  foreach ( $annoucements as $annoucement ) {
56
  wp_delete_post( $annoucement, true );
20
  $options = array(
21
  'wp_mail_smtp_initial_version',
22
  'wp_mail_smtp_version',
23
+ 'wp_mail_smtp_debug',
24
  'wp_mail_smtp',
25
  '_amn_smtp_last_checked',
26
  // Legacy options.
45
  delete_option( $option );
46
  }
47
 
48
+ // Remove product announcements.
49
+ $annoucements = get_posts(
50
+ array(
51
+ 'post_type' => array( 'amn_smtp' ),
52
+ 'post_status' => 'any',
53
+ 'numberposts' => - 1,
54
+ 'fields' => 'ids',
55
+ )
56
+ );
57
  if ( ! empty( $annoucements ) ) {
58
  foreach ( $annoucements as $annoucement ) {
59
  wp_delete_post( $annoucement, true );
vendor/composer/ClassLoader.php CHANGED
@@ -377,7 +377,7 @@ class ClassLoader
377
  $subPath = $class;
378
  while (false !== $lastPos = strrpos($subPath, '\\')) {
379
  $subPath = substr($subPath, 0, $lastPos);
380
- $search = $subPath.'\\';
381
  if (isset($this->prefixDirsPsr4[$search])) {
382
  $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
383
  foreach ($this->prefixDirsPsr4[$search] as $dir) {
377
  $subPath = $class;
378
  while (false !== $lastPos = strrpos($subPath, '\\')) {
379
  $subPath = substr($subPath, 0, $lastPos);
380
+ $search = $subPath . '\\';
381
  if (isset($this->prefixDirsPsr4[$search])) {
382
  $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
383
  foreach ($this->prefixDirsPsr4[$search] as $dir) {
vendor/google/apiclient-services/src/Google/Service/Gmail.php CHANGED
@@ -68,6 +68,7 @@ class Google_Service_Gmail extends Google_Service
68
  public $users_messages;
69
  public $users_messages_attachments;
70
  public $users_settings;
 
71
  public $users_settings_filters;
72
  public $users_settings_forwardingAddresses;
73
  public $users_settings_sendAs;
@@ -682,6 +683,66 @@ class Google_Service_Gmail extends Google_Service
682
  )
683
  )
684
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
685
  $this->users_settings_filters = new Google_Service_Gmail_Resource_UsersSettingsFilters(
686
  $this,
687
  $this->serviceName,
68
  public $users_messages;
69
  public $users_messages_attachments;
70
  public $users_settings;
71
+ public $users_settings_delegates;
72
  public $users_settings_filters;
73
  public $users_settings_forwardingAddresses;
74
  public $users_settings_sendAs;
683
  )
684
  )
685
  );
686
+ $this->users_settings_delegates = new Google_Service_Gmail_Resource_UsersSettingsDelegates(
687
+ $this,
688
+ $this->serviceName,
689
+ 'delegates',
690
+ array(
691
+ 'methods' => array(
692
+ 'create' => array(
693
+ 'path' => '{userId}/settings/delegates',
694
+ 'httpMethod' => 'POST',
695
+ 'parameters' => array(
696
+ 'userId' => array(
697
+ 'location' => 'path',
698
+ 'type' => 'string',
699
+ 'required' => true,
700
+ ),
701
+ ),
702
+ ),'delete' => array(
703
+ 'path' => '{userId}/settings/delegates/{delegateEmail}',
704
+ 'httpMethod' => 'DELETE',
705
+ 'parameters' => array(
706
+ 'userId' => array(
707
+ 'location' => 'path',
708
+ 'type' => 'string',
709
+ 'required' => true,
710
+ ),
711
+ 'delegateEmail' => array(
712
+ 'location' => 'path',
713
+ 'type' => 'string',
714
+ 'required' => true,
715
+ ),
716
+ ),
717
+ ),'get' => array(
718
+ 'path' => '{userId}/settings/delegates/{delegateEmail}',
719
+ 'httpMethod' => 'GET',
720
+ 'parameters' => array(
721
+ 'userId' => array(
722
+ 'location' => 'path',
723
+ 'type' => 'string',
724
+ 'required' => true,
725
+ ),
726
+ 'delegateEmail' => array(
727
+ 'location' => 'path',
728
+ 'type' => 'string',
729
+ 'required' => true,
730
+ ),
731
+ ),
732
+ ),'list' => array(
733
+ 'path' => '{userId}/settings/delegates',
734
+ 'httpMethod' => 'GET',
735
+ 'parameters' => array(
736
+ 'userId' => array(
737
+ 'location' => 'path',
738
+ 'type' => 'string',
739
+ 'required' => true,
740
+ ),
741
+ ),
742
+ ),
743
+ )
744
+ )
745
+ );
746
  $this->users_settings_filters = new Google_Service_Gmail_Resource_UsersSettingsFilters(
747
  $this,
748
  $this->serviceName,
vendor/google/apiclient-services/src/Google/Service/Gmail/Delegate.php ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_Gmail_Delegate extends Google_Model
19
+ {
20
+ public $delegateEmail;
21
+ public $verificationStatus;
22
+
23
+ public function setDelegateEmail($delegateEmail)
24
+ {
25
+ $this->delegateEmail = $delegateEmail;
26
+ }
27
+ public function getDelegateEmail()
28
+ {
29
+ return $this->delegateEmail;
30
+ }
31
+ public function setVerificationStatus($verificationStatus)
32
+ {
33
+ $this->verificationStatus = $verificationStatus;
34
+ }
35
+ public function getVerificationStatus()
36
+ {
37
+ return $this->verificationStatus;
38
+ }
39
+ }
vendor/google/apiclient-services/src/Google/Service/Gmail/ListDelegatesResponse.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_Gmail_ListDelegatesResponse extends Google_Collection
19
+ {
20
+ protected $collection_key = 'delegates';
21
+ protected $delegatesType = 'Google_Service_Gmail_Delegate';
22
+ protected $delegatesDataType = 'array';
23
+
24
+ /**
25
+ * @param Google_Service_Gmail_Delegate
26
+ */
27
+ public function setDelegates($delegates)
28
+ {
29
+ $this->delegates = $delegates;
30
+ }
31
+ /**
32
+ * @return Google_Service_Gmail_Delegate
33
+ */
34
+ public function getDelegates()
35
+ {
36
+ return $this->delegates;
37
+ }
38
+ }
vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersSettingsDelegates.php ADDED
@@ -0,0 +1,119 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ /**
19
+ * The "delegates" collection of methods.
20
+ * Typical usage is:
21
+ * <code>
22
+ * $gmailService = new Google_Service_Gmail(...);
23
+ * $delegates = $gmailService->delegates;
24
+ * </code>
25
+ */
26
+ class Google_Service_Gmail_Resource_UsersSettingsDelegates extends Google_Service_Resource
27
+ {
28
+ /**
29
+ * Adds a delegate with its verification status set directly to accepted,
30
+ * without sending any verification email. The delegate user must be a member of
31
+ * the same G Suite organization as the delegator user.
32
+ *
33
+ * Gmail imposes limtations on the number of delegates and delegators each user
34
+ * in a G Suite organization can have. These limits depend on your organization,
35
+ * but in general each user can have up to 25 delegates and up to 10 delegators.
36
+ *
37
+ * Note that a delegate user must be referred to by their primary email address,
38
+ * and not an email alias.
39
+ *
40
+ * Also note that when a new delegate is created, there may be up to a one
41
+ * minute delay before the new delegate is available for use.
42
+ *
43
+ * This method is only available to service account clients that have been
44
+ * delegated domain-wide authority. (delegates.create)
45
+ *
46
+ * @param string $userId User's email address. The special value "me" can be
47
+ * used to indicate the authenticated user.
48
+ * @param Google_Service_Gmail_Delegate $postBody
49
+ * @param array $optParams Optional parameters.
50
+ * @return Google_Service_Gmail_Delegate
51
+ */
52
+ public function create($userId, Google_Service_Gmail_Delegate $postBody, $optParams = array())
53
+ {
54
+ $params = array('userId' => $userId, 'postBody' => $postBody);
55
+ $params = array_merge($params, $optParams);
56
+ return $this->call('create', array($params), "Google_Service_Gmail_Delegate");
57
+ }
58
+ /**
59
+ * Removes the specified delegate (which can be of any verification status), and
60
+ * revokes any verification that may have been required for using it.
61
+ *
62
+ * Note that a delegate user must be referred to by their primary email address,
63
+ * and not an email alias.
64
+ *
65
+ * This method is only available to service account clients that have been
66
+ * delegated domain-wide authority. (delegates.delete)
67
+ *
68
+ * @param string $userId User's email address. The special value "me" can be
69
+ * used to indicate the authenticated user.
70
+ * @param string $delegateEmail The email address of the user to be removed as a
71
+ * delegate.
72
+ * @param array $optParams Optional parameters.
73
+ */
74
+ public function delete($userId, $delegateEmail, $optParams = array())
75
+ {
76
+ $params = array('userId' => $userId, 'delegateEmail' => $delegateEmail);
77
+ $params = array_merge($params, $optParams);
78
+ return $this->call('delete', array($params));
79
+ }
80
+ /**
81
+ * Gets the specified delegate.
82
+ *
83
+ * Note that a delegate user must be referred to by their primary email address,
84
+ * and not an email alias.
85
+ *
86
+ * This method is only available to service account clients that have been
87
+ * delegated domain-wide authority. (delegates.get)
88
+ *
89
+ * @param string $userId User's email address. The special value "me" can be
90
+ * used to indicate the authenticated user.
91
+ * @param string $delegateEmail The email address of the user whose delegate
92
+ * relationship is to be retrieved.
93
+ * @param array $optParams Optional parameters.
94
+ * @return Google_Service_Gmail_Delegate
95
+ */
96
+ public function get($userId, $delegateEmail, $optParams = array())
97
+ {
98
+ $params = array('userId' => $userId, 'delegateEmail' => $delegateEmail);
99
+ $params = array_merge($params, $optParams);
100
+ return $this->call('get', array($params), "Google_Service_Gmail_Delegate");
101
+ }
102
+ /**
103
+ * Lists the delegates for the specified account.
104
+ *
105
+ * This method is only available to service account clients that have been
106
+ * delegated domain-wide authority. (delegates.listUsersSettingsDelegates)
107
+ *
108
+ * @param string $userId User's email address. The special value "me" can be
109
+ * used to indicate the authenticated user.
110
+ * @param array $optParams Optional parameters.
111
+ * @return Google_Service_Gmail_ListDelegatesResponse
112
+ */
113
+ public function listUsersSettingsDelegates($userId, $optParams = array())
114
+ {
115
+ $params = array('userId' => $userId);
116
+ $params = array_merge($params, $optParams);
117
+ return $this->call('list', array($params), "Google_Service_Gmail_ListDelegatesResponse");
118
+ }
119
+ }
vendor/google/auth/src/Credentials/GCECredentials.php CHANGED
@@ -69,6 +69,19 @@ class GCECredentials extends CredentialsLoader
69
  */
70
  const FLAVOR_HEADER = 'Metadata-Flavor';
71
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  /**
73
  * Flag used to ensure that the onGCE test is only done once;.
74
  *
@@ -126,28 +139,29 @@ class GCECredentials extends CredentialsLoader
126
  $httpHandler = HttpHandlerFactory::build();
127
  }
128
  $checkUri = 'http://' . self::METADATA_IP;
129
- try {
130
- // Comment from: oauth2client/client.py
131
- //
132
- // Note: the explicit `timeout` below is a workaround. The underlying
133
- // issue is that resolving an unknown host on some networks will take
134
- // 20-30 seconds; making this timeout short fixes the issue, but
135
- // could lead to false negatives in the event that we are on GCE, but
136
- // the metadata resolution was particularly slow. The latter case is
137
- // "unlikely".
138
- $resp = $httpHandler(
139
- new Request('GET', $checkUri),
140
- ['timeout' => 0.3]
141
- );
142
-
143
- return $resp->getHeaderLine(self::FLAVOR_HEADER) == 'Google';
144
- } catch (ClientException $e) {
145
- return false;
146
- } catch (ServerException $e) {
147
- return false;
148
- } catch (RequestException $e) {
149
- return false;
150
  }
 
151
  }
152
 
153
  /**
69
  */
70
  const FLAVOR_HEADER = 'Metadata-Flavor';
71
 
72
+ /**
73
+ * Note: the explicit `timeout` and `tries` below is a workaround. The underlying
74
+ * issue is that resolving an unknown host on some networks will take
75
+ * 20-30 seconds; making this timeout short fixes the issue, but
76
+ * could lead to false negatives in the event that we are on GCE, but
77
+ * the metadata resolution was particularly slow. The latter case is
78
+ * "unlikely" since the expected 4-nines time is about 0.5 seconds.
79
+ * This allows us to limit the total ping maximum timeout to 1.5 seconds
80
+ * for developer desktop scenarios.
81
+ */
82
+ const MAX_COMPUTE_PING_TRIES = 3;
83
+ const COMPUTE_PING_CONNECTION_TIMEOUT_S = 0.5;
84
+
85
  /**
86
  * Flag used to ensure that the onGCE test is only done once;.
87
  *
139
  $httpHandler = HttpHandlerFactory::build();
140
  }
141
  $checkUri = 'http://' . self::METADATA_IP;
142
+ for ($i = 1; $i <= self::MAX_COMPUTE_PING_TRIES; $i++) {
143
+ try {
144
+ // Comment from: oauth2client/client.py
145
+ //
146
+ // Note: the explicit `timeout` below is a workaround. The underlying
147
+ // issue is that resolving an unknown host on some networks will take
148
+ // 20-30 seconds; making this timeout short fixes the issue, but
149
+ // could lead to false negatives in the event that we are on GCE, but
150
+ // the metadata resolution was particularly slow. The latter case is
151
+ // "unlikely".
152
+ $resp = $httpHandler(
153
+ new Request('GET', $checkUri),
154
+ ['timeout' => self::COMPUTE_PING_CONNECTION_TIMEOUT_S]
155
+ );
156
+
157
+ return $resp->getHeaderLine(self::FLAVOR_HEADER) == 'Google';
158
+ } catch (ClientException $e) {
159
+ } catch (ServerException $e) {
160
+ } catch (RequestException $e) {
161
+ }
162
+ $httpHandler = HttpHandlerFactory::build();
163
  }
164
+ return false;
165
  }
166
 
167
  /**
vendor/google/auth/src/Credentials/InsecureCredentials.php ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2018 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ namespace Google\Auth\Credentials;
19
+
20
+ use Google\Auth\FetchAuthTokenInterface;
21
+
22
+ /**
23
+ * Provides a set of credentials that will always return an empty access token.
24
+ * This is useful for APIs which do not require authentication, for local
25
+ * service emulators, and for testing.
26
+ */
27
+ class InsecureCredentials implements FetchAuthTokenInterface
28
+ {
29
+ /**
30
+ * @var array
31
+ */
32
+ private $token = [
33
+ 'access_token' => ''
34
+ ];
35
+
36
+ /**
37
+ * Fetches the auth token. In this case it returns an empty string.
38
+ *
39
+ * @param callable $httpHandler
40
+ * @return array
41
+ */
42
+ public function fetchAuthToken(callable $httpHandler = null)
43
+ {
44
+ return $this->token;
45
+ }
46
+
47
+ /**
48
+ * Returns the cache key. In this case it returns a null value, disabling
49
+ * caching.
50
+ *
51
+ * @return string|null
52
+ */
53
+ public function getCacheKey()
54
+ {
55
+ return null;
56
+ }
57
+
58
+ /**
59
+ * Fetches the last received token. In this case, it returns the same empty string
60
+ * auth token.
61
+ *
62
+ * @return array
63
+ */
64
+ public function getLastReceivedToken()
65
+ {
66
+ return $this->token;
67
+ }
68
+ }
vendor/google/auth/src/Credentials/UserRefreshCredentials.php CHANGED
@@ -33,6 +33,11 @@ use Google\Auth\OAuth2;
33
  */
34
  class UserRefreshCredentials extends CredentialsLoader
35
  {
 
 
 
 
 
36
  /**
37
  * The OAuth2 instance used to conduct authorization.
38
  *
@@ -80,6 +85,22 @@ class UserRefreshCredentials extends CredentialsLoader
80
  'scope' => $scope,
81
  'tokenCredentialUri' => self::TOKEN_CREDENTIAL_URI,
82
  ]);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
  }
84
 
85
  /**
33
  */
34
  class UserRefreshCredentials extends CredentialsLoader
35
  {
36
+ const CLOUD_SDK_CLIENT_ID =
37
+ '764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com';
38
+
39
+ const SUPPRESS_CLOUD_SDK_CREDS_WARNING_ENV = 'SUPPRESS_GCLOUD_CREDS_WARNING';
40
+
41
  /**
42
  * The OAuth2 instance used to conduct authorization.
43
  *
85
  'scope' => $scope,
86
  'tokenCredentialUri' => self::TOKEN_CREDENTIAL_URI,
87
  ]);
88
+ if ($jsonKey['client_id'] === self::CLOUD_SDK_CLIENT_ID
89
+ && getenv(self::SUPPRESS_CLOUD_SDK_CREDS_WARNING_ENV) !== 'true') {
90
+ trigger_error(
91
+ 'Your application has authenticated using end user credentials '
92
+ . 'from Google Cloud SDK. We recommend that most server '
93
+ . 'applications use service accounts instead. If your '
94
+ . 'application continues to use end user credentials '
95
+ . 'from Cloud SDK, you might receive a "quota exceeded" '
96
+ . 'or "API not enabled" error. For more information about '
97
+ . 'service accounts, see '
98
+ . 'https://cloud.google.com/docs/authentication/. '
99
+ . 'To disable this warning, set '
100
+ . self::SUPPRESS_CLOUD_SDK_CREDS_WARNING_ENV
101
+ . ' environment variable to "true".',
102
+ E_USER_WARNING);
103
+ }
104
  }
105
 
106
  /**
vendor/google/auth/src/CredentialsLoader.php CHANGED
@@ -17,6 +17,7 @@
17
 
18
  namespace Google\Auth;
19
 
 
20
  use Google\Auth\Credentials\ServiceAccountCredentials;
21
  use Google\Auth\Credentials\UserRefreshCredentials;
22
 
@@ -26,7 +27,7 @@ use Google\Auth\Credentials\UserRefreshCredentials;
26
  */
27
  abstract class CredentialsLoader implements FetchAuthTokenInterface
28
  {
29
- const TOKEN_CREDENTIAL_URI = 'https://www.googleapis.com/oauth2/v4/token';
30
  const ENV_VAR = 'GOOGLE_APPLICATION_CREDENTIALS';
31
  const WELL_KNOWN_PATH = 'gcloud/application_default_credentials.json';
32
  const NON_WINDOWS_WELL_KNOWN_PATH_BASE = '.config';
@@ -120,11 +121,13 @@ abstract class CredentialsLoader implements FetchAuthTokenInterface
120
 
121
  if ($jsonKey['type'] == 'service_account') {
122
  return new ServiceAccountCredentials($scope, $jsonKey);
123
- } elseif ($jsonKey['type'] == 'authorized_user') {
 
 
124
  return new UserRefreshCredentials($scope, $jsonKey);
125
- } else {
126
- throw new \InvalidArgumentException('invalid value in the type field');
127
  }
 
 
128
  }
129
 
130
  /**
@@ -174,6 +177,16 @@ abstract class CredentialsLoader implements FetchAuthTokenInterface
174
  }
175
  }
176
 
 
 
 
 
 
 
 
 
 
 
177
  /**
178
  * export a callback function which updates runtime metadata.
179
  *
17
 
18
  namespace Google\Auth;
19
 
20
+ use Google\Auth\Credentials\InsecureCredentials;
21
  use Google\Auth\Credentials\ServiceAccountCredentials;
22
  use Google\Auth\Credentials\UserRefreshCredentials;
23
 
27
  */
28
  abstract class CredentialsLoader implements FetchAuthTokenInterface
29
  {
30
+ const TOKEN_CREDENTIAL_URI = 'https://oauth2.googleapis.com/token';
31
  const ENV_VAR = 'GOOGLE_APPLICATION_CREDENTIALS';
32
  const WELL_KNOWN_PATH = 'gcloud/application_default_credentials.json';
33
  const NON_WINDOWS_WELL_KNOWN_PATH_BASE = '.config';
121
 
122
  if ($jsonKey['type'] == 'service_account') {
123
  return new ServiceAccountCredentials($scope, $jsonKey);
124
+ }
125
+
126
+ if ($jsonKey['type'] == 'authorized_user') {
127
  return new UserRefreshCredentials($scope, $jsonKey);
 
 
128
  }
129
+
130
+ throw new \InvalidArgumentException('invalid value in the type field');
131
  }
132
 
133
  /**
177
  }
178
  }
179
 
180
+ /**
181
+ * Create a new instance of InsecureCredentials.
182
+ *
183
+ * @return InsecureCredentials
184
+ */
185
+ public static function makeInsecureCredentials()
186
+ {
187
+ return new InsecureCredentials();
188
+ }
189
+
190
  /**
191
  * export a callback function which updates runtime metadata.
192
  *
vendor/google/auth/src/OAuth2.php CHANGED
@@ -516,7 +516,9 @@ class OAuth2 implements FetchAuthTokenInterface
516
  {
517
  if (is_string($this->scope)) {
518
  return $this->scope;
519
- } elseif (is_array($this->scope)) {
 
 
520
  return implode(':', $this->scope);
521
  }
522
 
@@ -543,14 +545,14 @@ class OAuth2 implements FetchAuthTokenInterface
543
  parse_str($body, $res);
544
 
545
  return $res;
546
- } else {
547
- // Assume it's JSON; if it's not throw an exception
548
- if (null === $res = json_decode($body, true)) {
549
- throw new \Exception('Invalid JSON response');
550
- }
551
 
552
- return $res;
 
 
553
  }
 
 
554
  }
555
 
556
  /**
@@ -804,15 +806,21 @@ class OAuth2 implements FetchAuthTokenInterface
804
  // state.
805
  if (!is_null($this->code)) {
806
  return 'authorization_code';
807
- } elseif (!is_null($this->refreshToken)) {
 
 
808
  return 'refresh_token';
809
- } elseif (!is_null($this->username) && !is_null($this->password)) {
 
 
810
  return 'password';
811
- } elseif (!is_null($this->issuer) && !is_null($this->signingKey)) {
 
 
812
  return self::JWT_URN;
813
- } else {
814
- return null;
815
  }
 
 
816
  }
817
 
818
  /**
@@ -1119,7 +1127,9 @@ class OAuth2 implements FetchAuthTokenInterface
1119
  {
1120
  if (!is_null($this->expiresAt)) {
1121
  return $this->expiresAt;
1122
- } elseif (!is_null($this->issuedAt) && !is_null($this->expiresIn)) {
 
 
1123
  return $this->issuedAt + $this->expiresIn;
1124
  }
1125
 
516
  {
517
  if (is_string($this->scope)) {
518
  return $this->scope;
519
+ }
520
+
521
+ if (is_array($this->scope)) {
522
  return implode(':', $this->scope);
523
  }
524
 
545
  parse_str($body, $res);
546
 
547
  return $res;
548
+ }
 
 
 
 
549
 
550
+ // Assume it's JSON; if it's not throw an exception
551
+ if (null === $res = json_decode($body, true)) {
552
+ throw new \Exception('Invalid JSON response');
553
  }
554
+
555
+ return $res;
556
  }
557
 
558
  /**
806
  // state.
807
  if (!is_null($this->code)) {
808
  return 'authorization_code';
809
+ }
810
+
811
+ if (!is_null($this->refreshToken)) {
812
  return 'refresh_token';
813
+ }
814
+
815
+ if (!is_null($this->username) && !is_null($this->password)) {
816
  return 'password';
817
+ }
818
+
819
+ if (!is_null($this->issuer) && !is_null($this->signingKey)) {
820
  return self::JWT_URN;
 
 
821
  }
822
+
823
+ return null;
824
  }
825
 
826
  /**
1127
  {
1128
  if (!is_null($this->expiresAt)) {
1129
  return $this->expiresAt;
1130
+ }
1131
+
1132
+ if (!is_null($this->issuedAt) && !is_null($this->expiresIn)) {
1133
  return $this->issuedAt + $this->expiresIn;
1134
  }
1135
 
vendor/monolog/monolog/src/Monolog/ErrorHandler.php CHANGED
@@ -14,6 +14,7 @@ namespace Monolog;
14
  use Psr\Log\LoggerInterface;
15
  use Psr\Log\LogLevel;
16
  use Monolog\Handler\AbstractHandler;
 
17
 
18
  /**
19
  * Monolog error handler
@@ -38,6 +39,7 @@ class ErrorHandler
38
  private $hasFatalErrorHandler;
39
  private $fatalLevel;
40
  private $reservedMemory;
 
41
  private static $fatalErrors = array(E_ERROR, E_PARSE, E_CORE_ERROR, E_COMPILE_ERROR, E_USER_ERROR);
42
 
43
  public function __construct(LoggerInterface $logger)
@@ -132,7 +134,7 @@ class ErrorHandler
132
  {
133
  $this->logger->log(
134
  $this->uncaughtExceptionLevel === null ? LogLevel::ERROR : $this->uncaughtExceptionLevel,
135
- sprintf('Uncaught Exception %s: "%s" at %s line %s', get_class($e), $e->getMessage(), $e->getFile(), $e->getLine()),
136
  array('exception' => $e)
137
  );
138
 
@@ -156,6 +158,13 @@ class ErrorHandler
156
  if (!$this->hasFatalErrorHandler || !in_array($code, self::$fatalErrors, true)) {
157
  $level = isset($this->errorLevelMap[$code]) ? $this->errorLevelMap[$code] : LogLevel::CRITICAL;
158
  $this->logger->log($level, self::codeToString($code).': '.$message, array('code' => $code, 'message' => $message, 'file' => $file, 'line' => $line));
 
 
 
 
 
 
 
159
  }
160
 
161
  if ($this->previousErrorHandler === true) {
@@ -177,7 +186,7 @@ class ErrorHandler
177
  $this->logger->log(
178
  $this->fatalLevel === null ? LogLevel::ALERT : $this->fatalLevel,
179
  'Fatal Error ('.self::codeToString($lastError['type']).'): '.$lastError['message'],
180
- array('code' => $lastError['type'], 'message' => $lastError['message'], 'file' => $lastError['file'], 'line' => $lastError['line'])
181
  );
182
 
183
  if ($this->logger instanceof Logger) {
14
  use Psr\Log\LoggerInterface;
15
  use Psr\Log\LogLevel;
16
  use Monolog\Handler\AbstractHandler;
17
+ use Monolog\Registry;
18
 
19
  /**
20
  * Monolog error handler
39
  private $hasFatalErrorHandler;
40
  private $fatalLevel;
41
  private $reservedMemory;
42
+ private $lastFatalTrace;
43
  private static $fatalErrors = array(E_ERROR, E_PARSE, E_CORE_ERROR, E_COMPILE_ERROR, E_USER_ERROR);
44
 
45
  public function __construct(LoggerInterface $logger)
134
  {
135
  $this->logger->log(
136
  $this->uncaughtExceptionLevel === null ? LogLevel::ERROR : $this->uncaughtExceptionLevel,
137
+ sprintf('Uncaught Exception %s: "%s" at %s line %s', Utils::getClass($e), $e->getMessage(), $e->getFile(), $e->getLine()),
138
  array('exception' => $e)
139
  );
140
 
158
  if (!$this->hasFatalErrorHandler || !in_array($code, self::$fatalErrors, true)) {
159
  $level = isset($this->errorLevelMap[$code]) ? $this->errorLevelMap[$code] : LogLevel::CRITICAL;
160
  $this->logger->log($level, self::codeToString($code).': '.$message, array('code' => $code, 'message' => $message, 'file' => $file, 'line' => $line));
161
+ } else {
162
+ // http://php.net/manual/en/function.debug-backtrace.php
163
+ // As of 5.3.6, DEBUG_BACKTRACE_IGNORE_ARGS option was added.
164
+ // Any version less than 5.3.6 must use the DEBUG_BACKTRACE_IGNORE_ARGS constant value '2'.
165
+ $trace = debug_backtrace((PHP_VERSION_ID < 50306) ? 2 : DEBUG_BACKTRACE_IGNORE_ARGS);
166
+ array_shift($trace); // Exclude handleError from trace
167
+ $this->lastFatalTrace = $trace;
168
  }
169
 
170
  if ($this->previousErrorHandler === true) {
186
  $this->logger->log(
187
  $this->fatalLevel === null ? LogLevel::ALERT : $this->fatalLevel,
188
  'Fatal Error ('.self::codeToString($lastError['type']).'): '.$lastError['message'],
189
+ array('code' => $lastError['type'], 'message' => $lastError['message'], 'file' => $lastError['file'], 'line' => $lastError['line'], 'trace' => $this->lastFatalTrace)
190
  );
191
 
192
  if ($this->logger instanceof Logger) {
vendor/monolog/monolog/src/Monolog/Formatter/FluentdFormatter.php CHANGED
@@ -62,6 +62,7 @@ class FluentdFormatter implements FormatterInterface
62
 
63
  $message = array(
64
  'message' => $record['message'],
 
65
  'extra' => $record['extra'],
66
  );
67
 
62
 
63
  $message = array(
64
  'message' => $record['message'],
65
+ 'context' => $record['context'],
66
  'extra' => $record['extra'],
67
  );
68
 
vendor/monolog/monolog/src/Monolog/Formatter/HtmlFormatter.php CHANGED
@@ -58,7 +58,7 @@ class HtmlFormatter extends NormalizerFormatter
58
  $td = '<pre>'.htmlspecialchars($td, ENT_NOQUOTES, 'UTF-8').'</pre>';
59
  }
60
 
61
- return "<tr style=\"padding: 4px;spacing: 0;text-align: left;\">\n<th style=\"background: #cccccc\" width=\"100px\">$th:</th>\n<td style=\"padding: 4px;spacing: 0;text-align: left;background: #eeeeee\">".$td."</td>\n</tr>";
62
  }
63
 
64
  /**
58
  $td = '<pre>'.htmlspecialchars($td, ENT_NOQUOTES, 'UTF-8').'</pre>';
59
  }
60
 
61
+ return "<tr style=\"padding: 4px;text-align: left;\">\n<th style=\"vertical-align: top;background: #ccc;color: #000\" width=\"100\">$th:</th>\n<td style=\"padding: 4px;text-align: left;vertical-align: top;background: #eee;color: #000\">".$td."</td>\n</tr>";
62
  }
63
 
64
  /**
vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php CHANGED
@@ -12,6 +12,7 @@
12
  namespace Monolog\Formatter;
13
 
14
  use Exception;
 
15
  use Throwable;
16
 
17
  /**
@@ -138,18 +139,23 @@ class JsonFormatter extends NormalizerFormatter
138
  *
139
  * @return mixed
140
  */
141
- protected function normalize($data)
142
  {
 
 
 
 
143
  if (is_array($data) || $data instanceof \Traversable) {
144
  $normalized = array();
145
 
146
  $count = 1;
147
  foreach ($data as $key => $value) {
148
- if ($count++ >= 1000) {
149
- $normalized['...'] = 'Over 1000 items, aborting normalization';
150
  break;
151
  }
152
- $normalized[$key] = $this->normalize($value);
 
153
  }
154
 
155
  return $normalized;
@@ -174,11 +180,11 @@ class JsonFormatter extends NormalizerFormatter
174
  {
175
  // TODO 2.0 only check for Throwable
176
  if (!$e instanceof Exception && !$e instanceof Throwable) {
177
- throw new \InvalidArgumentException('Exception/Throwable expected, got '.gettype($e).' / '.get_class($e));
178
  }
179
 
180
  $data = array(
181
- 'class' => get_class($e),
182
  'message' => $e->getMessage(),
183
  'code' => $e->getCode(),
184
  'file' => $e->getFile().':'.$e->getLine(),
12
  namespace Monolog\Formatter;
13
 
14
  use Exception;
15
+ use Monolog\Utils;
16
  use Throwable;
17
 
18
  /**
139
  *
140
  * @return mixed
141
  */
142
+ protected function normalize($data, $depth = 0)
143
  {
144
+ if ($depth > 9) {
145
+ return 'Over 9 levels deep, aborting normalization';
146
+ }
147
+
148
  if (is_array($data) || $data instanceof \Traversable) {
149
  $normalized = array();
150
 
151
  $count = 1;
152
  foreach ($data as $key => $value) {
153
+ if ($count++ > 1000) {
154
+ $normalized['...'] = 'Over 1000 items ('.count($data).' total), aborting normalization';
155
  break;
156
  }
157
+
158
+ $normalized[$key] = $this->normalize($value, $depth+1);
159
  }
160
 
161
  return $normalized;
180
  {
181
  // TODO 2.0 only check for Throwable
182
  if (!$e instanceof Exception && !$e instanceof Throwable) {
183
+ throw new \InvalidArgumentException('Exception/Throwable expected, got '.gettype($e).' / '.Utils::getClass($e));
184
  }
185
 
186
  $data = array(
187
+ 'class' => Utils::getClass($e),
188
  'message' => $e->getMessage(),
189
  'code' => $e->getCode(),
190
  'file' => $e->getFile().':'.$e->getLine(),
vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php CHANGED
@@ -11,6 +11,8 @@
11
 
12
  namespace Monolog\Formatter;
13
 
 
 
14
  /**
15
  * Formats incoming records into a one-line string
16
  *
@@ -129,17 +131,17 @@ class LineFormatter extends NormalizerFormatter
129
  {
130
  // TODO 2.0 only check for Throwable
131
  if (!$e instanceof \Exception && !$e instanceof \Throwable) {
132
- throw new \InvalidArgumentException('Exception/Throwable expected, got '.gettype($e).' / '.get_class($e));
133
  }
134
 
135
  $previousText = '';
136
  if ($previous = $e->getPrevious()) {
137
  do {
138
- $previousText .= ', '.get_class($previous).'(code: '.$previous->getCode().'): '.$previous->getMessage().' at '.$previous->getFile().':'.$previous->getLine();
139
  } while ($previous = $previous->getPrevious());
140
  }
141
 
142
- $str = '[object] ('.get_class($e).'(code: '.$e->getCode().'): '.$e->getMessage().' at '.$e->getFile().':'.$e->getLine().$previousText.')';
143
  if ($this->includeStacktraces) {
144
  $str .= "\n[stacktrace]\n".$e->getTraceAsString()."\n";
145
  }
11
 
12
  namespace Monolog\Formatter;
13
 
14
+ use Monolog\Utils;
15
+
16
  /**
17
  * Formats incoming records into a one-line string
18
  *
131
  {
132
  // TODO 2.0 only check for Throwable
133
  if (!$e instanceof \Exception && !$e instanceof \Throwable) {
134
+ throw new \InvalidArgumentException('Exception/Throwable expected, got '.gettype($e).' / '.Utils::getClass($e));
135
  }
136
 
137
  $previousText = '';
138
  if ($previous = $e->getPrevious()) {
139
  do {
140
+ $previousText .= ', '.Utils::getClass($previous).'(code: '.$previous->getCode().'): '.$previous->getMessage().' at '.$previous->getFile().':'.$previous->getLine();
141
  } while ($previous = $previous->getPrevious());
142
  }
143
 
144
+ $str = '[object] ('.Utils::getClass($e).'(code: '.$e->getCode().'): '.$e->getMessage().' at '.$e->getFile().':'.$e->getLine().$previousText.')';
145
  if ($this->includeStacktraces) {
146
  $str .= "\n[stacktrace]\n".$e->getTraceAsString()."\n";
147
  }
vendor/monolog/monolog/src/Monolog/Formatter/MongoDBFormatter.php CHANGED
@@ -11,6 +11,8 @@
11
 
12
  namespace Monolog\Formatter;
13
 
 
 
14
  /**
15
  * Formats a record for use with the MongoDBHandler.
16
  *
@@ -75,7 +77,7 @@ class MongoDBFormatter implements FormatterInterface
75
  protected function formatObject($value, $nestingLevel)
76
  {
77
  $objectVars = get_object_vars($value);
78
- $objectVars['class'] = get_class($value);
79
 
80
  return $this->formatArray($objectVars, $nestingLevel);
81
  }
@@ -83,7 +85,7 @@ class MongoDBFormatter implements FormatterInterface
83
  protected function formatException(\Exception $exception, $nestingLevel)
84
  {
85
  $formattedException = array(
86
- 'class' => get_class($exception),
87
  'message' => $exception->getMessage(),
88
  'code' => $exception->getCode(),
89
  'file' => $exception->getFile() . ':' . $exception->getLine(),
11
 
12
  namespace Monolog\Formatter;
13
 
14
+ use Monolog\Utils;
15
+
16
  /**
17
  * Formats a record for use with the MongoDBHandler.
18
  *
77
  protected function formatObject($value, $nestingLevel)
78
  {
79
  $objectVars = get_object_vars($value);
80
+ $objectVars['class'] = Utils::getClass($value);
81
 
82
  return $this->formatArray($objectVars, $nestingLevel);
83
  }
85
  protected function formatException(\Exception $exception, $nestingLevel)
86
  {
87
  $formattedException = array(
88
+ 'class' => Utils::getClass($exception),
89
  'message' => $exception->getMessage(),
90
  'code' => $exception->getCode(),
91
  'file' => $exception->getFile() . ':' . $exception->getLine(),
vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php CHANGED
@@ -12,6 +12,7 @@
12
  namespace Monolog\Formatter;
13
 
14
  use Exception;
 
15
 
16
  /**
17
  * Normalizes incoming records to remove objects/resources so it's easier to dump to various targets
@@ -55,8 +56,12 @@ class NormalizerFormatter implements FormatterInterface
55
  return $records;
56
  }
57
 
58
- protected function normalize($data)
59
  {
 
 
 
 
60
  if (null === $data || is_scalar($data)) {
61
  if (is_float($data)) {
62
  if (is_infinite($data)) {
@@ -75,11 +80,12 @@ class NormalizerFormatter implements FormatterInterface
75
 
76
  $count = 1;
77
  foreach ($data as $key => $value) {
78
- if ($count++ >= 1000) {
79
  $normalized['...'] = 'Over 1000 items ('.count($data).' total), aborting normalization';
80
  break;
81
  }
82
- $normalized[$key] = $this->normalize($value);
 
83
  }
84
 
85
  return $normalized;
@@ -103,7 +109,7 @@ class NormalizerFormatter implements FormatterInterface
103
  $value = $this->toJson($data, true);
104
  }
105
 
106
- return sprintf("[object] (%s: %s)", get_class($data), $value);
107
  }
108
 
109
  if (is_resource($data)) {
@@ -117,11 +123,11 @@ class NormalizerFormatter implements FormatterInterface
117
  {
118
  // TODO 2.0 only check for Throwable
119
  if (!$e instanceof Exception && !$e instanceof \Throwable) {
120
- throw new \InvalidArgumentException('Exception/Throwable expected, got '.gettype($e).' / '.get_class($e));
121
  }
122
 
123
  $data = array(
124
- 'class' => get_class($e),
125
  'message' => $e->getMessage(),
126
  'code' => $e->getCode(),
127
  'file' => $e->getFile().':'.$e->getLine(),
@@ -146,9 +152,20 @@ class NormalizerFormatter implements FormatterInterface
146
  if (isset($frame['file'])) {
147
  $data['trace'][] = $frame['file'].':'.$frame['line'];
148
  } elseif (isset($frame['function']) && $frame['function'] === '{closure}') {
149
- // We should again normalize the frames, because it might contain invalid items
150
  $data['trace'][] = $frame['function'];
151
  } else {
 
 
 
 
 
 
 
 
 
 
 
152
  // We should again normalize the frames, because it might contain invalid items
153
  $data['trace'][] = $this->toJson($this->normalize($frame), true);
154
  }
12
  namespace Monolog\Formatter;
13
 
14
  use Exception;
15
+ use Monolog\Utils;
16
 
17
  /**
18
  * Normalizes incoming records to remove objects/resources so it's easier to dump to various targets
56
  return $records;
57
  }
58
 
59
+ protected function normalize($data, $depth = 0)
60
  {
61
+ if ($depth > 9) {
62
+ return 'Over 9 levels deep, aborting normalization';
63
+ }
64
+
65
  if (null === $data || is_scalar($data)) {
66
  if (is_float($data)) {
67
  if (is_infinite($data)) {
80
 
81
  $count = 1;
82
  foreach ($data as $key => $value) {
83
+ if ($count++ > 1000) {
84
  $normalized['...'] = 'Over 1000 items ('.count($data).' total), aborting normalization';
85
  break;
86
  }
87
+
88
+ $normalized[$key] = $this->normalize($value, $depth+1);
89
  }
90
 
91
  return $normalized;
109
  $value = $this->toJson($data, true);
110
  }
111
 
112
+ return sprintf("[object] (%s: %s)", Utils::getClass($data), $value);
113
  }
114
 
115
  if (is_resource($data)) {
123
  {
124
  // TODO 2.0 only check for Throwable
125
  if (!$e instanceof Exception && !$e instanceof \Throwable) {
126
+ throw new \InvalidArgumentException('Exception/Throwable expected, got '.gettype($e).' / '.Utils::getClass($e));
127
  }
128
 
129
  $data = array(
130
+ 'class' => Utils::getClass($e),
131
  'message' => $e->getMessage(),
132
  'code' => $e->getCode(),
133
  'file' => $e->getFile().':'.$e->getLine(),
152
  if (isset($frame['file'])) {
153
  $data['trace'][] = $frame['file'].':'.$frame['line'];
154
  } elseif (isset($frame['function']) && $frame['function'] === '{closure}') {
155
+ // Simplify closures handling
156
  $data['trace'][] = $frame['function'];
157
  } else {
158
+ if (isset($frame['args'])) {
159
+ // Make sure that objects present as arguments are not serialized nicely but rather only
160
+ // as a class name to avoid any unexpected leak of sensitive information
161
+ $frame['args'] = array_map(function ($arg) {
162
+ if (is_object($arg) && !($arg instanceof \DateTime || $arg instanceof \DateTimeInterface)) {
163
+ return sprintf("[object] (%s)", Utils::getClass($arg));
164
+ }
165
+
166
+ return $arg;
167
+ }, $frame['args']);
168
+ }
169
  // We should again normalize the frames, because it might contain invalid items
170
  $data['trace'][] = $this->toJson($this->normalize($frame), true);
171
  }
vendor/monolog/monolog/src/Monolog/Formatter/WildfireFormatter.php CHANGED
@@ -102,12 +102,12 @@ class WildfireFormatter extends NormalizerFormatter
102
  throw new \BadMethodCallException('Batch formatting does not make sense for the WildfireFormatter');
103
  }
104
 
105
- protected function normalize($data)
106
  {
107
  if (is_object($data) && !$data instanceof \DateTime) {
108
  return $data;
109
  }
110
 
111
- return parent::normalize($data);
112
  }
113
  }
102
  throw new \BadMethodCallException('Batch formatting does not make sense for the WildfireFormatter');
103
  }
104
 
105
+ protected function normalize($data, $depth = 0)
106
  {
107
  if (is_object($data) && !$data instanceof \DateTime) {
108
  return $data;
109
  }
110
 
111
+ return parent::normalize($data, $depth);
112
  }
113
  }
vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php CHANGED
@@ -11,16 +11,17 @@
11
 
12
  namespace Monolog\Handler;
13
 
14
- use Monolog\Logger;
15
  use Monolog\Formatter\FormatterInterface;
16
  use Monolog\Formatter\LineFormatter;
 
 
17
 
18
  /**
19
  * Base Handler class providing the Handler structure
20
  *
21
  * @author Jordi Boggiano <j.boggiano@seld.be>
22
  */
23
- abstract class AbstractHandler implements HandlerInterface
24
  {
25
  protected $level = Logger::DEBUG;
26
  protected $bubble = true;
@@ -32,8 +33,8 @@ abstract class AbstractHandler implements HandlerInterface
32
  protected $processors = array();
33
 
34
  /**
35
- * @param int $level The minimum logging level at which this handler will be triggered
36
- * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not
37
  */
38
  public function __construct($level = Logger::DEBUG, $bubble = true)
39
  {
@@ -141,8 +142,8 @@ abstract class AbstractHandler implements HandlerInterface
141
  /**
142
  * Sets the bubbling behavior.
143
  *
144
- * @param Boolean $bubble true means that this handler allows bubbling.
145
- * false means that bubbling is not permitted.
146
  * @return self
147
  */
148
  public function setBubble($bubble)
@@ -155,8 +156,8 @@ abstract class AbstractHandler implements HandlerInterface
155
  /**
156
  * Gets the bubbling behavior.
157
  *
158
- * @return Boolean true means that this handler allows bubbling.
159
- * false means that bubbling is not permitted.
160
  */
161
  public function getBubble()
162
  {
@@ -174,6 +175,15 @@ abstract class AbstractHandler implements HandlerInterface
174
  }
175
  }
176
 
 
 
 
 
 
 
 
 
 
177
  /**
178
  * Gets the default formatter.
179
  *
11
 
12
  namespace Monolog\Handler;
13
 
 
14
  use Monolog\Formatter\FormatterInterface;
15
  use Monolog\Formatter\LineFormatter;
16
+ use Monolog\Logger;
17
+ use Monolog\ResettableInterface;
18
 
19
  /**
20
  * Base Handler class providing the Handler structure
21
  *
22
  * @author Jordi Boggiano <j.boggiano@seld.be>
23
  */
24
+ abstract class AbstractHandler implements HandlerInterface, ResettableInterface
25
  {
26
  protected $level = Logger::DEBUG;
27
  protected $bubble = true;
33
  protected $processors = array();
34
 
35
  /**
36
+ * @param int $level The minimum logging level at which this handler will be triggered
37
+ * @param bool $bubble Whether the messages that are handled can bubble up the stack or not
38
  */
39
  public function __construct($level = Logger::DEBUG, $bubble = true)
40
  {
142
  /**
143
  * Sets the bubbling behavior.
144
  *
145
+ * @param bool $bubble true means that this handler allows bubbling.
146
+ * false means that bubbling is not permitted.
147
  * @return self
148
  */
149
  public function setBubble($bubble)
156
  /**
157
  * Gets the bubbling behavior.
158
  *
159
+ * @return bool true means that this handler allows bubbling.
160
+ * false means that bubbling is not permitted.
161
  */
162
  public function getBubble()
163
  {
175
  }
176
  }
177
 
178
+ public function reset()
179
+ {
180
+ foreach ($this->processors as $processor) {
181
+ if ($processor instanceof ResettableInterface) {
182
+ $processor->reset();
183
+ }
184
+ }
185
+ }
186
+
187
  /**
188
  * Gets the default formatter.
189
  *
vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php CHANGED
@@ -11,6 +11,8 @@
11
 
12
  namespace Monolog\Handler;
13
 
 
 
14
  /**
15
  * Base Handler class providing the Handler structure
16
  *
11
 
12
  namespace Monolog\Handler;
13
 
14
+ use Monolog\ResettableInterface;
15
+
16
  /**
17
  * Base Handler class providing the Handler structure
18
  *
vendor/monolog/monolog/src/Monolog/Handler/AbstractSyslogHandler.php CHANGED
@@ -53,9 +53,9 @@ abstract class AbstractSyslogHandler extends AbstractProcessingHandler
53
  );
54
 
55
  /**
56
- * @param mixed $facility
57
- * @param int $level The minimum logging level at which this handler will be triggered
58
- * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not
59
  */
60
  public function __construct($facility = LOG_USER, $level = Logger::DEBUG, $bubble = true)
61
  {
53
  );
54
 
55
  /**
56
+ * @param mixed $facility
57
+ * @param int $level The minimum logging level at which this handler will be triggered
58
+ * @param bool $bubble Whether the messages that are handled can bubble up the stack or not
59
  */
60
  public function __construct($facility = LOG_USER, $level = Logger::DEBUG, $bubble = true)
61
  {
vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php CHANGED
@@ -43,11 +43,11 @@ class BrowserConsoleHandler extends AbstractProcessingHandler
43
  protected function write(array $record)
44
  {
45
  // Accumulate records
46
- self::$records[] = $record;
47
 
48
  // Register shutdown handler if not already done
49
- if (!self::$initialized) {
50
- self::$initialized = true;
51
  $this->registerShutdownFunction();
52
  }
53
  }
@@ -58,27 +58,37 @@ class BrowserConsoleHandler extends AbstractProcessingHandler
58
  */
59
  public static function send()
60
  {
61
- $format = self::getResponseFormat();
62
  if ($format === 'unknown') {
63
  return;
64
  }
65
 
66
- if (count(self::$records)) {
67
  if ($format === 'html') {
68
- self::writeOutput('<script>' . self::generateScript() . '</script>');
69
  } elseif ($format === 'js') {
70
- self::writeOutput(self::generateScript());
71
  }
72
- self::reset();
73
  }
74
  }
75
 
 
 
 
 
 
 
 
 
 
 
76
  /**
77
  * Forget all logged records
78
  */
79
- public static function reset()
80
  {
81
- self::$records = array();
82
  }
83
 
84
  /**
@@ -133,18 +143,18 @@ class BrowserConsoleHandler extends AbstractProcessingHandler
133
  private static function generateScript()
134
  {
135
  $script = array();
136
- foreach (self::$records as $record) {
137
- $context = self::dump('Context', $record['context']);
138
- $extra = self::dump('Extra', $record['extra']);
139
 
140
  if (empty($context) && empty($extra)) {
141
- $script[] = self::call_array('log', self::handleStyles($record['formatted']));
142
  } else {
143
  $script = array_merge($script,
144
- array(self::call_array('groupCollapsed', self::handleStyles($record['formatted']))),
145
  $context,
146
  $extra,
147
- array(self::call('groupEnd'))
148
  );
149
  }
150
  }
@@ -154,19 +164,19 @@ class BrowserConsoleHandler extends AbstractProcessingHandler
154
 
155
  private static function handleStyles($formatted)
156
  {
157
- $args = array(self::quote('font-weight: normal'));
158
  $format = '%c' . $formatted;
159
  preg_match_all('/\[\[(.*?)\]\]\{([^}]*)\}/s', $format, $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER);
160
 
161
  foreach (array_reverse($matches) as $match) {
162
- $args[] = self::quote(self::handleCustomStyles($match[2][0], $match[1][0]));
163
  $args[] = '"font-weight: normal"';
164
 
165
  $pos = $match[0][1];
166
  $format = substr($format, 0, $pos) . '%c' . $match[1][0] . '%c' . substr($format, $pos + strlen($match[0][0]));
167
  }
168
 
169
- array_unshift($args, self::quote($format));
170
 
171
  return $args;
172
  }
@@ -198,13 +208,13 @@ class BrowserConsoleHandler extends AbstractProcessingHandler
198
  if (empty($dict)) {
199
  return $script;
200
  }
201
- $script[] = self::call('log', self::quote('%c%s'), self::quote('font-weight: bold'), self::quote($title));
202
  foreach ($dict as $key => $value) {
203
  $value = json_encode($value);
204
  if (empty($value)) {
205
- $value = self::quote('');
206
  }
207
- $script[] = self::call('log', self::quote('%s: %o'), self::quote($key), $value);
208
  }
209
 
210
  return $script;
@@ -220,7 +230,7 @@ class BrowserConsoleHandler extends AbstractProcessingHandler
220
  $args = func_get_args();
221
  $method = array_shift($args);
222
 
223
- return self::call_array($method, $args);
224
  }
225
 
226
  private static function call_array($method, array $args)
43
  protected function write(array $record)
44
  {
45
  // Accumulate records
46
+ static::$records[] = $record;
47
 
48
  // Register shutdown handler if not already done
49
+ if (!static::$initialized) {
50
+ static::$initialized = true;
51
  $this->registerShutdownFunction();
52
  }
53
  }
58
  */
59
  public static function send()
60
  {
61
+ $format = static::getResponseFormat();
62
  if ($format === 'unknown') {
63
  return;
64
  }
65
 
66
+ if (count(static::$records)) {
67
  if ($format === 'html') {
68
+ static::writeOutput('<script>' . static::generateScript() . '</script>');
69
  } elseif ($format === 'js') {
70
+ static::writeOutput(static::generateScript());
71
  }
72
+ static::resetStatic();
73
  }
74
  }
75
 
76
+ public function close()
77
+ {
78
+ self::resetStatic();
79
+ }
80
+
81
+ public function reset()
82
+ {
83
+ self::resetStatic();
84
+ }
85
+
86
  /**
87
  * Forget all logged records
88
  */
89
+ public static function resetStatic()
90
  {
91
+ static::$records = array();
92
  }
93
 
94
  /**
143
  private static function generateScript()
144
  {
145
  $script = array();
146
+ foreach (static::$records as $record) {
147
+ $context = static::dump('Context', $record['context']);
148
+ $extra = static::dump('Extra', $record['extra']);
149
 
150
  if (empty($context) && empty($extra)) {
151
+ $script[] = static::call_array('log', static::handleStyles($record['formatted']));
152
  } else {
153
  $script = array_merge($script,
154
+ array(static::call_array('groupCollapsed', static::handleStyles($record['formatted']))),
155
  $context,
156
  $extra,
157
+ array(static::call('groupEnd'))
158
  );
159
  }
160
  }
164
 
165
  private static function handleStyles($formatted)
166
  {
167
+ $args = array(static::quote('font-weight: normal'));
168
  $format = '%c' . $formatted;
169
  preg_match_all('/\[\[(.*?)\]\]\{([^}]*)\}/s', $format, $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER);
170
 
171
  foreach (array_reverse($matches) as $match) {
172
+ $args[] = static::quote(static::handleCustomStyles($match[2][0], $match[1][0]));
173
  $args[] = '"font-weight: normal"';
174
 
175
  $pos = $match[0][1];
176
  $format = substr($format, 0, $pos) . '%c' . $match[1][0] . '%c' . substr($format, $pos + strlen($match[0][0]));
177
  }
178
 
179
+ array_unshift($args, static::quote($format));
180
 
181
  return $args;
182
  }
208
  if (empty($dict)) {
209
  return $script;
210
  }
211
+ $script[] = static::call('log', static::quote('%c%s'), static::quote('font-weight: bold'), static::quote($title));
212
  foreach ($dict as $key => $value) {
213
  $value = json_encode($value);
214
  if (empty($value)) {
215
+ $value = static::quote('');
216
  }
217
+ $script[] = static::call('log', static::quote('%s: %o'), static::quote($key), $value);
218
  }
219
 
220
  return $script;
230
  $args = func_get_args();
231
  $method = array_shift($args);
232
 
233
+ return static::call_array($method, $args);
234
  }
235
 
236
  private static function call_array($method, array $args)
vendor/monolog/monolog/src/Monolog/Handler/BufferHandler.php CHANGED
@@ -12,6 +12,7 @@
12
  namespace Monolog\Handler;
13
 
14
  use Monolog\Logger;
 
15
 
16
  /**
17
  * Buffers all records until closing the handler and then pass them as batch.
@@ -34,8 +35,8 @@ class BufferHandler extends AbstractHandler
34
  * @param HandlerInterface $handler Handler.
35
  * @param int $bufferLimit How many entries should be buffered at most, beyond that the oldest items are removed from the buffer.
36
  * @param int $level The minimum logging level at which this handler will be triggered
37
- * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not
38
- * @param Boolean $flushOnOverflow If true, the buffer is flushed when the max size has been reached, by default oldest entries are discarded
39
  */
40
  public function __construct(HandlerInterface $handler, $bufferLimit = 0, $level = Logger::DEBUG, $bubble = true, $flushOnOverflow = false)
41
  {
@@ -114,4 +115,15 @@ class BufferHandler extends AbstractHandler
114
  $this->bufferSize = 0;
115
  $this->buffer = array();
116
  }
 
 
 
 
 
 
 
 
 
 
 
117
  }
12
  namespace Monolog\Handler;
13
 
14
  use Monolog\Logger;
15
+ use Monolog\ResettableInterface;
16
 
17
  /**
18
  * Buffers all records until closing the handler and then pass them as batch.
35
  * @param HandlerInterface $handler Handler.
36
  * @param int $bufferLimit How many entries should be buffered at most, beyond that the oldest items are removed from the buffer.
37
  * @param int $level The minimum logging level at which this handler will be triggered
38
+ * @param bool $bubble Whether the messages that are handled can bubble up the stack or not
39
+ * @param bool $flushOnOverflow If true, the buffer is flushed when the max size has been reached, by default oldest entries are discarded
40
  */
41
  public function __construct(HandlerInterface $handler, $bufferLimit = 0, $level = Logger::DEBUG, $bubble = true, $flushOnOverflow = false)
42
  {
115
  $this->bufferSize = 0;
116
  $this->buffer = array();
117
  }
118
+
119
+ public function reset()
120
+ {
121
+ $this->flush();
122
+
123
+ parent::reset();
124
+
125
+ if ($this->handler instanceof ResettableInterface) {
126
+ $this->handler->reset();
127
+ }
128
+ }
129
  }
vendor/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php CHANGED
@@ -32,7 +32,7 @@ class ChromePHPHandler extends AbstractProcessingHandler
32
  * Header name
33
  */
34
  const HEADER_NAME = 'X-ChromeLogger-Data';
35
-
36
  /**
37
  * Regular expression to detect supported browsers (matches any Chrome, or Firefox 43+)
38
  */
@@ -45,7 +45,7 @@ class ChromePHPHandler extends AbstractProcessingHandler
45
  *
46
  * Chrome limits the headers to 256KB, so when we sent 240KB we stop sending
47
  *
48
- * @var Boolean
49
  */
50
  protected static $overflowed = false;
51
 
@@ -58,8 +58,8 @@ class ChromePHPHandler extends AbstractProcessingHandler
58
  protected static $sendHeaders = true;
59
 
60
  /**
61
- * @param int $level The minimum logging level at which this handler will be triggered
62
- * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not
63
  */
64
  public function __construct($level = Logger::DEBUG, $bubble = true)
65
  {
@@ -174,7 +174,7 @@ class ChromePHPHandler extends AbstractProcessingHandler
174
  /**
175
  * Verifies if the headers are accepted by the current user agent
176
  *
177
- * @return Boolean
178
  */
179
  protected function headersAccepted()
180
  {
32
  * Header name
33
  */
34
  const HEADER_NAME = 'X-ChromeLogger-Data';
35
+
36
  /**
37
  * Regular expression to detect supported browsers (matches any Chrome, or Firefox 43+)
38
  */
45
  *
46
  * Chrome limits the headers to 256KB, so when we sent 240KB we stop sending
47
  *
48
+ * @var bool
49
  */
50
  protected static $overflowed = false;
51
 
58
  protected static $sendHeaders = true;
59
 
60
  /**
61
+ * @param int $level The minimum logging level at which this handler will be triggered
62
+ * @param bool $bubble Whether the messages that are handled can bubble up the stack or not
63
  */
64
  public function __construct($level = Logger::DEBUG, $bubble = true)
65
  {
174
  /**
175
  * Verifies if the headers are accepted by the current user agent
176
  *
177
+ * @return bool
178
  */
179
  protected function headersAccepted()
180
  {
vendor/monolog/monolog/src/Monolog/Handler/DeduplicationHandler.php CHANGED
@@ -60,7 +60,7 @@ class DeduplicationHandler extends BufferHandler
60
  * @param string $deduplicationStore The file/path where the deduplication log should be kept
61
  * @param int $deduplicationLevel The minimum logging level for log records to be looked at for deduplication purposes
62
  * @param int $time The period (in seconds) during which duplicate entries should be suppressed after a given log is sent through
63
- * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not
64
  */
65
  public function __construct(HandlerInterface $handler, $deduplicationStore = null, $deduplicationLevel = Logger::ERROR, $time = 60, $bubble = true)
66
  {
60
  * @param string $deduplicationStore The file/path where the deduplication log should be kept
61
  * @param int $deduplicationLevel The minimum logging level for log records to be looked at for deduplication purposes
62
  * @param int $time The period (in seconds) during which duplicate entries should be suppressed after a given log is sent through
63
+ * @param bool $bubble Whether the messages that are handled can bubble up the stack or not
64
  */
65
  public function __construct(HandlerInterface $handler, $deduplicationStore = null, $deduplicationLevel = Logger::ERROR, $time = 60, $bubble = true)
66
  {
vendor/monolog/monolog/src/Monolog/Handler/ElasticSearchHandler.php CHANGED
@@ -46,10 +46,10 @@ class ElasticSearchHandler extends AbstractProcessingHandler
46
  protected $options = array();
47
 
48
  /**
49
- * @param Client $client Elastica Client object
50
- * @param array $options Handler configuration
51
- * @param int $level The minimum logging level at which this handler will be triggered
52
- * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not
53
  */
54
  public function __construct(Client $client, array $options = array(), $level = Logger::DEBUG, $bubble = true)
55
  {
46
  protected $options = array();
47
 
48
  /**
49
+ * @param Client $client Elastica Client object
50
+ * @param array $options Handler configuration
51
+ * @param int $level The minimum logging level at which this handler will be triggered
52
+ * @param bool $bubble Whether the messages that are handled can bubble up the stack or not
53
  */
54
  public function __construct(Client $client, array $options = array(), $level = Logger::DEBUG, $bubble = true)
55
  {
vendor/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php CHANGED
@@ -28,10 +28,10 @@ class ErrorLogHandler extends AbstractProcessingHandler
28
  protected $expandNewlines;
29
 
30
  /**
31
- * @param int $messageType Says where the error should go.
32
- * @param int $level The minimum logging level at which this handler will be triggered
33
- * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not
34
- * @param Boolean $expandNewlines If set to true, newlines in the message will be expanded to be take multiple log entries
35
  */
36
  public function __construct($messageType = self::OPERATING_SYSTEM, $level = Logger::DEBUG, $bubble = true, $expandNewlines = false)
37
  {
28
  protected $expandNewlines;
29
 
30
  /**
31
+ * @param int $messageType Says where the error should go.
32
+ * @param int $level The minimum logging level at which this handler will be triggered
33
+ * @param bool $bubble Whether the messages that are handled can bubble up the stack or not
34
+ * @param bool $expandNewlines If set to true, newlines in the message will be expanded to be take multiple log entries
35
  */
36
  public function __construct($messageType = self::OPERATING_SYSTEM, $level = Logger::DEBUG, $bubble = true, $expandNewlines = false)
37
  {
vendor/monolog/monolog/src/Monolog/Handler/FilterHandler.php CHANGED
@@ -40,7 +40,7 @@ class FilterHandler extends AbstractHandler
40
  /**
41
  * Whether the messages that are handled can bubble up the stack or not
42
  *
43
- * @var Boolean
44
  */
45
  protected $bubble;
46
 
@@ -48,7 +48,7 @@ class FilterHandler extends AbstractHandler
48
  * @param callable|HandlerInterface $handler Handler or factory callable($record, $this).
49
  * @param int|array $minLevelOrList A list of levels to accept or a minimum level if maxLevel is provided
50
  * @param int $maxLevel Maximum level to accept, only used if $minLevelOrList is not an array
51
- * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not
52
  */
53
  public function __construct($handler, $minLevelOrList = Logger::DEBUG, $maxLevel = Logger::EMERGENCY, $bubble = true)
54
  {
40
  /**
41
  * Whether the messages that are handled can bubble up the stack or not
42
  *
43
+ * @var bool
44
  */
45
  protected $bubble;
46
 
48
  * @param callable|HandlerInterface $handler Handler or factory callable($record, $this).
49
  * @param int|array $minLevelOrList A list of levels to accept or a minimum level if maxLevel is provided
50
  * @param int $maxLevel Maximum level to accept, only used if $minLevelOrList is not an array
51
+ * @param bool $bubble Whether the messages that are handled can bubble up the stack or not
52
  */
53
  public function __construct($handler, $minLevelOrList = Logger::DEBUG, $maxLevel = Logger::EMERGENCY, $bubble = true)
54
  {
vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php CHANGED
@@ -22,7 +22,7 @@ interface ActivationStrategyInterface
22
  * Returns whether the given record activates the handler.
23
  *
24
  * @param array $record
25
- * @return Boolean
26
  */
27
  public function isHandlerActivated(array $record);
28
  }
22
  * Returns whether the given record activates the handler.
23
  *
24
  * @param array $record
25
+ * @return bool
26
  */
27
  public function isHandlerActivated(array $record);
28
  }
vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php CHANGED
@@ -14,6 +14,7 @@ namespace Monolog\Handler;
14
  use Monolog\Handler\FingersCrossed\ErrorLevelActivationStrategy;
15
  use Monolog\Handler\FingersCrossed\ActivationStrategyInterface;
16
  use Monolog\Logger;
 
17
 
18
  /**
19
  * Buffers all records until a certain level is reached
@@ -41,8 +42,8 @@ class FingersCrossedHandler extends AbstractHandler
41
  * @param callable|HandlerInterface $handler Handler or factory callable($record, $fingersCrossedHandler).
42
  * @param int|ActivationStrategyInterface $activationStrategy Strategy which determines when this handler takes action
43
  * @param int $bufferSize How many entries should be buffered at most, beyond that the oldest items are removed from the buffer.
44
- * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not
45
- * @param Boolean $stopBuffering Whether the handler should stop buffering after being triggered (default true)
46
  * @param int $passthruLevel Minimum level to always flush to handler on close, even if strategy not triggered
47
  */
48
  public function __construct($handler, $activationStrategy = null, $bufferSize = 0, $bubble = true, $stopBuffering = true, $passthruLevel = null)
@@ -130,24 +131,18 @@ class FingersCrossedHandler extends AbstractHandler
130
  */
131
  public function close()
132
  {
133
- if (null !== $this->passthruLevel) {
134
- $level = $this->passthruLevel;
135
- $this->buffer = array_filter($this->buffer, function ($record) use ($level) {
136
- return $record['level'] >= $level;
137
- });
138
- if (count($this->buffer) > 0) {
139
- $this->handler->handleBatch($this->buffer);
140
- $this->buffer = array();
141
- }
142
- }
143
  }
144
 
145
- /**
146
- * Resets the state of the handler. Stops forwarding records to the wrapped handler.
147
- */
148
  public function reset()
149
  {
150
- $this->buffering = true;
 
 
 
 
 
 
151
  }
152
 
153
  /**
@@ -160,4 +155,23 @@ class FingersCrossedHandler extends AbstractHandler
160
  $this->buffer = array();
161
  $this->reset();
162
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
163
  }
14
  use Monolog\Handler\FingersCrossed\ErrorLevelActivationStrategy;
15
  use Monolog\Handler\FingersCrossed\ActivationStrategyInterface;
16
  use Monolog\Logger;
17
+ use Monolog\ResettableInterface;
18
 
19
  /**
20
  * Buffers all records until a certain level is reached
42
  * @param callable|HandlerInterface $handler Handler or factory callable($record, $fingersCrossedHandler).
43
  * @param int|ActivationStrategyInterface $activationStrategy Strategy which determines when this handler takes action
44
  * @param int $bufferSize How many entries should be buffered at most, beyond that the oldest items are removed from the buffer.
45
+ * @param bool $bubble Whether the messages that are handled can bubble up the stack or not
46
+ * @param bool $stopBuffering Whether the handler should stop buffering after being triggered (default true)
47
  * @param int $passthruLevel Minimum level to always flush to handler on close, even if strategy not triggered
48
  */
49
  public function __construct($handler, $activationStrategy = null, $bufferSize = 0, $bubble = true, $stopBuffering = true, $passthruLevel = null)
131
  */
132
  public function close()
133
  {
134
+ $this->flushBuffer();
 
 
 
 
 
 
 
 
 
135
  }
136
 
 
 
 
137
  public function reset()
138
  {
139
+ $this->flushBuffer();
140
+
141
+ parent::reset();
142
+
143
+ if ($this->handler instanceof ResettableInterface) {
144
+ $this->handler->reset();
145
+ }
146
  }
147
 
148
  /**
155
  $this->buffer = array();
156
  $this->reset();
157
  }
158
+
159
+ /**
160
+ * Resets the state of the handler. Stops forwarding records to the wrapped handler.
161
+ */
162
+ private function flushBuffer()
163
+ {
164
+ if (null !== $this->passthruLevel) {
165
+ $level = $this->passthruLevel;
166
+ $this->buffer = array_filter($this->buffer, function ($record) use ($level) {
167
+ return $record['level'] >= $level;
168
+ });
169
+ if (count($this->buffer) > 0) {
170
+ $this->handler->handleBatch($this->buffer);
171
+ }
172
+ }
173
+
174
+ $this->buffer = array();
175
+ $this->buffering = true;
176
+ }
177
  }
vendor/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php CHANGED
@@ -158,7 +158,7 @@ class FirePHPHandler extends AbstractProcessingHandler
158
  /**
159
  * Verifies if the headers are accepted by the current user agent
160
  *
161
- * @return Boolean
162
  */
163
  protected function headersAccepted()
164
  {
158
  /**
159
  * Verifies if the headers are accepted by the current user agent
160
  *
161
+ * @return bool
162
  */
163
  protected function headersAccepted()
164
  {
vendor/monolog/monolog/src/Monolog/Handler/GelfHandler.php CHANGED
@@ -47,14 +47,6 @@ class GelfHandler extends AbstractProcessingHandler
47
  $this->publisher = $publisher;
48
  }
49
 
50
- /**
51
- * {@inheritdoc}
52
- */
53
- public function close()
54
- {
55
- $this->publisher = null;
56
- }
57
-
58
  /**
59
  * {@inheritdoc}
60
  */
47
  $this->publisher = $publisher;
48
  }
49
 
 
 
 
 
 
 
 
 
50
  /**
51
  * {@inheritdoc}
52
  */
vendor/monolog/monolog/src/Monolog/Handler/GroupHandler.php CHANGED
@@ -12,6 +12,7 @@
12
  namespace Monolog\Handler;
13
 
14
  use Monolog\Formatter\FormatterInterface;
 
15
 
16
  /**
17
  * Forwards records to multiple handlers
@@ -23,8 +24,8 @@ class GroupHandler extends AbstractHandler
23
  protected $handlers;
24
 
25
  /**
26
- * @param array $handlers Array of Handlers.
27
- * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not
28
  */
29
  public function __construct(array $handlers, $bubble = true)
30
  {
@@ -90,6 +91,17 @@ class GroupHandler extends AbstractHandler
90
  }
91
  }
92
 
 
 
 
 
 
 
 
 
 
 
 
93
  /**
94
  * {@inheritdoc}
95
  */
12
  namespace Monolog\Handler;
13
 
14
  use Monolog\Formatter\FormatterInterface;
15
+ use Monolog\ResettableInterface;
16
 
17
  /**
18
  * Forwards records to multiple handlers
24
  protected $handlers;
25
 
26
  /**
27
+ * @param array $handlers Array of Handlers.
28
+ * @param bool $bubble Whether the messages that are handled can bubble up the stack or not
29
  */
30
  public function __construct(array $handlers, $bubble = true)
31
  {
91
  }
92
  }
93
 
94
+ public function reset()
95
+ {
96
+ parent::reset();
97
+
98
+ foreach ($this->handlers as $handler) {
99
+ if ($handler instanceof ResettableInterface) {
100
+ $handler->reset();
101
+ }
102
+ }
103
+ }
104
+
105
  /**
106
  * {@inheritdoc}
107
  */
vendor/monolog/monolog/src/Monolog/Handler/HandlerInterface.php CHANGED
@@ -31,7 +31,7 @@ interface HandlerInterface
31
  *
32
  * @param array $record Partial log record containing only a level key
33
  *
34
- * @return Boolean
35
  */
36
  public function isHandling(array $record);
37
 
@@ -46,7 +46,7 @@ interface HandlerInterface
46
  * calling further handlers in the stack with a given log record.
47
  *
48
  * @param array $record The record to handle
49
- * @return Boolean true means that this handler handled the record, and that bubbling is not permitted.
50
  * false means the record was either not processed or that this handler allows bubbling.
51
  */
52
  public function handle(array $record);
31
  *
32
  * @param array $record Partial log record containing only a level key
33
  *
34
+ * @return bool
35
  */
36
  public function isHandling(array $record);
37
 
46
  * calling further handlers in the stack with a given log record.
47
  *
48
  * @param array $record The record to handle
49
+ * @return bool true means that this handler handled the record, and that bubbling is not permitted.
50
  * false means the record was either not processed or that this handler allows bubbling.
51
  */
52
  public function handle(array $record);
vendor/monolog/monolog/src/Monolog/Handler/HandlerWrapper.php CHANGED
@@ -11,6 +11,7 @@
11
 
12
  namespace Monolog\Handler;
13
 
 
14
  use Monolog\Formatter\FormatterInterface;
15
 
16
  /**
@@ -30,7 +31,7 @@ use Monolog\Formatter\FormatterInterface;
30
  *
31
  * @author Alexey Karapetov <alexey@karapetov.com>
32
  */
33
- class HandlerWrapper implements HandlerInterface
34
  {
35
  /**
36
  * @var HandlerInterface
@@ -105,4 +106,11 @@ class HandlerWrapper implements HandlerInterface
105
  {
106
  return $this->handler->getFormatter();
107
  }
 
 
 
 
 
 
 
108
  }
11
 
12
  namespace Monolog\Handler;
13
 
14
+ use Monolog\ResettableInterface;
15
  use Monolog\Formatter\FormatterInterface;
16
 
17
  /**
31
  *
32
  * @author Alexey Karapetov <alexey@karapetov.com>
33
  */
34
+ class HandlerWrapper implements HandlerInterface, ResettableInterface
35
  {
36
  /**
37
  * @var HandlerInterface
106
  {
107
  return $this->handler->getFormatter();
108
  }
109
+
110
+ public function reset()
111
+ {
112
+ if ($this->handler instanceof ResettableInterface) {
113
+ return $this->handler->reset();
114
+ }
115
+ }
116
  }
vendor/monolog/monolog/src/Monolog/Handler/HipChatHandler.php CHANGED
@@ -219,6 +219,21 @@ class HipChatHandler extends SocketHandler
219
  protected function write(array $record)
220
  {
221
  parent::write($record);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
222
  $this->closeSocket();
223
  }
224
 
219
  protected function write(array $record)
220
  {
221
  parent::write($record);
222
+ $this->finalizeWrite();
223
+ }
224
+
225
+ /**
226
+ * Finalizes the request by reading some bytes and then closing the socket
227
+ *
228
+ * If we do not read some but close the socket too early, hipchat sometimes
229
+ * drops the request entirely.
230
+ */
231
+ protected function finalizeWrite()
232
+ {
233
+ $res = $this->getResource();
234
+ if (is_resource($res)) {
235
+ @fread($res, 2048);
236
+ }
237
  $this->closeSocket();
238
  }
239
 
vendor/monolog/monolog/src/Monolog/Handler/IFTTTHandler.php CHANGED
@@ -30,10 +30,10 @@ class IFTTTHandler extends AbstractProcessingHandler
30
  private $secretKey;
31
 
32
  /**
33
- * @param string $eventName The name of the IFTTT Maker event that should be triggered
34
- * @param string $secretKey A valid IFTTT secret key
35
- * @param int $level The minimum logging level at which this handler will be triggered
36
- * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not
37
  */
38
  public function __construct($eventName, $secretKey, $level = Logger::ERROR, $bubble = true)
39
  {
30
  private $secretKey;
31
 
32
  /**
33
+ * @param string $eventName The name of the IFTTT Maker event that should be triggered
34
+ * @param string $secretKey A valid IFTTT secret key
35
+ * @param int $level The minimum logging level at which this handler will be triggered
36
+ * @param bool $bubble Whether the messages that are handled can bubble up the stack or not
37
  */
38
  public function __construct($eventName, $secretKey, $level = Logger::ERROR, $bubble = true)
39
  {
vendor/monolog/monolog/src/Monolog/Handler/InsightOpsHandler.php ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of the Monolog package.
5
+ *
6
+ * (c) Jordi Boggiano <j.boggiano@seld.be>
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ */
11
+
12
+ namespace Monolog\Handler;
13
+
14
+ use Monolog\Logger;
15
+
16
+ /**
17
+ * Inspired on LogEntriesHandler.
18
+ *
19
+ * @author Robert Kaufmann III <rok3@rok3.me>
20
+ * @author Gabriel Machado <gabriel.ms1@hotmail.com>
21
+ */
22
+ class InsightOpsHandler extends SocketHandler
23
+ {
24
+ /**
25
+ * @var string
26
+ */
27
+ protected $logToken;
28
+
29
+ /**
30
+ * @param string $token Log token supplied by InsightOps
31
+ * @param string $region Region where InsightOps account is hosted. Could be 'us' or 'eu'.
32
+ * @param bool $useSSL Whether or not SSL encryption should be used
33
+ * @param int $level The minimum logging level to trigger this handler
34
+ * @param bool $bubble Whether or not messages that are handled should bubble up the stack.
35
+ *
36
+ * @throws MissingExtensionException If SSL encryption is set to true and OpenSSL is missing
37
+ */
38
+ public function __construct($token, $region = 'us', $useSSL = true, $level = Logger::DEBUG, $bubble = true)
39
+ {
40
+ if ($useSSL && !extension_loaded('openssl')) {
41
+ throw new MissingExtensionException('The OpenSSL PHP plugin is required to use SSL encrypted connection for LogEntriesHandler');
42
+ }
43
+
44
+ $endpoint = $useSSL
45
+ ? 'ssl://' . $region . '.data.logs.insight.rapid7.com:443'
46
+ : $region . '.data.logs.insight.rapid7.com:80';
47
+
48
+ parent::__construct($endpoint, $level, $bubble);
49
+ $this->logToken = $token;
50
+ }
51
+
52
+ /**
53
+ * {@inheritdoc}
54
+ *
55
+ * @param array $record
56
+ * @return string
57
+ */
58
+ protected function generateDataStream($record)
59
+ {
60
+ return $this->logToken . ' ' . $record['formatted'];
61
+ }
62
+ }
vendor/monolog/monolog/src/Monolog/Handler/LogEntriesHandler.php CHANGED
@@ -31,13 +31,13 @@ class LogEntriesHandler extends SocketHandler
31
  *
32
  * @throws MissingExtensionException If SSL encryption is set to true and OpenSSL is missing
33
  */
34
- public function __construct($token, $useSSL = true, $level = Logger::DEBUG, $bubble = true)
35
  {
36
  if ($useSSL && !extension_loaded('openssl')) {
37
  throw new MissingExtensionException('The OpenSSL PHP plugin is required to use SSL encrypted connection for LogEntriesHandler');
38
  }
39
 
40
- $endpoint = $useSSL ? 'ssl://data.logentries.com:443' : 'data.logentries.com:80';
41
  parent::__construct($endpoint, $level, $bubble);
42
  $this->logToken = $token;
43
  }
31
  *
32
  * @throws MissingExtensionException If SSL encryption is set to true and OpenSSL is missing
33
  */
34
+ public function __construct($token, $useSSL = true, $level = Logger::DEBUG, $bubble = true, $host = 'data.logentries.com')
35
  {
36
  if ($useSSL && !extension_loaded('openssl')) {
37
  throw new MissingExtensionException('The OpenSSL PHP plugin is required to use SSL encrypted connection for LogEntriesHandler');
38
  }
39
 
40
+ $endpoint = $useSSL ? 'ssl://' . $host . ':443' : $host . ':80';
41
  parent::__construct($endpoint, $level, $bubble);
42
  $this->logToken = $token;
43
  }
vendor/monolog/monolog/src/Monolog/Handler/MandrillHandler.php CHANGED
@@ -27,7 +27,7 @@ class MandrillHandler extends MailHandler
27
  * @param string $apiKey A valid Mandrill API key
28
  * @param callable|\Swift_Message $message An example message for real messages, only the body will be replaced
29
  * @param int $level The minimum logging level at which this handler will be triggered
30
- * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not
31
  */
32
  public function __construct($apiKey, $message, $level = Logger::ERROR, $bubble = true)
33
  {
27
  * @param string $apiKey A valid Mandrill API key
28
  * @param callable|\Swift_Message $message An example message for real messages, only the body will be replaced
29
  * @param int $level The minimum logging level at which this handler will be triggered
30
+ * @param bool $bubble Whether the messages that are handled can bubble up the stack or not
31
  */
32
  public function __construct($apiKey, $message, $level = Logger::ERROR, $bubble = true)
33
  {
vendor/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php CHANGED
@@ -18,6 +18,8 @@ use Monolog\Formatter\NormalizerFormatter;
18
  * Class to record a log on a NewRelic application.
19
  * Enabling New Relic High Security mode may prevent capture of useful information.
20
  *
 
 
21
  * @see https://docs.newrelic.com/docs/agents/php-agent
22
  * @see https://docs.newrelic.com/docs/accounts-partnerships/accounts/security/high-security
23
  */
@@ -84,7 +86,7 @@ class NewRelicHandler extends AbstractProcessingHandler
84
  unset($record['formatted']['context']['transaction_name']);
85
  }
86
 
87
- if (isset($record['context']['exception']) && $record['context']['exception'] instanceof \Exception) {
88
  newrelic_notice_error($record['message'], $record['context']['exception']);
89
  unset($record['formatted']['context']['exception']);
90
  } else {
18
  * Class to record a log on a NewRelic application.
19
  * Enabling New Relic High Security mode may prevent capture of useful information.
20
  *
21
+ * This handler requires a NormalizerFormatter to function and expects an array in $record['formatted']
22
+ *
23
  * @see https://docs.newrelic.com/docs/agents/php-agent
24
  * @see https://docs.newrelic.com/docs/accounts-partnerships/accounts/security/high-security
25
  */
86
  unset($record['formatted']['context']['transaction_name']);
87
  }
88
 
89
+ if (isset($record['context']['exception']) && ($record['context']['exception'] instanceof \Exception || (PHP_VERSION_ID >= 70000 && $record['context']['exception'] instanceof \Throwable))) {
90
  newrelic_notice_error($record['message'], $record['context']['exception']);
91
  unset($record['formatted']['context']['exception']);
92
  } else {
vendor/monolog/monolog/src/Monolog/Handler/PsrHandler.php CHANGED
@@ -31,7 +31,7 @@ class PsrHandler extends AbstractHandler
31
  /**
32
  * @param LoggerInterface $logger The underlying PSR-3 compliant logger to which messages will be proxied
33
  * @param int $level The minimum logging level at which this handler will be triggered
34
- * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not
35
  */
36
  public function __construct(LoggerInterface $logger, $level = Logger::DEBUG, $bubble = true)
37
  {
31
  /**
32
  * @param LoggerInterface $logger The underlying PSR-3 compliant logger to which messages will be proxied
33
  * @param int $level The minimum logging level at which this handler will be triggered
34
+ * @param bool $bubble Whether the messages that are handled can bubble up the stack or not
35
  */
36
  public function __construct(LoggerInterface $logger, $level = Logger::DEBUG, $bubble = true)
37
  {
vendor/monolog/monolog/src/Monolog/Handler/PushoverHandler.php CHANGED
@@ -69,8 +69,8 @@ class PushoverHandler extends SocketHandler
69
  * @param string|array $users Pushover user id or array of ids the message will be sent to
70
  * @param string $title Title sent to the Pushover API
71
  * @param int $level The minimum logging level at which this handler will be triggered
72
- * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not
73
- * @param Boolean $useSSL Whether to connect via SSL. Required when pushing messages to users that are not
74
  * the pushover.net app owner. OpenSSL is required for this option.
75
  * @param int $highPriorityLevel The minimum logging level at which this handler will start
76
  * sending "high priority" requests to the Pushover API
@@ -180,6 +180,6 @@ class PushoverHandler extends SocketHandler
180
  */
181
  public function useFormattedMessage($value)
182
  {
183
- $this->useFormattedMessage = (boolean) $value;
184
  }
185
  }
69
  * @param string|array $users Pushover user id or array of ids the message will be sent to
70
  * @param string $title Title sent to the Pushover API
71
  * @param int $level The minimum logging level at which this handler will be triggered
72
+ * @param bool $bubble Whether the messages that are handled can bubble up the stack or not
73
+ * @param bool $useSSL Whether to connect via SSL. Required when pushing messages to users that are not
74
  * the pushover.net app owner. OpenSSL is required for this option.
75
  * @param int $highPriorityLevel The minimum logging level at which this handler will start
76
  * sending "high priority" requests to the Pushover API
180
  */
181
  public function useFormattedMessage($value)
182
  {
183
+ $this->useFormattedMessage = (bool) $value;
184
  }
185
  }
vendor/monolog/monolog/src/Monolog/Handler/RavenHandler.php CHANGED
@@ -18,7 +18,7 @@ use Raven_Client;
18
 
19
  /**
20
  * Handler to send messages to a Sentry (https://github.com/getsentry/sentry) server
21
- * using raven-php (https://github.com/getsentry/raven-php)
22
  *
23
  * @author Marc Abramowitz <marc@marc-abramowitz.com>
24
  */
@@ -27,7 +27,7 @@ class RavenHandler extends AbstractProcessingHandler
27
  /**
28
  * Translates Monolog log levels to Raven log levels.
29
  */
30
- private $logLevels = array(
31
  Logger::DEBUG => Raven_Client::DEBUG,
32
  Logger::INFO => Raven_Client::INFO,
33
  Logger::NOTICE => Raven_Client::INFO,
@@ -42,7 +42,7 @@ class RavenHandler extends AbstractProcessingHandler
42
  * @var string should represent the current version of the calling
43
  * software. Can be any string (git commit, version number)
44
  */
45
- private $release;
46
 
47
  /**
48
  * @var Raven_Client the client object that sends the message to the server
@@ -57,7 +57,7 @@ class RavenHandler extends AbstractProcessingHandler
57
  /**
58
  * @param Raven_Client $ravenClient
59
  * @param int $level The minimum logging level at which this handler will be triggered
60
- * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not
61
  */
62
  public function __construct(Raven_Client $ravenClient, $level = Logger::DEBUG, $bubble = true)
63
  {
@@ -180,7 +180,7 @@ class RavenHandler extends AbstractProcessingHandler
180
  }
181
 
182
  if (isset($record['context']['exception']) && ($record['context']['exception'] instanceof \Exception || (PHP_VERSION_ID >= 70000 && $record['context']['exception'] instanceof \Throwable))) {
183
- $options['extra']['message'] = $record['formatted'];
184
  $this->ravenClient->captureException($record['context']['exception'], $options);
185
  } else {
186
  $this->ravenClient->captureMessage($record['formatted'], array(), $options);
@@ -216,7 +216,7 @@ class RavenHandler extends AbstractProcessingHandler
216
  */
217
  protected function getExtraParameters()
218
  {
219
- return array('checksum', 'release', 'event_id');
220
  }
221
 
222
  /**
18
 
19
  /**
20
  * Handler to send messages to a Sentry (https://github.com/getsentry/sentry) server
21
+ * using sentry-php (https://github.com/getsentry/sentry-php)
22
  *
23
  * @author Marc Abramowitz <marc@marc-abramowitz.com>
24
  */
27
  /**
28
  * Translates Monolog log levels to Raven log levels.
29
  */
30
+ protected $logLevels = array(
31
  Logger::DEBUG => Raven_Client::DEBUG,
32
  Logger::INFO => Raven_Client::INFO,
33
  Logger::NOTICE => Raven_Client::INFO,
42
  * @var string should represent the current version of the calling
43
  * software. Can be any string (git commit, version number)
44
  */
45
+ protected $release;
46
 
47
  /**
48
  * @var Raven_Client the client object that sends the message to the server
57
  /**
58
  * @param Raven_Client $ravenClient
59
  * @param int $level The minimum logging level at which this handler will be triggered
60
+ * @param bool $bubble Whether the messages that are handled can bubble up the stack or not
61
  */
62
  public function __construct(Raven_Client $ravenClient, $level = Logger::DEBUG, $bubble = true)
63
  {
180
  }
181
 
182
  if (isset($record['context']['exception']) && ($record['context']['exception'] instanceof \Exception || (PHP_VERSION_ID >= 70000 && $record['context']['exception'] instanceof \Throwable))) {
183
+ $options['message'] = $record['formatted'];
184
  $this->ravenClient->captureException($record['context']['exception'], $options);
185
  } else {
186
  $this->ravenClient->captureMessage($record['formatted'], array(), $options);
216
  */
217
  protected function getExtraParameters()
218
  {
219
+ return array('contexts', 'checksum', 'release', 'event_id');
220
  }
221
 
222
  /**
vendor/monolog/monolog/src/Monolog/Handler/RollbarHandler.php CHANGED
@@ -129,4 +129,16 @@ class RollbarHandler extends AbstractProcessingHandler
129
  {
130
  $this->flush();
131
  }
 
 
 
 
 
 
 
 
 
 
 
 
132
  }
129
  {
130
  $this->flush();
131
  }
132
+
133
+ /**
134
+ * {@inheritdoc}
135
+ */
136
+ public function reset()
137
+ {
138
+ $this->flush();
139
+
140
+ parent::reset();
141
+ }
142
+
143
+
144
  }
vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php CHANGED
@@ -39,9 +39,9 @@ class RotatingFileHandler extends StreamHandler
39
  * @param string $filename
40
  * @param int $maxFiles The maximal amount of files to keep (0 means unlimited)
41
  * @param int $level The minimum logging level at which this handler will be triggered
42
- * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not
43
  * @param int|null $filePermission Optional file permissions (default (0644) are only for owner read/write)
44
- * @param Boolean $useLocking Try to lock log file before doing any writes
45
  */
46
  public function __construct($filename, $maxFiles = 0, $level = Logger::DEBUG, $bubble = true, $filePermission = null, $useLocking = false)
47
  {
@@ -66,6 +66,18 @@ class RotatingFileHandler extends StreamHandler
66
  }
67
  }
68
 
 
 
 
 
 
 
 
 
 
 
 
 
69
  public function setFilenameFormat($filenameFormat, $dateFormat)
70
  {
71
  if (!preg_match('{^Y(([/_.-]?m)([/_.-]?d)?)?$}', $dateFormat)) {
@@ -166,7 +178,7 @@ class RotatingFileHandler extends StreamHandler
166
  $fileInfo = pathinfo($this->filename);
167
  $glob = str_replace(
168
  array('{filename}', '{date}'),
169
- array($fileInfo['filename'], '*'),
170
  $fileInfo['dirname'] . '/' . $this->filenameFormat
171
  );
172
  if (!empty($fileInfo['extension'])) {
39
  * @param string $filename
40
  * @param int $maxFiles The maximal amount of files to keep (0 means unlimited)
41
  * @param int $level The minimum logging level at which this handler will be triggered
42
+ * @param bool $bubble Whether the messages that are handled can bubble up the stack or not
43
  * @param int|null $filePermission Optional file permissions (default (0644) are only for owner read/write)
44
+ * @param bool $useLocking Try to lock log file before doing any writes
45
  */
46
  public function __construct($filename, $maxFiles = 0, $level = Logger::DEBUG, $bubble = true, $filePermission = null, $useLocking = false)
47
  {
66
  }
67
  }
68
 
69
+ /**
70
+ * {@inheritdoc}
71
+ */
72
+ public function reset()
73
+ {
74
+ parent::reset();
75
+
76
+ if (true === $this->mustRotate) {
77
+ $this->rotate();
78
+ }
79
+ }
80
+
81
  public function setFilenameFormat($filenameFormat, $dateFormat)
82
  {
83
  if (!preg_match('{^Y(([/_.-]?m)([/_.-]?d)?)?$}', $dateFormat)) {
178
  $fileInfo = pathinfo($this->filename);
179
  $glob = str_replace(
180
  array('{filename}', '{date}'),
181
+ array($fileInfo['filename'], '[0-9][0-9][0-9][0-9]*'),
182
  $fileInfo['dirname'] . '/' . $this->filenameFormat
183
  );
184
  if (!empty($fileInfo['extension'])) {
vendor/monolog/monolog/src/Monolog/Handler/Slack/SlackRecord.php CHANGED
@@ -146,7 +146,7 @@ class SlackRecord
146
 
147
  if ($this->useShortAttachment) {
148
  $attachment['fields'][] = $this->generateAttachmentField(
149
- ucfirst($key),
150
  $record[$key]
151
  );
152
  } else {
@@ -229,8 +229,8 @@ class SlackRecord
229
  /**
230
  * Generates attachment field
231
  *
232
- * @param string $title
233
- * @param string|array $value\
234
  *
235
  * @return array
236
  */
@@ -241,7 +241,7 @@ class SlackRecord
241
  : $value;
242
 
243
  return array(
244
- 'title' => $title,
245
  'value' => $value,
246
  'short' => false
247
  );
@@ -257,7 +257,7 @@ class SlackRecord
257
  private function generateAttachmentFields(array $data)
258
  {
259
  $fields = array();
260
- foreach ($data as $key => $value) {
261
  $fields[] = $this->generateAttachmentField($key, $value);
262
  }
263
 
146
 
147
  if ($this->useShortAttachment) {
148
  $attachment['fields'][] = $this->generateAttachmentField(
149
+ $key,
150
  $record[$key]
151
  );
152
  } else {
229
  /**
230
  * Generates attachment field
231
  *
232
+ * @param string $title
233
+ * @param string|array $value
234
  *
235
  * @return array
236
  */
241
  : $value;
242
 
243
  return array(
244
+ 'title' => ucfirst($title),
245
  'value' => $value,
246
  'short' => false
247
  );
257
  private function generateAttachmentFields(array $data)
258
  {
259
  $fields = array();
260
+ foreach ($this->normalizerFormatter->format($data) as $key => $value) {
261
  $fields[] = $this->generateAttachmentField($key, $value);
262
  }
263
 
vendor/monolog/monolog/src/Monolog/Handler/SlackHandler.php CHANGED
@@ -75,6 +75,11 @@ class SlackHandler extends SocketHandler
75
  return $this->slackRecord;
76
  }
77
 
 
 
 
 
 
78
  /**
79
  * {@inheritdoc}
80
  *
75
  return $this->slackRecord;
76
  }
77
 
78
+ public function getToken()
79
+ {
80
+ return $this->token;
81
+ }
82
+
83
  /**
84
  * {@inheritdoc}
85
  *
vendor/monolog/monolog/src/Monolog/Handler/SlackWebhookHandler.php CHANGED
@@ -70,6 +70,11 @@ class SlackWebhookHandler extends AbstractProcessingHandler
70
  return $this->slackRecord;
71
  }
72
 
 
 
 
 
 
73
  /**
74
  * {@inheritdoc}
75
  *
70
  return $this->slackRecord;
71
  }
72
 
73
+ public function getWebhookUrl()
74
+ {
75
+ return $this->webhookUrl;
76
+ }
77
+
78
  /**
79
  * {@inheritdoc}
80
  *
vendor/monolog/monolog/src/Monolog/Handler/SocketHandler.php CHANGED
@@ -27,15 +27,16 @@ class SocketHandler extends AbstractProcessingHandler
27
  private $timeout = 0;
28
  private $writingTimeout = 10;
29
  private $lastSentBytes = null;
 
30
  private $persistent = false;
31
  private $errno;
32
  private $errstr;
33
  private $lastWritingAt;
34
 
35
  /**
36
- * @param string $connectionString Socket connection string
37
- * @param int $level The minimum logging level at which this handler will be triggered
38
- * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not
39
  */
40
  public function __construct($connectionString, $level = Logger::DEBUG, $bubble = true)
41
  {
@@ -87,7 +88,7 @@ class SocketHandler extends AbstractProcessingHandler
87
  */
88
  public function setPersistent($persistent)
89
  {
90
- $this->persistent = (boolean) $persistent;
91
  }
92
 
93
  /**
@@ -127,6 +128,16 @@ class SocketHandler extends AbstractProcessingHandler
127
  $this->writingTimeout = (float) $seconds;
128
  }
129
 
 
 
 
 
 
 
 
 
 
 
130
  /**
131
  * Get current connection string
132
  *
@@ -177,6 +188,16 @@ class SocketHandler extends AbstractProcessingHandler
177
  return $this->writingTimeout;
178
  }
179
 
 
 
 
 
 
 
 
 
 
 
180
  /**
181
  * Check to see if the socket is currently available.
182
  *
@@ -219,6 +240,16 @@ class SocketHandler extends AbstractProcessingHandler
219
  return stream_set_timeout($this->resource, $seconds, $microseconds);
220
  }
221
 
 
 
 
 
 
 
 
 
 
 
222
  /**
223
  * Wrapper to allow mocking
224
  */
@@ -268,6 +299,7 @@ class SocketHandler extends AbstractProcessingHandler
268
  {
269
  $this->createSocketResource();
270
  $this->setSocketTimeout();
 
271
  }
272
 
273
  private function createSocketResource()
@@ -290,6 +322,13 @@ class SocketHandler extends AbstractProcessingHandler
290
  }
291
  }
292
 
 
 
 
 
 
 
 
293
  private function writeToSocket($data)
294
  {
295
  $length = strlen($data);
27
  private $timeout = 0;
28
  private $writingTimeout = 10;
29
  private $lastSentBytes = null;
30
+ private $chunkSize = null;
31
  private $persistent = false;
32
  private $errno;
33
  private $errstr;
34
  private $lastWritingAt;
35
 
36
  /**
37
+ * @param string $connectionString Socket connection string
38
+ * @param int $level The minimum logging level at which this handler will be triggered
39
+ * @param bool $bubble Whether the messages that are handled can bubble up the stack or not
40
  */
41
  public function __construct($connectionString, $level = Logger::DEBUG, $bubble = true)
42
  {
88
  */
89
  public function setPersistent($persistent)
90
  {
91
+ $this->persistent = (bool) $persistent;
92
  }
93
 
94
  /**
128
  $this->writingTimeout = (float) $seconds;
129
  }
130
 
131
+ /**
132
+ * Set chunk size. Only has effect during connection in the writing cycle.
133
+ *
134
+ * @param float $bytes
135
+ */
136
+ public function setChunkSize($bytes)
137
+ {
138
+ $this->chunkSize = $bytes;
139
+ }
140
+
141
  /**
142
  * Get current connection string
143
  *
188
  return $this->writingTimeout;
189
  }
190
 
191
+ /**
192
+ * Get current chunk size
193
+ *
194
+ * @return float
195
+ */
196
+ public function getChunkSize()
197
+ {
198
+ return $this->chunkSize;
199
+ }
200
+
201
  /**
202
  * Check to see if the socket is currently available.
203
  *
240
  return stream_set_timeout($this->resource, $seconds, $microseconds);
241
  }
242
 
243
+ /**
244
+ * Wrapper to allow mocking
245
+ *
246
+ * @see http://php.net/manual/en/function.stream-set-chunk-size.php
247
+ */
248
+ protected function streamSetChunkSize()
249
+ {
250
+ return stream_set_chunk_size($this->resource, $this->chunkSize);
251
+ }
252
+
253
  /**
254
  * Wrapper to allow mocking
255
  */
299
  {
300
  $this->createSocketResource();
301
  $this->setSocketTimeout();
302
+ $this->setStreamChunkSize();
303
  }
304
 
305
  private function createSocketResource()
322
  }
323
  }
324
 
325
+ private function setStreamChunkSize()
326
+ {
327
+ if ($this->chunkSize && !$this->streamSetChunkSize()) {
328
+ throw new \UnexpectedValueException("Failed setting chunk size with stream_set_chunk_size()");
329
+ }
330
+ }
331
+
332
  private function writeToSocket($data)
333
  {
334
  $length = strlen($data);
vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php CHANGED
@@ -32,9 +32,9 @@ class StreamHandler extends AbstractProcessingHandler
32
  /**
33
  * @param resource|string $stream
34
  * @param int $level The minimum logging level at which this handler will be triggered
35
- * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not
36
  * @param int|null $filePermission Optional file permissions (default (0644) are only for owner read/write)
37
- * @param Boolean $useLocking Try to lock log file before doing any writes
38
  *
39
  * @throws \Exception If a missing directory is not buildable
40
  * @throws \InvalidArgumentException If stream is not a resource or string
@@ -167,7 +167,7 @@ class StreamHandler extends AbstractProcessingHandler
167
  set_error_handler(array($this, 'customErrorHandler'));
168
  $status = mkdir($dir, 0777, true);
169
  restore_error_handler();
170
- if (false === $status) {
171
  throw new \UnexpectedValueException(sprintf('There is no existing directory at "%s" and its not buildable: '.$this->errorMessage, $dir));
172
  }
173
  }
32
  /**
33
  * @param resource|string $stream
34
  * @param int $level The minimum logging level at which this handler will be triggered
35
+ * @param bool $bubble Whether the messages that are handled can bubble up the stack or not
36
  * @param int|null $filePermission Optional file permissions (default (0644) are only for owner read/write)
37
+ * @param bool $useLocking Try to lock log file before doing any writes
38
  *
39
  * @throws \Exception If a missing directory is not buildable
40
  * @throws \InvalidArgumentException If stream is not a resource or string
167
  set_error_handler(array($this, 'customErrorHandler'));
168
  $status = mkdir($dir, 0777, true);
169
  restore_error_handler();
170
+ if (false === $status && !is_dir($dir)) {
171
  throw new \UnexpectedValueException(sprintf('There is no existing directory at "%s" and its not buildable: '.$this->errorMessage, $dir));
172
  }
173
  }
vendor/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php CHANGED
@@ -12,6 +12,7 @@
12
  namespace Monolog\Handler;
13
 
14
  use Monolog\Logger;
 
15
  use Monolog\Formatter\LineFormatter;
16
  use Swift;
17
 
@@ -29,7 +30,7 @@ class SwiftMailerHandler extends MailHandler
29
  * @param \Swift_Mailer $mailer The mailer to use
30
  * @param callable|\Swift_Message $message An example message for real messages, only the body will be replaced
31
  * @param int $level The minimum logging level at which this handler will be triggered
32
- * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not
33
  */
34
  public function __construct(\Swift_Mailer $mailer, $message, $level = Logger::ERROR, $bubble = true)
35
  {
@@ -47,6 +48,17 @@ class SwiftMailerHandler extends MailHandler
47
  $this->mailer->send($this->buildMessage($content, $records));
48
  }
49
 
 
 
 
 
 
 
 
 
 
 
 
50
  /**
51
  * Creates instance of Swift_Message to be sent
52
  *
@@ -69,7 +81,7 @@ class SwiftMailerHandler extends MailHandler
69
  }
70
 
71
  if ($records) {
72
- $subjectFormatter = new LineFormatter($message->getSubject());
73
  $message->setSubject($subjectFormatter->format($this->getHighestRecord($records)));
74
  }
75
 
12
  namespace Monolog\Handler;
13
 
14
  use Monolog\Logger;
15
+ use Monolog\Formatter\FormatterInterface;
16
  use Monolog\Formatter\LineFormatter;
17
  use Swift;
18
 
30
  * @param \Swift_Mailer $mailer The mailer to use
31
  * @param callable|\Swift_Message $message An example message for real messages, only the body will be replaced
32
  * @param int $level The minimum logging level at which this handler will be triggered
33
+ * @param bool $bubble Whether the messages that are handled can bubble up the stack or not
34
  */
35
  public function __construct(\Swift_Mailer $mailer, $message, $level = Logger::ERROR, $bubble = true)
36
  {
48
  $this->mailer->send($this->buildMessage($content, $records));
49
  }
50
 
51
+ /**
52
+ * Gets the formatter for the Swift_Message subject.
53
+ *
54
+ * @param string $format The format of the subject
55
+ * @return FormatterInterface
56
+ */
57
+ protected function getSubjectFormatter($format)
58
+ {
59
+ return new LineFormatter($format);
60
+ }
61
+
62
  /**
63
  * Creates instance of Swift_Message to be sent
64
  *
81
  }
82
 
83
  if ($records) {
84
+ $subjectFormatter = $this->getSubjectFormatter($message->getSubject());
85
  $message->setSubject($subjectFormatter->format($this->getHighestRecord($records)));
86
  }
87
 
vendor/monolog/monolog/src/Monolog/Handler/SyslogHandler.php CHANGED
@@ -32,11 +32,11 @@ class SyslogHandler extends AbstractSyslogHandler
32
  protected $logopts;
33
 
34
  /**
35
- * @param string $ident
36
- * @param mixed $facility
37
- * @param int $level The minimum logging level at which this handler will be triggered
38
- * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not
39
- * @param int $logopts Option flags for the openlog() call, defaults to LOG_PID
40
  */
41
  public function __construct($ident, $facility = LOG_USER, $level = Logger::DEBUG, $bubble = true, $logopts = LOG_PID)
42
  {
32
  protected $logopts;
33
 
34
  /**
35
+ * @param string $ident
36
+ * @param mixed $facility
37
+ * @param int $level The minimum logging level at which this handler will be triggered
38
+ * @param bool $bubble Whether the messages that are handled can bubble up the stack or not
39
+ * @param int $logopts Option flags for the openlog() call, defaults to LOG_PID
40
  */
41
  public function __construct($ident, $facility = LOG_USER, $level = Logger::DEBUG, $bubble = true, $logopts = LOG_PID)
42
  {
vendor/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php CHANGED
@@ -25,12 +25,12 @@ class SyslogUdpHandler extends AbstractSyslogHandler
25
  protected $ident;
26
 
27
  /**
28
- * @param string $host
29
- * @param int $port
30
- * @param mixed $facility
31
- * @param int $level The minimum logging level at which this handler will be triggered
32
- * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not
33
- * @param string $ident Program name or tag for each log message.
34
  */
35
  public function __construct($host, $port = 514, $facility = LOG_USER, $level = Logger::DEBUG, $bubble = true, $ident = 'php')
36
  {
25
  protected $ident;
26
 
27
  /**
28
+ * @param string $host
29
+ * @param int $port
30
+ * @param mixed $facility
31
+ * @param int $level The minimum logging level at which this handler will be triggered
32
+ * @param bool $bubble Whether the messages that are handled can bubble up the stack or not
33
+ * @param string $ident Program name or tag for each log message.
34
  */
35
  public function __construct($host, $port = 514, $facility = LOG_USER, $level = Logger::DEBUG, $bubble = true, $ident = 'php')
36
  {
vendor/monolog/monolog/src/Monolog/Handler/TestHandler.php CHANGED
@@ -84,14 +84,24 @@ class TestHandler extends AbstractProcessingHandler
84
  return isset($this->recordsByLevel[$level]);
85
  }
86
 
 
 
 
 
87
  public function hasRecord($record, $level)
88
  {
89
- if (is_array($record)) {
90
- $record = $record['message'];
91
  }
92
 
93
  return $this->hasRecordThatPasses(function ($rec) use ($record) {
94
- return $rec['message'] === $record;
 
 
 
 
 
 
95
  }, $level);
96
  }
97
 
84
  return isset($this->recordsByLevel[$level]);
85
  }
86
 
87
+ /**
88
+ * @param string|array $record Either a message string or an array containing message and optionally context keys that will be checked against all records
89
+ * @param int $level Logger::LEVEL constant value
90
+ */
91
  public function hasRecord($record, $level)
92
  {
93
+ if (is_string($record)) {
94
+ $record = array('message' => $record);
95
  }
96
 
97
  return $this->hasRecordThatPasses(function ($rec) use ($record) {
98
+ if ($rec['message'] !== $record['message']) {
99
+ return false;
100
+ }
101
+ if (isset($record['context']) && $rec['context'] !== $record['context']) {
102
+ return false;
103
+ }
104
+ return true;
105
  }, $level);
106
  }
107
 
vendor/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php CHANGED
@@ -48,6 +48,16 @@ class WhatFailureGroupHandler extends GroupHandler
48
  */
49
  public function handleBatch(array $records)
50
  {
 
 
 
 
 
 
 
 
 
 
51
  foreach ($this->handlers as $handler) {
52
  try {
53
  $handler->handleBatch($records);
48
  */
49
  public function handleBatch(array $records)
50
  {
51
+ if ($this->processors) {
52
+ $processed = array();
53
+ foreach ($records as $record) {
54
+ foreach ($this->processors as $processor) {
55
+ $processed[] = call_user_func($processor, $record);
56
+ }
57
+ }
58
+ $records = $processed;
59
+ }
60
+
61
  foreach ($this->handlers as $handler) {
62
  try {
63
  $handler->handleBatch($records);
vendor/monolog/monolog/src/Monolog/Logger.php CHANGED
@@ -15,6 +15,7 @@ use Monolog\Handler\HandlerInterface;
15
  use Monolog\Handler\StreamHandler;
16
  use Psr\Log\LoggerInterface;
17
  use Psr\Log\InvalidArgumentException;
 
18
 
19
  /**
20
  * Monolog log channel
@@ -24,7 +25,7 @@ use Psr\Log\InvalidArgumentException;
24
  *
25
  * @author Jordi Boggiano <j.boggiano@seld.be>
26
  */
27
- class Logger implements LoggerInterface
28
  {
29
  /**
30
  * Detailed debug information
@@ -133,6 +134,11 @@ class Logger implements LoggerInterface
133
  */
134
  protected $microsecondTimestamps = true;
135
 
 
 
 
 
 
136
  /**
137
  * @param string $name The logging channel
138
  * @param HandlerInterface[] $handlers Optional stack of handlers, the first one in the array is called first, etc.
@@ -141,7 +147,7 @@ class Logger implements LoggerInterface
141
  public function __construct($name, array $handlers = array(), array $processors = array())
142
  {
143
  $this->name = $name;
144
- $this->handlers = $handlers;
145
  $this->processors = $processors;
146
  }
147
 
@@ -281,7 +287,7 @@ class Logger implements LoggerInterface
281
  * @param int $level The logging level
282
  * @param string $message The log message
283
  * @param array $context The log context
284
- * @return Boolean Whether the record has been processed
285
  */
286
  public function addRecord($level, $message, array $context = array())
287
  {
@@ -329,27 +335,75 @@ class Logger implements LoggerInterface
329
  'extra' => array(),
330
  );
331
 
332
- foreach ($this->processors as $processor) {
333
- $record = call_user_func($processor, $record);
 
 
 
 
 
 
 
 
 
 
 
 
334
  }
335
 
336
- while ($handler = current($this->handlers)) {
337
- if (true === $handler->handle($record)) {
338
- break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
339
  }
 
 
340
 
341
- next($this->handlers);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
342
  }
343
 
344
- return true;
 
 
 
 
345
  }
346
 
347
  /**
348
  * Adds a log record at the DEBUG level.
349
  *
350
- * @param string $message The log message
351
- * @param array $context The log context
352
- * @return Boolean Whether the record has been processed
353
  */
354
  public function addDebug($message, array $context = array())
355
  {
@@ -359,9 +413,9 @@ class Logger implements LoggerInterface
359
  /**
360
  * Adds a log record at the INFO level.
361
  *
362
- * @param string $message The log message
363
- * @param array $context The log context
364
- * @return Boolean Whether the record has been processed
365
  */
366
  public function addInfo($message, array $context = array())
367
  {
@@ -371,9 +425,9 @@ class Logger implements LoggerInterface
371
  /**
372
  * Adds a log record at the NOTICE level.
373
  *
374
- * @param string $message The log message
375
- * @param array $context The log context
376
- * @return Boolean Whether the record has been processed
377
  */
378
  public function addNotice($message, array $context = array())
379
  {
@@ -383,9 +437,9 @@ class Logger implements LoggerInterface
383
  /**
384
  * Adds a log record at the WARNING level.
385
  *
386
- * @param string $message The log message
387
- * @param array $context The log context
388
- * @return Boolean Whether the record has been processed
389
  */
390
  public function addWarning($message, array $context = array())
391
  {
@@ -395,9 +449,9 @@ class Logger implements LoggerInterface
395
  /**
396
  * Adds a log record at the ERROR level.
397
  *
398
- * @param string $message The log message
399
- * @param array $context The log context
400
- * @return Boolean Whether the record has been processed
401
  */
402
  public function addError($message, array $context = array())
403
  {
@@ -407,9 +461,9 @@ class Logger implements LoggerInterface
407
  /**
408
  * Adds a log record at the CRITICAL level.
409
  *
410
- * @param string $message The log message
411
- * @param array $context The log context
412
- * @return Boolean Whether the record has been processed
413
  */
414
  public function addCritical($message, array $context = array())
415
  {
@@ -419,9 +473,9 @@ class Logger implements LoggerInterface
419
  /**
420
  * Adds a log record at the ALERT level.
421
  *
422
- * @param string $message The log message
423
- * @param array $context The log context
424
- * @return Boolean Whether the record has been processed
425
  */
426
  public function addAlert($message, array $context = array())
427
  {
@@ -431,9 +485,9 @@ class Logger implements LoggerInterface
431
  /**
432
  * Adds a log record at the EMERGENCY level.
433
  *
434
- * @param string $message The log message
435
- * @param array $context The log context
436
- * @return Boolean Whether the record has been processed
437
  */
438
  public function addEmergency($message, array $context = array())
439
  {
@@ -484,7 +538,7 @@ class Logger implements LoggerInterface
484
  * Checks whether the Logger has a handler that listens on the given level
485
  *
486
  * @param int $level
487
- * @return Boolean
488
  */
489
  public function isHandling($level)
490
  {
@@ -501,15 +555,52 @@ class Logger implements LoggerInterface
501
  return false;
502
  }
503
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
504
  /**
505
  * Adds a log record at an arbitrary level.
506
  *
507
  * This method allows for compatibility with common interfaces.
508
  *
509
  * @param mixed $level The log level
510
- * @param string $message The log message
511
- * @param array $context The log context
512
- * @return Boolean Whether the record has been processed
513
  */
514
  public function log($level, $message, array $context = array())
515
  {
@@ -523,9 +614,9 @@ class Logger implements LoggerInterface
523
  *
524
  * This method allows for compatibility with common interfaces.
525
  *
526
- * @param string $message The log message
527
- * @param array $context The log context
528
- * @return Boolean Whether the record has been processed
529
  */
530
  public function debug($message, array $context = array())
531
  {
@@ -537,9 +628,9 @@ class Logger implements LoggerInterface
537
  *
538
  * This method allows for compatibility with common interfaces.
539
  *
540
- * @param string $message The log message
541
- * @param array $context The log context
542
- * @return Boolean Whether the record has been processed
543
  */
544
  public function info($message, array $context = array())
545
  {
@@ -551,9 +642,9 @@ class Logger implements LoggerInterface
551
  *
552
  * This method allows for compatibility with common interfaces.
553
  *
554
- * @param string $message The log message
555
- * @param array $context The log context
556
- * @return Boolean Whether the record has been processed
557
  */
558
  public function notice($message, array $context = array())
559
  {
@@ -565,9 +656,9 @@ class Logger implements LoggerInterface
565
  *
566
  * This method allows for compatibility with common interfaces.
567
  *
568
- * @param string $message The log message
569
- * @param array $context The log context
570
- * @return Boolean Whether the record has been processed
571
  */
572
  public function warn($message, array $context = array())
573
  {
@@ -579,9 +670,9 @@ class Logger implements LoggerInterface
579
  *
580
  * This method allows for compatibility with common interfaces.
581
  *
582
- * @param string $message The log message
583
- * @param array $context The log context
584
- * @return Boolean Whether the record has been processed
585
  */
586
  public function warning($message, array $context = array())
587
  {
@@ -593,9 +684,9 @@ class Logger implements LoggerInterface
593
  *
594
  * This method allows for compatibility with common interfaces.
595
  *
596
- * @param string $message The log message
597
- * @param array $context The log context
598
- * @return Boolean Whether the record has been processed
599
  */
600
  public function err($message, array $context = array())
601
  {
@@ -607,9 +698,9 @@ class Logger implements LoggerInterface
607
  *
608
  * This method allows for compatibility with common interfaces.
609
  *
610
- * @param string $message The log message
611
- * @param array $context The log context
612
- * @return Boolean Whether the record has been processed
613
  */
614
  public function error($message, array $context = array())
615
  {
@@ -621,9 +712,9 @@ class Logger implements LoggerInterface
621
  *
622
  * This method allows for compatibility with common interfaces.
623
  *
624
- * @param string $message The log message
625
- * @param array $context The log context
626
- * @return Boolean Whether the record has been processed
627
  */
628
  public function crit($message, array $context = array())
629
  {
@@ -635,9 +726,9 @@ class Logger implements LoggerInterface
635
  *
636
  * This method allows for compatibility with common interfaces.
637
  *
638
- * @param string $message The log message
639
- * @param array $context The log context
640
- * @return Boolean Whether the record has been processed
641
  */
642
  public function critical($message, array $context = array())
643
  {
@@ -649,9 +740,9 @@ class Logger implements LoggerInterface
649
  *
650
  * This method allows for compatibility with common interfaces.
651
  *
652
- * @param string $message The log message
653
- * @param array $context The log context
654
- * @return Boolean Whether the record has been processed
655
  */
656
  public function alert($message, array $context = array())
657
  {
@@ -663,9 +754,9 @@ class Logger implements LoggerInterface
663
  *
664
  * This method allows for compatibility with common interfaces.
665
  *
666
- * @param string $message The log message
667
- * @param array $context The log context
668
- * @return Boolean Whether the record has been processed
669
  */
670
  public function emerg($message, array $context = array())
671
  {
@@ -677,9 +768,9 @@ class Logger implements LoggerInterface
677
  *
678
  * This method allows for compatibility with common interfaces.
679
  *
680
- * @param string $message The log message
681
- * @param array $context The log context
682
- * @return Boolean Whether the record has been processed
683
  */
684
  public function emergency($message, array $context = array())
685
  {
15
  use Monolog\Handler\StreamHandler;
16
  use Psr\Log\LoggerInterface;
17
  use Psr\Log\InvalidArgumentException;
18
+ use Exception;
19
 
20
  /**
21
  * Monolog log channel
25
  *
26
  * @author Jordi Boggiano <j.boggiano@seld.be>
27
  */
28
+ class Logger implements LoggerInterface, ResettableInterface
29
  {
30
  /**
31
  * Detailed debug information
134
  */
135
  protected $microsecondTimestamps = true;
136
 
137
+ /**
138
+ * @var callable
139
+ */
140
+ protected $exceptionHandler;
141
+
142
  /**
143
  * @param string $name The logging channel
144
  * @param HandlerInterface[] $handlers Optional stack of handlers, the first one in the array is called first, etc.
147
  public function __construct($name, array $handlers = array(), array $processors = array())
148
  {
149
  $this->name = $name;
150
+ $this->setHandlers($handlers);
151
  $this->processors = $processors;
152
  }
153
 
287
  * @param int $level The logging level
288
  * @param string $message The log message
289
  * @param array $context The log context
290
+ * @return bool Whether the record has been processed
291
  */
292
  public function addRecord($level, $message, array $context = array())
293
  {
335
  'extra' => array(),
336
  );
337
 
338
+ try {
339
+ foreach ($this->processors as $processor) {
340
+ $record = call_user_func($processor, $record);
341
+ }
342
+
343
+ while ($handler = current($this->handlers)) {
344
+ if (true === $handler->handle($record)) {
345
+ break;
346
+ }
347
+
348
+ next($this->handlers);
349
+ }
350
+ } catch (Exception $e) {
351
+ $this->handleException($e, $record);
352
  }
353
 
354
+ return true;
355
+ }
356
+
357
+ /**
358
+ * Ends a log cycle and frees all resources used by handlers.
359
+ *
360
+ * Closing a Handler means flushing all buffers and freeing any open resources/handles.
361
+ * Handlers that have been closed should be able to accept log records again and re-open
362
+ * themselves on demand, but this may not always be possible depending on implementation.
363
+ *
364
+ * This is useful at the end of a request and will be called automatically on every handler
365
+ * when they get destructed.
366
+ */
367
+ public function close()
368
+ {
369
+ foreach ($this->handlers as $handler) {
370
+ if (method_exists($handler, 'close')) {
371
+ $handler->close();
372
  }
373
+ }
374
+ }
375
 
376
+ /**
377
+ * Ends a log cycle and resets all handlers and processors to their initial state.
378
+ *
379
+ * Resetting a Handler or a Processor means flushing/cleaning all buffers, resetting internal
380
+ * state, and getting it back to a state in which it can receive log records again.
381
+ *
382
+ * This is useful in case you want to avoid logs leaking between two requests or jobs when you
383
+ * have a long running process like a worker or an application server serving multiple requests
384
+ * in one process.
385
+ */
386
+ public function reset()
387
+ {
388
+ foreach ($this->handlers as $handler) {
389
+ if ($handler instanceof ResettableInterface) {
390
+ $handler->reset();
391
+ }
392
  }
393
 
394
+ foreach ($this->processors as $processor) {
395
+ if ($processor instanceof ResettableInterface) {
396
+ $processor->reset();
397
+ }
398
+ }
399
  }
400
 
401
  /**
402
  * Adds a log record at the DEBUG level.
403
  *
404
+ * @param string $message The log message
405
+ * @param array $context The log context
406
+ * @return bool Whether the record has been processed
407
  */
408
  public function addDebug($message, array $context = array())
409
  {
413
  /**
414
  * Adds a log record at the INFO level.
415
  *
416
+ * @param string $message The log message
417
+ * @param array $context The log context
418
+ * @return bool Whether the record has been processed
419
  */
420
  public function addInfo($message, array $context = array())
421
  {
425
  /**
426
  * Adds a log record at the NOTICE level.
427
  *
428
+ * @param string $message The log message
429
+ * @param array $context The log context
430
+ * @return bool Whether the record has been processed
431
  */
432
  public function addNotice($message, array $context = array())
433
  {
437
  /**
438
  * Adds a log record at the WARNING level.
439
  *
440
+ * @param string $message The log message
441
+ * @param array $context The log context
442
+ * @return bool Whether the record has been processed
443
  */
444
  public function addWarning($message, array $context = array())
445
  {
449
  /**
450
  * Adds a log record at the ERROR level.
451
  *
452
+ * @param string $message The log message
453
+ * @param array $context The log context
454
+ * @return bool Whether the record has been processed
455
  */
456
  public function addError($message, array $context = array())
457
  {
461
  /**
462
  * Adds a log record at the CRITICAL level.
463
  *
464
+ * @param string $message The log message
465
+ * @param array $context The log context
466
+ * @return bool Whether the record has been processed
467
  */
468
  public function addCritical($message, array $context = array())
469
  {
473
  /**
474
  * Adds a log record at the ALERT level.
475
  *
476
+ * @param string $message The log message
477
+ * @param array $context The log context
478
+ * @return bool Whether the record has been processed
479
  */
480
  public function addAlert($message, array $context = array())
481
  {
485
  /**
486
  * Adds a log record at the EMERGENCY level.
487
  *
488
+ * @param string $message The log message
489
+ * @param array $context The log context
490
+ * @return bool Whether the record has been processed
491
  */
492
  public function addEmergency($message, array $context = array())
493
  {
538
  * Checks whether the Logger has a handler that listens on the given level
539
  *
540
  * @param int $level
541
+ * @return bool
542
  */
543
  public function isHandling($level)
544
  {
555
  return false;
556
  }
557
 
558
+ /**
559
+ * Set a custom exception handler
560
+ *
561
+ * @param callable $callback
562
+ * @return $this
563
+ */
564
+ public function setExceptionHandler($callback)
565
+ {
566
+ if (!is_callable($callback)) {
567
+ throw new \InvalidArgumentException('Exception handler must be valid callable (callback or object with an __invoke method), '.var_export($callback, true).' given');
568
+ }
569
+ $this->exceptionHandler = $callback;
570
+
571
+ return $this;
572
+ }
573
+
574
+ /**
575
+ * @return callable
576
+ */
577
+ public function getExceptionHandler()
578
+ {
579
+ return $this->exceptionHandler;
580
+ }
581
+
582
+ /**
583
+ * Delegates exception management to the custom exception handler,
584
+ * or throws the exception if no custom handler is set.
585
+ */
586
+ protected function handleException(Exception $e, array $record)
587
+ {
588
+ if (!$this->exceptionHandler) {
589
+ throw $e;
590
+ }
591
+
592
+ call_user_func($this->exceptionHandler, $e, $record);
593
+ }
594
+
595
  /**
596
  * Adds a log record at an arbitrary level.
597
  *
598
  * This method allows for compatibility with common interfaces.
599
  *
600
  * @param mixed $level The log level
601
+ * @param string $message The log message
602
+ * @param array $context The log context
603
+ * @return bool Whether the record has been processed
604
  */
605
  public function log($level, $message, array $context = array())
606
  {
614
  *
615
  * This method allows for compatibility with common interfaces.
616
  *
617
+ * @param string $message The log message
618
+ * @param array $context The log context
619
+ * @return bool Whether the record has been processed
620
  */
621
  public function debug($message, array $context = array())
622
  {
628
  *
629
  * This method allows for compatibility with common interfaces.
630
  *
631
+ * @param string $message The log message
632
+ * @param array $context The log context
633
+ * @return bool Whether the record has been processed
634
  */
635
  public function info($message, array $context = array())
636
  {
642
  *
643
  * This method allows for compatibility with common interfaces.
644
  *
645
+ * @param string $message The log message
646
+ * @param array $context The log context
647
+ * @return bool Whether the record has been processed
648
  */
649
  public function notice($message, array $context = array())
650
  {
656
  *
657
  * This method allows for compatibility with common interfaces.
658
  *
659
+ * @param string $message The log message
660
+ * @param array $context The log context
661
+ * @return bool Whether the record has been processed
662
  */
663
  public function warn($message, array $context = array())
664
  {
670
  *
671
  * This method allows for compatibility with common interfaces.
672
  *
673
+ * @param string $message The log message
674
+ * @param array $context The log context
675
+ * @return bool Whether the record has been processed
676
  */
677
  public function warning($message, array $context = array())
678
  {
684
  *
685
  * This method allows for compatibility with common interfaces.
686
  *
687
+ * @param string $message The log message
688
+ * @param array $context The log context
689
+ * @return bool Whether the record has been processed
690
  */
691
  public function err($message, array $context = array())
692
  {
698
  *
699
  * This method allows for compatibility with common interfaces.
700
  *
701
+ * @param string $message The log message
702
+ * @param array $context The log context
703
+ * @return bool Whether the record has been processed
704
  */
705
  public function error($message, array $context = array())
706
  {
712
  *
713
  * This method allows for compatibility with common interfaces.
714
  *
715
+ * @param string $message The log message
716
+ * @param array $context The log context
717
+ * @return bool Whether the record has been processed
718
  */
719
  public function crit($message, array $context = array())
720
  {
726
  *
727
  * This method allows for compatibility with common interfaces.
728
  *
729
+ * @param string $message The log message
730
+ * @param array $context The log context
731
+ * @return bool Whether the record has been processed
732
  */
733
  public function critical($message, array $context = array())
734
  {
740
  *
741
  * This method allows for compatibility with common interfaces.
742
  *
743
+ * @param string $message The log message
744
+ * @param array $context The log context
745
+ * @return bool Whether the record has been processed
746
  */
747
  public function alert($message, array $context = array())
748
  {
754
  *
755
  * This method allows for compatibility with common interfaces.
756
  *
757
+ * @param string $message The log message
758
+ * @param array $context The log context
759
+ * @return bool Whether the record has been processed
760
  */
761
  public function emerg($message, array $context = array())
762
  {
768
  *
769
  * This method allows for compatibility with common interfaces.
770
  *
771
+ * @param string $message The log message
772
+ * @param array $context The log context
773
+ * @return bool Whether the record has been processed
774
  */
775
  public function emergency($message, array $context = array())
776
  {
vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.php CHANGED
@@ -19,7 +19,7 @@ use Monolog\Logger;
19
  * @author Nick Otter
20
  * @author Jordi Boggiano <j.boggiano@seld.be>
21
  */
22
- class GitProcessor
23
  {
24
  private $level;
25
  private static $cache;
19
  * @author Nick Otter
20
  * @author Jordi Boggiano <j.boggiano@seld.be>
21
  */
22
+ class GitProcessor implements ProcessorInterface
23
  {
24
  private $level;
25
  private static $cache;
vendor/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php CHANGED
@@ -24,7 +24,7 @@ use Monolog\Logger;
24
  *
25
  * @author Jordi Boggiano <j.boggiano@seld.be>
26
  */
27
- class IntrospectionProcessor
28
  {
29
  private $level;
30
 
24
  *
25
  * @author Jordi Boggiano <j.boggiano@seld.be>
26
  */
27
+ class IntrospectionProcessor implements ProcessorInterface
28
  {
29
  private $level;
30
 
vendor/monolog/monolog/src/Monolog/Processor/MemoryProcessor.php CHANGED
@@ -16,7 +16,7 @@ namespace Monolog\Processor;
16
  *
17
  * @author Rob Jensen
18
  */
19
- abstract class MemoryProcessor
20
  {
21
  /**
22
  * @var bool If true, get the real size of memory allocated from system. Else, only the memory used by emalloc() is reported.
@@ -34,8 +34,8 @@ abstract class MemoryProcessor
34
  */
35
  public function __construct($realUsage = true, $useFormatting = true)
36
  {
37
- $this->realUsage = (boolean) $realUsage;
38
- $this->useFormatting = (boolean) $useFormatting;
39
  }
40
 
41
  /**
16
  *
17
  * @author Rob Jensen
18
  */
19
+ abstract class MemoryProcessor implements ProcessorInterface
20
  {
21
  /**
22
  * @var bool If true, get the real size of memory allocated from system. Else, only the memory used by emalloc() is reported.
34
  */
35
  public function __construct($realUsage = true, $useFormatting = true)
36
  {
37
+ $this->realUsage = (bool) $realUsage;
38
+ $this->useFormatting = (bool) $useFormatting;
39
  }
40
 
41
  /**
vendor/monolog/monolog/src/Monolog/Processor/MercurialProcessor.php CHANGED
@@ -18,7 +18,7 @@ use Monolog\Logger;
18
  *
19
  * @author Jonathan A. Schweder <jonathanschweder@gmail.com>
20
  */
21
- class MercurialProcessor
22
  {
23
  private $level;
24
  private static $cache;
18
  *
19
  * @author Jonathan A. Schweder <jonathanschweder@gmail.com>
20
  */
21
+ class MercurialProcessor implements ProcessorInterface
22
  {
23
  private $level;
24
  private static $cache;
vendor/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php CHANGED
@@ -16,7 +16,7 @@ namespace Monolog\Processor;
16
  *
17
  * @author Andreas Hörnicke
18
  */
19
- class ProcessIdProcessor
20
  {
21
  /**
22
  * @param array $record
16
  *
17
  * @author Andreas Hörnicke
18
  */
19
+ class ProcessIdProcessor implements ProcessorInterface
20
  {
21
  /**
22
  * @param array $record
vendor/monolog/monolog/src/Monolog/Processor/ProcessorInterface.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of the Monolog package.
5
+ *
6
+ * (c) Jordi Boggiano <j.boggiano@seld.be>
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ */
11
+
12
+ namespace Monolog\Processor;
13
+
14
+ /**
15
+ * An optional interface to allow labelling Monolog processors.
16
+ *
17
+ * @author Nicolas Grekas <p@tchwork.com>
18
+ */
19
+ interface ProcessorInterface
20
+ {
21
+ /**
22
+ * @return array The processed records
23
+ */
24
+ public function __invoke(array $records);
25
+ }
vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php CHANGED
@@ -11,6 +11,8 @@
11
 
12
  namespace Monolog\Processor;
13
 
 
 
14
  /**
15
  * Processes a record's message according to PSR-3 rules
16
  *
@@ -18,7 +20,7 @@ namespace Monolog\Processor;
18
  *
19
  * @author Jordi Boggiano <j.boggiano@seld.be>
20
  */
21
- class PsrLogMessageProcessor
22
  {
23
  /**
24
  * @param array $record
@@ -35,7 +37,7 @@ class PsrLogMessageProcessor
35
  if (is_null($val) || is_scalar($val) || (is_object($val) && method_exists($val, "__toString"))) {
36
  $replacements['{'.$key.'}'] = $val;
37
  } elseif (is_object($val)) {
38
- $replacements['{'.$key.'}'] = '[object '.get_class($val).']';
39
  } else {
40
  $replacements['{'.$key.'}'] = '['.gettype($val).']';
41
  }
11
 
12
  namespace Monolog\Processor;
13
 
14
+ use Monolog\Utils;
15
+
16
  /**
17
  * Processes a record's message according to PSR-3 rules
18
  *
20
  *
21
  * @author Jordi Boggiano <j.boggiano@seld.be>
22
  */
23
+ class PsrLogMessageProcessor implements ProcessorInterface
24
  {
25
  /**
26
  * @param array $record
37
  if (is_null($val) || is_scalar($val) || (is_object($val) && method_exists($val, "__toString"))) {
38
  $replacements['{'.$key.'}'] = $val;
39
  } elseif (is_object($val)) {
40
+ $replacements['{'.$key.'}'] = '[object '.Utils::getClass($val).']';
41
  } else {
42
  $replacements['{'.$key.'}'] = '['.gettype($val).']';
43
  }
vendor/monolog/monolog/src/Monolog/Processor/TagProcessor.php CHANGED
@@ -16,7 +16,7 @@ namespace Monolog\Processor;
16
  *
17
  * @author Martijn Riemers
18
  */
19
- class TagProcessor
20
  {
21
  private $tags;
22
 
16
  *
17
  * @author Martijn Riemers
18
  */
19
+ class TagProcessor implements ProcessorInterface
20
  {
21
  private $tags;
22
 
vendor/monolog/monolog/src/Monolog/Processor/UidProcessor.php CHANGED
@@ -11,12 +11,14 @@
11
 
12
  namespace Monolog\Processor;
13
 
 
 
14
  /**
15
  * Adds a unique identifier into records
16
  *
17
  * @author Simon Mönch <sm@webfactory.de>
18
  */
19
- class UidProcessor
20
  {
21
  private $uid;
22
 
@@ -26,7 +28,8 @@ class UidProcessor
26
  throw new \InvalidArgumentException('The uid length must be an integer between 1 and 32');
27
  }
28
 
29
- $this->uid = substr(hash('md5', uniqid('', true)), 0, $length);
 
30
  }
31
 
32
  public function __invoke(array $record)
@@ -43,4 +46,14 @@ class UidProcessor
43
  {
44
  return $this->uid;
45
  }
 
 
 
 
 
 
 
 
 
 
46
  }
11
 
12
  namespace Monolog\Processor;
13
 
14
+ use Monolog\ResettableInterface;
15
+
16
  /**
17
  * Adds a unique identifier into records
18
  *
19
  * @author Simon Mönch <sm@webfactory.de>
20
  */
21
+ class UidProcessor implements ProcessorInterface, ResettableInterface
22
  {
23
  private $uid;
24
 
28
  throw new \InvalidArgumentException('The uid length must be an integer between 1 and 32');
29
  }
30
 
31
+
32
+ $this->uid = $this->generateUid($length);
33
  }
34
 
35
  public function __invoke(array $record)
46
  {
47
  return $this->uid;
48
  }
49
+
50
+ public function reset()
51
+ {
52
+ $this->uid = $this->generateUid(strlen($this->uid));
53
+ }
54
+
55
+ private function generateUid($length)
56
+ {
57
+ return substr(hash('md5', uniqid('', true)), 0, $length);
58
+ }
59
  }
vendor/monolog/monolog/src/Monolog/Processor/WebProcessor.php CHANGED
@@ -16,7 +16,7 @@ namespace Monolog\Processor;
16
  *
17
  * @author Jordi Boggiano <j.boggiano@seld.be>
18
  */
19
- class WebProcessor
20
  {
21
  /**
22
  * @var array|\ArrayAccess
16
  *
17
  * @author Jordi Boggiano <j.boggiano@seld.be>
18
  */
19
+ class WebProcessor implements ProcessorInterface
20
  {
21
  /**
22
  * @var array|\ArrayAccess
vendor/monolog/monolog/src/Monolog/ResettableInterface.php ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of the Monolog package.
5
+ *
6
+ * (c) Jordi Boggiano <j.boggiano@seld.be>
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ */
11
+
12
+ namespace Monolog;
13
+
14
+ /**
15
+ * Handler or Processor implementing this interface will be reset when Logger::reset() is called.
16
+ *
17
+ * Resetting ends a log cycle gets them back to their initial state.
18
+ *
19
+ * Resetting a Handler or a Processor means flushing/cleaning all buffers, resetting internal
20
+ * state, and getting it back to a state in which it can receive log records again.
21
+ *
22
+ * This is useful in case you want to avoid logs leaking between two requests or jobs when you
23
+ * have a long running process like a worker or an application server serving multiple requests
24
+ * in one process.
25
+ *
26
+ * @author Grégoire Pineau <lyrixx@lyrixx.info>
27
+ */
28
+ interface ResettableInterface
29
+ {
30
+ public function reset();
31
+ }
vendor/monolog/monolog/src/Monolog/SignalHandler.php ADDED
@@ -0,0 +1,115 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of the Monolog package.
5
+ *
6
+ * (c) Jordi Boggiano <j.boggiano@seld.be>
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ */
11
+
12
+ namespace Monolog;
13
+
14
+ use Psr\Log\LoggerInterface;
15
+ use Psr\Log\LogLevel;
16
+ use ReflectionExtension;
17
+
18
+ /**
19
+ * Monolog POSIX signal handler
20
+ *
21
+ * @author Robert Gust-Bardon <robert@gust-bardon.org>
22
+ */
23
+ class SignalHandler
24
+ {
25
+ private $logger;
26
+
27
+ private $previousSignalHandler = array();
28
+ private $signalLevelMap = array();
29
+ private $signalRestartSyscalls = array();
30
+
31
+ public function __construct(LoggerInterface $logger)
32
+ {
33
+ $this->logger = $logger;
34
+ }
35
+
36
+ public function registerSignalHandler($signo, $level = LogLevel::CRITICAL, $callPrevious = true, $restartSyscalls = true, $async = true)
37
+ {
38
+ if (!extension_loaded('pcntl') || !function_exists('pcntl_signal')) {
39
+ return $this;
40
+ }
41
+
42
+ if ($callPrevious) {
43
+ if (function_exists('pcntl_signal_get_handler')) {
44
+ $handler = pcntl_signal_get_handler($signo);
45
+ if ($handler === false) {
46
+ return $this;
47
+ }
48
+ $this->previousSignalHandler[$signo] = $handler;
49
+ } else {
50
+ $this->previousSignalHandler[$signo] = true;
51
+ }
52
+ } else {
53
+ unset($this->previousSignalHandler[$signo]);
54
+ }
55
+ $this->signalLevelMap[$signo] = $level;
56
+ $this->signalRestartSyscalls[$signo] = $restartSyscalls;
57
+
58
+ if (function_exists('pcntl_async_signals') && $async !== null) {
59
+ pcntl_async_signals($async);
60
+ }
61
+
62
+ pcntl_signal($signo, array($this, 'handleSignal'), $restartSyscalls);
63
+
64
+ return $this;
65
+ }
66
+
67
+ public function handleSignal($signo, array $siginfo = null)
68
+ {
69
+ static $signals = array();
70
+
71
+ if (!$signals && extension_loaded('pcntl')) {
72
+ $pcntl = new ReflectionExtension('pcntl');
73
+ $constants = $pcntl->getConstants();
74
+ if (!$constants) {
75
+ // HHVM 3.24.2 returns an empty array.
76
+ $constants = get_defined_constants(true);
77
+ $constants = $constants['Core'];
78
+ }
79
+ foreach ($constants as $name => $value) {
80
+ if (substr($name, 0, 3) === 'SIG' && $name[3] !== '_' && is_int($value)) {
81
+ $signals[$value] = $name;
82
+ }
83
+ }
84
+ unset($constants);
85
+ }
86
+
87
+ $level = isset($this->signalLevelMap[$signo]) ? $this->signalLevelMap[$signo] : LogLevel::CRITICAL;
88
+ $signal = isset($signals[$signo]) ? $signals[$signo] : $signo;
89
+ $context = isset($siginfo) ? $siginfo : array();
90
+ $this->logger->log($level, sprintf('Program received signal %s', $signal), $context);
91
+
92
+ if (!isset($this->previousSignalHandler[$signo])) {
93
+ return;
94
+ }
95
+
96
+ if ($this->previousSignalHandler[$signo] === true || $this->previousSignalHandler[$signo] === SIG_DFL) {
97
+ if (extension_loaded('pcntl') && function_exists('pcntl_signal') && function_exists('pcntl_sigprocmask') && function_exists('pcntl_signal_dispatch')
98
+ && extension_loaded('posix') && function_exists('posix_getpid') && function_exists('posix_kill')) {
99
+ $restartSyscalls = isset($this->restartSyscalls[$signo]) ? $this->restartSyscalls[$signo] : true;
100
+ pcntl_signal($signo, SIG_DFL, $restartSyscalls);
101
+ pcntl_sigprocmask(SIG_UNBLOCK, array($signo), $oldset);
102
+ posix_kill(posix_getpid(), $signo);
103
+ pcntl_signal_dispatch();
104
+ pcntl_sigprocmask(SIG_SETMASK, $oldset);
105
+ pcntl_signal($signo, array($this, 'handleSignal'), $restartSyscalls);
106
+ }
107
+ } elseif (is_callable($this->previousSignalHandler[$signo])) {
108
+ if (PHP_VERSION_ID >= 70100) {
109
+ $this->previousSignalHandler[$signo]($signo, $siginfo);
110
+ } else {
111
+ $this->previousSignalHandler[$signo]($signo);
112
+ }
113
+ }
114
+ }
115
+ }
vendor/monolog/monolog/src/Monolog/Utils.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of the Monolog package.
5
+ *
6
+ * (c) Jordi Boggiano <j.boggiano@seld.be>
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ */
11
+
12
+ namespace Monolog;
13
+
14
+ class Utils
15
+ {
16
+ /**
17
+ * @internal
18
+ */
19
+ public static function getClass($object)
20
+ {
21
+ $class = \get_class($object);
22
+
23
+ return 'c' === $class[0] && 0 === strpos($class, "class@anonymous\0") ? get_parent_class($class).'@anonymous' : $class;
24
+ }
25
+ }
vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA.php CHANGED
@@ -1020,9 +1020,9 @@ class RSA
1020
  * @access private
1021
  * @see self::_convertPublicKey()
1022
  * @see self::_convertPrivateKey()
1023
- * @param string $key
1024
  * @param int $type
1025
- * @return array
1026
  */
1027
  function _parseKey($key, $type)
1028
  {
@@ -1505,8 +1505,9 @@ class RSA
1505
  * Returns true on success and false on failure (ie. an incorrect password was provided or the key was malformed)
1506
  *
1507
  * @access public
1508
- * @param string $key
1509
- * @param int $type optional
 
1510
  */
1511
  function loadKey($key, $type = false)
1512
  {
1020
  * @access private
1021
  * @see self::_convertPublicKey()
1022
  * @see self::_convertPrivateKey()
1023
+ * @param string|array $key
1024
  * @param int $type
1025
+ * @return array|bool
1026
  */
1027
  function _parseKey($key, $type)
1028
  {
1505
  * Returns true on success and false on failure (ie. an incorrect password was provided or the key was malformed)
1506
  *
1507
  * @access public
1508
+ * @param string|RSA|array $key
1509
+ * @param bool $type optional
1510
+ * @return bool
1511
  */
1512
  function loadKey($key, $type = false)
1513
  {
vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger.php CHANGED
@@ -45,7 +45,6 @@
45
  * @author Jim Wigginton <terrafrost@php.net>
46
  * @copyright 2006 Jim Wigginton
47
  * @license http://www.opensource.org/licenses/mit-license.html MIT License
48
- * @link http://pear.php.net/package/Math_BigInteger
49
  */
50
 
51
  namespace phpseclib\Math;
45
  * @author Jim Wigginton <terrafrost@php.net>
46
  * @copyright 2006 Jim Wigginton
47
  * @license http://www.opensource.org/licenses/mit-license.html MIT License
 
48
  */
49
 
50
  namespace phpseclib\Math;
wp_mail_smtp.php CHANGED
@@ -1,11 +1,12 @@
1
  <?php
2
  /**
3
  * Plugin Name: WP Mail SMTP
4
- * Version: 1.3.3
5
  * Plugin URI: https://wpforms.com/
6
- * Description: Reconfigures the wp_mail() function to use SMTP instead of mail() and creates an options page to manage the settings.
7
  * Author: WPForms
8
  * Author URI: https://wpforms.com/
 
9
  * Text Domain: wp-mail-smtp
10
  * Domain Path: /languages
11
  */
@@ -14,32 +15,45 @@
14
  * @author WPForms
15
  * @copyright WPForms, 2007-18, All Rights Reserved
16
  * This code is released under the GPL licence version 3 or later, available here
17
- * http://www.gnu.org/licenses/gpl.txt
18
  */
19
 
20
- define( 'WPMS_PLUGIN_VER', '1.3.3' );
21
  define( 'WPMS_PHP_VER', '5.3.6' );
22
 
23
  /**
24
  * Setting options in wp-config.php
25
  *
26
- * Specifically aimed at WPMU users, you can set the options for this plugin as
27
- * constants in wp-config.php. This disables the plugin's admin page and may
28
- * improve performance very slightly. Copy the code below into wp-config.php.
29
  */
30
 
31
  /*
32
- define('WPMS_ON', true);
33
- define('WPMS_MAIL_FROM', 'From Email');
34
- define('WPMS_MAIL_FROM_NAME', 'From Name');
35
- define('WPMS_MAILER', 'smtp'); // Possible values 'smtp', 'mail', or 'sendmail'
36
- define('WPMS_SET_RETURN_PATH', 'false'); // Sets $phpmailer->Sender if true
37
- define('WPMS_SMTP_HOST', 'localhost'); // The SMTP mail host
38
- define('WPMS_SMTP_PORT', 25); // The SMTP server port number
39
- define('WPMS_SSL', ''); // Possible values '', 'ssl', 'tls' - note TLS is not STARTTLS
40
- define('WPMS_SMTP_AUTH', true); // True turns on SMTP authentication, false turns it off
41
- define('WPMS_SMTP_USER', 'username'); // SMTP authentication username, only used if WPMS_SMTP_AUTH is true
42
- define('WPMS_SMTP_PASS', 'password'); // SMTP authentication password, only used if WPMS_SMTP_AUTH is true
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
  */
44
 
45
  /**
1
  <?php
2
  /**
3
  * Plugin Name: WP Mail SMTP
4
+ * Version: 1.4.0
5
  * Plugin URI: https://wpforms.com/
6
+ * Description: Reconfigures the <code>wp_mail()</code> function to use Gmail/Mailgun/SendGrid/SMTP instead of the default <code>mail()</code> and creates an options page to manage the settings.
7
  * Author: WPForms
8
  * Author URI: https://wpforms.com/
9
+ * Network: false
10
  * Text Domain: wp-mail-smtp
11
  * Domain Path: /languages
12
  */
15
  * @author WPForms
16
  * @copyright WPForms, 2007-18, All Rights Reserved
17
  * This code is released under the GPL licence version 3 or later, available here
18
+ * https://www.gnu.org/licenses/gpl.txt
19
  */
20
 
21
+ define( 'WPMS_PLUGIN_VER', '1.4.0' );
22
  define( 'WPMS_PHP_VER', '5.3.6' );
23
 
24
  /**
25
  * Setting options in wp-config.php
26
  *
27
+ * Specifically aimed at WP Multisite users, you can set the options for this plugin as
28
+ * constants in wp-config.php. Copy the code below into wp-config.php and tweak settings.
 
29
  */
30
 
31
  /*
32
+ define( 'WPMS_ON', true ); // True turns the whole constants support and usage on, false turns it off.
33
+
34
+ define( 'WPMS_MAIL_FROM', 'mail@example.com' );
35
+ define( 'WPMS_MAIL_FROM_FORCE', true ); // True turns it on, false turns it off.
36
+ define( 'WPMS_MAIL_FROM_NAME', 'From Name' );
37
+ define( 'WPMS_MAIL_FROM_NAME_FORCE', true ); // True turns it on, false turns it off.
38
+ define( 'WPMS_MAILER', 'smtp' ); // Possible values: 'mail', 'gmail', 'mailgun', 'sendgrid', 'smtp'.
39
+ define( 'WPMS_SET_RETURN_PATH', true ); // Sets $phpmailer->Sender if true.
40
+
41
+ define( 'WPMS_SMTP_HOST', 'localhost' ); // The SMTP mail host.
42
+ define( 'WPMS_SMTP_PORT', 25 ); // The SMTP server port number.
43
+ define( 'WPMS_SSL', '' ); // Possible values '', 'ssl', 'tls' - note TLS is not STARTTLS.
44
+ define( 'WPMS_SMTP_AUTH', true ); // True turns it on, false turns it off.
45
+ define( 'WPMS_SMTP_USER', 'username' ); // SMTP authentication username, only used if WPMS_SMTP_AUTH is true.
46
+ define( 'WPMS_SMTP_PASS', 'password' ); // SMTP authentication password, only used if WPMS_SMTP_AUTH is true.
47
+ define( 'WPMS_SMTP_AUTOTLS', true ); // True turns it on, false turns it off.
48
+
49
+ define( 'WPMS_GMAIL_CLIENT_ID', '' );
50
+ define( 'WPMS_GMAIL_CLIENT_SECRET', '' );
51
+
52
+ define( 'WPMS_MAILGUN_API_KEY', '' );
53
+ define( 'WPMS_MAILGUN_DOMAIN', '' );
54
+ define( 'WPMS_MAILGUN_REGION', 'US' ); // or 'EU' for Europe.
55
+
56
+ define( 'WPMS_SENDGRID_API_KEY', '' );
57
  */
58
 
59
  /**