Version Description
- 2019-07-09 =
- Added: Loo plugin support.
- Added: "About us" admin area page.
- Added: Display in debug output a possible conflicting plugin existence.
- Added: Lots of actions and filters to improve flexibility of the plugin.
- Changed: Plugin menu is now top level.
- Changed: Hide secrets/API keys in page DOM in plugin admin area.
- Changed: Do not save constant values into the database when plugin settings are saved.
- Changed: Lots of i18n improvements to support translation for both free and paid version of the plugin.
- Changed: Gmail mailer - allow to change From Name email header.
- Changed: Gmail mailer - display email used to create a connection.
- Changed: WordPress 4.9 is the minimum WordPress version we support.
- Fixed: X-Mailer header should be present in all emails.
- Fixed: PHP notices when migrating under certain circumstances from 0.x version of the plugin.
- Fixed: Options::get_group() now supports values set via constants.
Download this release
Release Info
Developer | slaFFik |
Plugin | WP Mail SMTP by WPForms |
Version | 1.5.0 |
Comparing to | |
See all releases |
Code changes from version 1.4.2 to 1.5.0
- assets/css/smtp-about.min.css +3 -0
- assets/css/smtp-admin.min.css +1 -1
- assets/css/smtp-logs.min.css +3 -0
- assets/images/about/icon-full.svg +1 -0
- assets/images/about/icon-none.svg +1 -0
- assets/images/about/icon-partial.svg +1 -0
- assets/images/about/plugin-mi.png +0 -0
- assets/images/about/plugin-om.png +0 -0
- assets/images/about/plugin-wpf.png +0 -0
- assets/images/about/team.jpg +0 -0
- assets/images/email/signature.png +0 -0
- assets/images/email/wp-mail-smtp.png +0 -0
- assets/images/gmail.png +0 -0
- assets/images/google.svg +1 -0
- assets/images/logo.png +0 -0
- assets/images/logo.svg +1 -0
- assets/images/mailgun.png +0 -0
- assets/images/mailgun.svg +1 -0
- assets/images/menu-icon.svg +1 -0
- assets/images/php.png +0 -0
- assets/images/php.svg +1 -0
- assets/images/sendgrid.png +0 -0
- assets/images/sendgrid.svg +1 -0
- assets/images/smtp.png +0 -0
- assets/images/smtp.svg +1 -0
- assets/js/jquery.matchHeight.js +388 -0
- assets/js/jquery.matchHeight.min.js +1 -0
- assets/js/smtp-about.js +181 -0
- assets/js/smtp-about.min.js +1 -0
- assets/js/smtp-admin.js +5 -5
- assets/js/smtp-admin.min.js +1 -1
- assets/languages/wp-mail-smtp.pot +1507 -0
- languages/wp-mail-smtp-he_IL.mo +0 -0
- languages/wp-mail-smtp-ja.mo +0 -0
- languages/wp-mail-smtp.pot +0 -1115
- loco.xml +29 -0
- readme.txt +85 -20
- src/Admin/Area.php +331 -58
- src/Admin/PageAbstract.php +18 -1
- src/Admin/Pages/About.php +705 -0
- src/Admin/Pages/Auth.php +5 -1
- src/Admin/Pages/Logs.php +107 -0
- src/Admin/Pages/Misc.php +2 -4
- src/Admin/Pages/Settings.php +173 -103
- src/Admin/Pages/Test.php +125 -134
- src/Admin/PluginsInstallSkin.php +78 -0
- src/Conflicts.php +185 -0
- src/Core.php +292 -133
- src/Geo.php +143 -0
- src/MailCatcher.php +44 -8
- src/Migration.php +13 -11
- src/Options.php +242 -83
- src/Processor.php +4 -1
- src/Providers/AuthAbstract.php +122 -0
- src/Providers/AuthInterface.php +13 -2
- src/Providers/Gmail/Auth.php +42 -119
- src/Providers/Gmail/Mailer.php +6 -1
- src/Providers/Gmail/Options.php +53 -29
- src/Providers/Loader.php +37 -12
- src/Providers/Mail/Options.php +1 -1
- src/Providers/MailerAbstract.php +44 -55
- src/Providers/Mailgun/Mailer.php +39 -1
- src/Providers/Mailgun/Options.php +13 -6
- src/Providers/OptionsAbstract.php +85 -5
- src/Providers/SMTP/Options.php +4 -5
- src/Providers/Sendgrid/Mailer.php +64 -12
- src/Providers/Sendgrid/Options.php +14 -7
- src/WP.php +102 -8
- uninstall.php +26 -7
- vendor/composer/ClassLoader.php +1 -1
- vendor/composer/autoload_files.php +1 -0
- vendor/composer/autoload_psr4.php +1 -0
- vendor/composer/autoload_static.php +6 -0
- vendor/google/apiclient-services/LICENSE +203 -203
- vendor/google/apiclient-services/src/Google/Service/Gmail.php +1218 -1197
- vendor/google/apiclient-services/src/Google/Service/Gmail/AutoForwarding.php +48 -48
- vendor/google/apiclient-services/src/Google/Service/Gmail/BatchDeleteMessagesRequest.php +31 -31
- vendor/google/apiclient-services/src/Google/Service/Gmail/BatchModifyMessagesRequest.php +49 -49
- vendor/google/apiclient-services/src/Google/Service/Gmail/Delegate.php +39 -39
- vendor/google/apiclient-services/src/Google/Service/Gmail/Draft.php +46 -46
- vendor/google/apiclient-services/src/Google/Service/Gmail/Filter.php +62 -62
- vendor/google/apiclient-services/src/Google/Service/Gmail/FilterAction.php +49 -49
- vendor/google/apiclient-services/src/Google/Service/Gmail/FilterCriteria.php +102 -102
- vendor/google/apiclient-services/src/Google/Service/Gmail/ForwardingAddress.php +39 -39
- vendor/google/apiclient-services/src/Google/Service/Gmail/History.php +111 -111
- vendor/google/apiclient-services/src/Google/Service/Gmail/HistoryLabelAdded.php +47 -47
- vendor/google/apiclient-services/src/Google/Service/Gmail/HistoryLabelRemoved.php +47 -47
- vendor/google/apiclient-services/src/Google/Service/Gmail/HistoryMessageAdded.php +37 -37
- vendor/google/apiclient-services/src/Google/Service/Gmail/HistoryMessageDeleted.php +37 -37
- vendor/google/apiclient-services/src/Google/Service/Gmail/ImapSettings.php +57 -57
- vendor/google/apiclient-services/src/Google/Service/Gmail/Label.php +118 -118
- vendor/google/apiclient-services/src/Google/Service/Gmail/LabelColor.php +39 -39
- vendor/google/apiclient-services/src/Google/Service/Gmail/LanguageSettings.php +30 -0
- vendor/google/apiclient-services/src/Google/Service/Gmail/ListDelegatesResponse.php +38 -38
- vendor/google/apiclient-services/src/Google/Service/Gmail/ListDraftsResponse.php +56 -56
- vendor/google/apiclient-services/src/Google/Service/Gmail/ListFiltersResponse.php +38 -38
- vendor/google/apiclient-services/src/Google/Service/Gmail/ListForwardingAddressesResponse.php +38 -38
- vendor/google/apiclient-services/src/Google/Service/Gmail/ListHistoryResponse.php +56 -56
- vendor/google/apiclient-services/src/Google/Service/Gmail/ListLabelsResponse.php +38 -38
- vendor/google/apiclient-services/src/Google/Service/Gmail/ListMessagesResponse.php +56 -56
- vendor/google/apiclient-services/src/Google/Service/Gmail/ListSendAsResponse.php +38 -38
- vendor/google/apiclient-services/src/Google/Service/Gmail/ListSmimeInfoResponse.php +38 -38
- vendor/google/apiclient-services/src/Google/Service/Gmail/ListThreadsResponse.php +56 -56
- vendor/google/apiclient-services/src/Google/Service/Gmail/Message.php +110 -110
- vendor/google/apiclient-services/src/Google/Service/Gmail/MessagePart.php +97 -97
- vendor/google/apiclient-services/src/Google/Service/Gmail/MessagePartBody.php +48 -48
- vendor/google/apiclient-services/src/Google/Service/Gmail/MessagePartHeader.php +39 -39
- vendor/google/apiclient-services/src/Google/Service/Gmail/ModifyMessageRequest.php +40 -40
- vendor/google/apiclient-services/src/Google/Service/Gmail/ModifyThreadRequest.php +40 -40
- vendor/google/apiclient-services/src/Google/Service/Gmail/PopSettings.php +39 -39
- vendor/google/apiclient-services/src/Google/Service/Gmail/Profile.php +57 -57
- vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/Users.php +71 -71
- vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersDrafts.php +130 -130
- vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersHistory.php +61 -61
- vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersLabels.php +120 -120
- vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersMessages.php +229 -229
- vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersMessagesAttachments.php +44 -44
- vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersSettings.php +184 -149
- vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersSettingsDelegates.php +119 -119
- vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersSettingsFilters.php +86 -86
- vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersSettingsForwardingAddresses.php +97 -97
- vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersSettingsSendAs.php +162 -162
- vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersSettingsSendAsSmimeInfo.php +115 -115
- vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersThreads.php +135 -135
- vendor/google/apiclient-services/src/Google/Service/Gmail/SendAs.php +109 -109
- vendor/google/apiclient-services/src/Google/Service/Gmail/SmimeInfo.php +84 -84
- vendor/google/apiclient-services/src/Google/Service/Gmail/SmtpMsa.php +66 -66
- vendor/google/apiclient-services/src/Google/Service/Gmail/Thread.php +65 -65
- vendor/google/apiclient-services/src/Google/Service/Gmail/VacationSettings.php +93 -93
- vendor/google/apiclient-services/src/Google/Service/Gmail/WatchRequest.php +49 -49
- vendor/google/apiclient-services/src/Google/Service/Gmail/WatchResponse.php +39 -39
- vendor/google/apiclient/src/Google/Client.php +21 -10
- vendor/google/apiclient/src/Google/Http/Batch.php +4 -0
- vendor/google/apiclient/src/Google/Http/MediaFileUpload.php +1 -1
- vendor/google/auth/src/ApplicationDefaultCredentials.php +12 -0
- vendor/google/auth/src/Credentials/AppIdentityCredentials.php +61 -19
- vendor/google/auth/src/Credentials/GCECredentials.php +135 -19
- vendor/google/auth/src/Credentials/InsecureCredentials.php +3 -1
- vendor/google/auth/src/Credentials/ServiceAccountCredentials.php +23 -2
- vendor/google/auth/src/Credentials/ServiceAccountJwtAccessCredentials.php +21 -2
- vendor/google/auth/src/Credentials/UserRefreshCredentials.php +7 -1
- vendor/google/auth/src/FetchAuthTokenCache.php +35 -1
- vendor/google/auth/src/HttpHandler/HttpClientCache.php +54 -0
- vendor/google/auth/src/HttpHandler/HttpHandlerFactory.php +0 -2
- vendor/google/auth/src/Iam.php +99 -0
- vendor/google/auth/src/OAuth2.php +16 -1
- vendor/google/auth/src/ServiceAccountSignerTrait.php +57 -0
- vendor/google/auth/src/SignBlobInterface.php +44 -0
- vendor/guzzlehttp/psr7/src/AppendStream.php +12 -4
- vendor/guzzlehttp/psr7/src/FnStream.php +9 -0
- vendor/guzzlehttp/psr7/src/InflateStream.php +1 -1
- vendor/guzzlehttp/psr7/src/LimitStream.php +1 -1
- vendor/guzzlehttp/psr7/src/MessageTrait.php +45 -15
- vendor/guzzlehttp/psr7/src/Request.php +11 -2
- vendor/guzzlehttp/psr7/src/Response.php +24 -2
- vendor/guzzlehttp/psr7/src/Rfc7230.php +18 -0
- vendor/guzzlehttp/psr7/src/ServerRequest.php +26 -8
- vendor/guzzlehttp/psr7/src/Stream.php +39 -29
- vendor/guzzlehttp/psr7/src/StreamWrapper.php +43 -3
- vendor/guzzlehttp/psr7/src/Uri.php +91 -33
- vendor/guzzlehttp/psr7/src/functions.php +101 -30
- vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA.php +155 -12
- vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger.php +15 -2
- vendor/{composer → ralouphie/getallheaders}/LICENSE +6 -6
- vendor/ralouphie/getallheaders/src/getallheaders.php +46 -0
- wp-mail-smtp-0.11.2.php +802 -0
- wp-mail-smtp.php +5 -2
- wp_mail_smtp.php +66 -779
assets/css/smtp-about.min.css
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
.wp-mail-smtp-page-about{padding:0 !important}.wp-mail-smtp-page-about *,.wp-mail-smtp-page-about *::before,.wp-mail-smtp-page-about *::after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wp-mail-smtp-page-about.wp-mail-smtp-tab-about-about .wp-mail-smtp-admin-about-plugins{padding:0 10px}.wp-mail-smtp-page-about.wp-mail-smtp-tab-about-about .wp-mail-smtp-admin-about-plugins .plugins-container{margin-left:-20px;margin-right:-20px}.wp-mail-smtp-page-about.wp-mail-smtp-tab-about-about .wp-mail-smtp-admin-about-plugins .plugins-container .plugin-container{padding:0 10px;float:left;width:33.333333%}@media (max-width: 1249px){.wp-mail-smtp-page-about.wp-mail-smtp-tab-about-about .wp-mail-smtp-admin-about-plugins .plugins-container .plugin-container{width:50%}}@media (max-width: 781px){.wp-mail-smtp-page-about.wp-mail-smtp-tab-about-about .wp-mail-smtp-admin-about-plugins .plugins-container .plugin-container{width:100%;margin-bottom:20px}}.wp-mail-smtp-page-about.wp-mail-smtp-tab-about-about .wp-mail-smtp-admin-about-plugins .plugins-container h5{font-size:17px;font-weight:700}.wp-mail-smtp-page-about.wp-mail-smtp-tab-about-about .wp-mail-smtp-admin-about-plugins .plugins-container .plugin-item{background-color:#fff;border:1px solid #ddd;border-radius:3px;margin:0 0 40px 0}@media (max-width: 781px){.wp-mail-smtp-page-about.wp-mail-smtp-tab-about-about .wp-mail-smtp-admin-about-plugins .plugins-container .plugin-item{margin:0 0}}.wp-mail-smtp-page-about.wp-mail-smtp-tab-about-about .wp-mail-smtp-admin-about-plugins .plugins-container .plugin-item img{border:1px solid #eee;float:left;max-width:75px;padding:10px}.wp-mail-smtp-page-about.wp-mail-smtp-tab-about-about .wp-mail-smtp-admin-about-plugins .plugins-container .plugin-item img[src*="-mi"]{padding:13px}.wp-mail-smtp-page-about.wp-mail-smtp-tab-about-about .wp-mail-smtp-admin-about-plugins .plugins-container .plugin-item h5{margin:0 0 10px 100px;font-size:16px}.wp-mail-smtp-page-about.wp-mail-smtp-tab-about-about .wp-mail-smtp-admin-about-plugins .plugins-container .plugin-item p{margin:0 0 0 100px}.wp-mail-smtp-page-about.wp-mail-smtp-tab-about-about .wp-mail-smtp-admin-about-plugins .plugins-container .plugin-item .details{padding:20px}.wp-mail-smtp-page-about.wp-mail-smtp-tab-about-about .wp-mail-smtp-admin-about-plugins .plugins-container .plugin-item .actions{background-color:#f7f7f7;border-top:1px solid #ddd;padding:20px;position:relative}.wp-mail-smtp-page-about.wp-mail-smtp-tab-about-about .wp-mail-smtp-admin-about-plugins .plugins-container .plugin-item .actions .msg{background-color:#f7f7f7;position:absolute;text-align:center;font-weight:600;top:0;left:0;height:100%;width:100%;z-index:99;padding:20px;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-align-items:center;-ms-align-items:center;align-items:center;justify-content:center}.wp-mail-smtp-page-about.wp-mail-smtp-tab-about-about .wp-mail-smtp-admin-about-plugins .plugins-container .plugin-item .actions .msg.success{color:#2a9b39}.wp-mail-smtp-page-about.wp-mail-smtp-tab-about-about .wp-mail-smtp-admin-about-plugins .plugins-container .plugin-item .actions .msg.error{color:red}.wp-mail-smtp-page-about.wp-mail-smtp-tab-about-about .wp-mail-smtp-admin-about-plugins .plugins-container .plugin-item .status{float:left;padding-top:8px}.wp-mail-smtp-page-about.wp-mail-smtp-tab-about-about .wp-mail-smtp-admin-about-plugins .plugins-container .plugin-item .status .status-inactive{color:red}.wp-mail-smtp-page-about.wp-mail-smtp-tab-about-about .wp-mail-smtp-admin-about-plugins .plugins-container .plugin-item .status .status-download{color:#666}.wp-mail-smtp-page-about.wp-mail-smtp-tab-about-about .wp-mail-smtp-admin-about-plugins .plugins-container .plugin-item .status .status-active{color:#2a9b39}.wp-mail-smtp-page-about.wp-mail-smtp-tab-about-about .wp-mail-smtp-admin-about-plugins .plugins-container .plugin-item .action-button{float:right}.wp-mail-smtp-page-about.wp-mail-smtp-tab-about-about .wp-mail-smtp-admin-about-plugins .plugins-container .plugin-item .action-button button{background:none;cursor:pointer;width:140px;text-align:center;display:inline-block;text-decoration:none;font-size:13px;line-height:26px;height:28px;margin:0;padding:0 10px 1px;-webkit-appearance:none;border-radius:3px;border:1px solid #cccccc;background:#f7f7f7;box-shadow:0 1px 0 #cccccc;font-weight:normal}.wp-mail-smtp-page-about.wp-mail-smtp-tab-about-about .wp-mail-smtp-admin-about-plugins .plugins-container .plugin-item .action-button button:hover,.wp-mail-smtp-page-about.wp-mail-smtp-tab-about-about .wp-mail-smtp-admin-about-plugins .plugins-container .plugin-item .action-button button:focus,.wp-mail-smtp-page-about.wp-mail-smtp-tab-about-about .wp-mail-smtp-admin-about-plugins .plugins-container .plugin-item .action-button button.loading{background:#fafafa;border-color:#999;color:#23282d}.wp-mail-smtp-page-about.wp-mail-smtp-tab-about-about .wp-mail-smtp-admin-about-plugins .plugins-container .plugin-item .action-button button .fa{margin-right:8px}.wp-mail-smtp-page-about.wp-mail-smtp-tab-about-about .wp-mail-smtp-admin-about-plugins .plugins-container .plugin-item .action-button button .fa.fa-spinner{margin-right:0}.wp-mail-smtp-page-about.wp-mail-smtp-tab-about-about .wp-mail-smtp-admin-about-plugins .plugins-container .plugin-item .action-button button.button-primary{background:#0085ba;border-color:#0073aa #006799 #006799;box-shadow:0 1px 0 #006799;color:#fff;text-shadow:0 -1px 1px #006799, 1px 0 1px #006799, 0 1px 1px #006799, -1px 0 1px #006799}.wp-mail-smtp-page-about.wp-mail-smtp-tab-about-about .wp-mail-smtp-admin-about-plugins .plugins-container .plugin-item .action-button button.button-primary:hover,.wp-mail-smtp-page-about.wp-mail-smtp-tab-about-about .wp-mail-smtp-admin-about-plugins .plugins-container .plugin-item .action-button button.button-primary:focus{background:#008ec2;border-color:#006799;color:#fff}.wp-mail-smtp-page-about.wp-mail-smtp-tab-about-about .wp-mail-smtp-admin-about-plugins .plugins-container .plugin-item .action-button button.button-primary .fa-spinner{color:#fff}.wp-mail-smtp-page-about.wp-mail-smtp-tab-about-about .wp-mail-smtp-admin-about-plugins .plugins-container .plugin-item .action-button button.button-secondary{color:#555;border-color:#cccccc;background:#f7f7f7;box-shadow:0 1px 0 #cccccc}.wp-mail-smtp-page-about.wp-mail-smtp-tab-about-about .wp-mail-smtp-admin-about-plugins .plugins-container .plugin-item .action-button button.button-secondary:hover,.wp-mail-smtp-page-about.wp-mail-smtp-tab-about-about .wp-mail-smtp-admin-about-plugins .plugins-container .plugin-item .action-button button.button-secondary:focus{background:#fafafa;border-color:#999;color:#23282d}.wp-mail-smtp-page-about.wp-mail-smtp-tab-about-about .wp-mail-smtp-admin-about-plugins .plugins-container .plugin-item .action-button button.status-active .fa{color:#2a9b39}.wp-mail-smtp-page-about.wp-mail-smtp-tab-about-about .wp-mail-smtp-admin-about-plugins .plugins-container .plugin-item .action-button button.status-inactive .fa{color:red}.wp-mail-smtp-page-about.wp-mail-smtp-tab-about-about .wp-mail-smtp-admin-about-plugins .plugins-container .plugin-item .action-button button.status-download .fa{color:#999}.wp-mail-smtp-page-about.wp-mail-smtp-tab-about-about .wp-mail-smtp-admin-about-plugins .plugins-container .plugin-item .action-button button.loading .fa{color:#666}.wp-mail-smtp-page-about.wp-mail-smtp-tab-about-about .wp-mail-smtp-admin-about-plugins .plugins-container .plugin-item .action-button button.disabled{cursor:default}.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section{margin:0 0 20px;padding:30px;background:#fff;border:1px solid #E5E6E6;line-height:2}.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section h1,.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section h2,.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section h3,.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section h4,.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section h5{margin-top:0;padding-top:0;line-height:1.6}.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section h2{font-size:24px}.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section h3{font-size:18px;margin-bottom:30px;color:#23282C}.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section ul,.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section p{font-size:16px}.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section p{margin-bottom:20px}.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section p.bigger{font-size:18px}.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section p.smaller{font-size:14px}.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section p:last-child{margin-bottom:0}.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section hr{margin:30px 0}.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section figure{margin:0}.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section figure img{width:100%}.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section figure figcaption{font-size:14px;color:#888888;margin-top:5px;text-align:center;line-height:initial}.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section .wp-mail-smtp-admin-column-40{padding-left:15px}@media (max-width: 781px){.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section .wp-mail-smtp-admin-column-40{width:100%;padding-left:0;padding-top:20px}}.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section .wp-mail-smtp-admin-column-60{padding-right:15px}@media (max-width: 781px){.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section .wp-mail-smtp-admin-column-60{width:100%;padding-right:0}}.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section ul.list-plain{margin-top:0;margin-bottom:0}.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section ul.list-plain li{margin-bottom:0}.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section ul.list-features li .fa{color:#2a9b39;margin:0 8px 0 0}.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section .fa-star{color:gold}.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section .no-margin{margin:0 !important}.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section .no-padding{padding:0 !important}.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section .centered{text-align:center !important}.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section-hero{padding:0}.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section-hero .wp-mail-smtp-admin-about-section-hero-main,.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section-hero .wp-mail-smtp-admin-about-section-hero-extra{padding:30px}.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section-hero .wp-mail-smtp-admin-about-section-hero-extra table{width:100%}@media (max-width: 781px){.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section-hero .wp-mail-smtp-admin-about-section-hero-extra .wp-mail-smtp-admin-column-50{float:none;width:100%}}.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section-hero .wp-mail-smtp-admin-about-section-hero-main{background-color:#FAFAFA;border-bottom:1px solid #E5E6E6}.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section-hero .wp-mail-smtp-admin-about-section-hero-main.no-border{border-bottom:0}.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section-hero .wp-mail-smtp-admin-about-section-hero-main p{color:#666}.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section-hero h3.call-to-action{margin-bottom:-10px}.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section-hero span.price-off{color:#6AB255}.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section-squashed{margin-bottom:0}.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section-squashed:not(:last-of-type){border-bottom:0}.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section-post h2{margin-bottom:-10px}.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section-post h3{margin-bottom:15px}.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section-post p:last-of-type{margin-bottom:30px}.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section-post .wp-mail-smtp-admin-column-20{padding-right:20px;width:auto}.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section-post .wp-mail-smtp-admin-column-20 img{width:270px}@media (max-width: 781px){.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section-post .wp-mail-smtp-admin-column-20{width:20%}.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section-post .wp-mail-smtp-admin-column-20 img{width:auto;max-width:100%}}.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section-post .wp-mail-smtp-admin-column-80{padding-left:20px;width:calc(100% - 20px - 270px)}@media (max-width: 781px){.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section-post .wp-mail-smtp-admin-column-80{width:80%}}.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section-post .wp-mail-smtp-admin-about-section-post-link{padding:10px 15px;background-color:#DF7739;color:#fff;border-radius:3px;text-decoration:none;margin-top:15px;font-size:14px}.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section-post .wp-mail-smtp-admin-about-section-post-link:hover{background-color:#B85A1B}.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section-post .wp-mail-smtp-admin-about-section-post-link .fa{color:#EDBA9E;vertical-align:middle;margin-left:8px}.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section-table table{border-collapse:collapse}.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section-table table tr td{border-bottom:1px solid #E5E6E6;border-right:1px solid #E5E6E6;padding:30px;vertical-align:top}.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section-table table tr td:last-of-type{border-right:0}.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section-table table tr:last-child td{border-bottom:none}.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section-table table p{background-repeat:no-repeat;background-size:15px auto;background-position:0 6px;margin:0}.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section-table table p.features-full{padding-left:30px;background-image:url(../images/about/icon-full.svg)}.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section-table table p.features-none{padding-left:30px;background-image:url(../images/about/icon-none.svg)}.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section-table table p.features-partial{padding-left:30px;background-position:-3px 0;background-size:23px auto;background-image:url(../images/about/icon-partial.svg)}.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section-table .wp-mail-smtp-admin-about-section-hero-main{padding:0}.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section-table .wp-mail-smtp-admin-about-section-hero-main h3{padding:30px 30px 30px 60px}.wp-mail-smtp-page-about .wp-mail-smtp-admin-about-section-table .wp-mail-smtp-admin-about-section-hero-main .wp-mail-smtp-admin-column-33:first-child h3{padding:30px}
|
2 |
+
|
3 |
+
/*# sourceMappingURL=smtp-about.min.css.map */
|
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 .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 */
|
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-hide{display:none}#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.tab{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.tab.active{border-bottom:2px solid #FF982D}#wp-mail-smtp .wp-mail-smtp-page-title a.tab:hover{border-color:#999}#wp-mail-smtp .wp-mail-smtp-page-title a.action{padding:5px;border:0;min-height:auto;color:#fff;margin:-10px 0 0 20px}#wp-mail-smtp .wp-mail-smtp-page-title .page-title{background-color:#fff;display:inline-block;font-size:23px;margin:0;padding:20px 20px 20px 0}#wp-mail-smtp .wp-mail-smtp-page-content{padding:0 20px}#wp-mail-smtp .wp-mail-smtp-page-content *,#wp-mail-smtp .wp-mail-smtp-page-content *::before,#wp-mail-smtp .wp-mail-smtp-page-content *::after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-clear:before{content:" ";display:table}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-clear:after{clear:both;content:" ";display:table}#wp-mail-smtp .wp-mail-smtp-page-content .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-content .wp-mail-smtp-setting-row:first-of-type{padding-top:10px !important}@media (max-width: 781px){#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row{padding:20px 0}}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row.inactive{display:none}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row .wp-mail-smtp-setting-mid-row-sep{background:#e4e4e4;height:1px;border:0;margin:15px 0}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row.section-heading{padding:20px 0}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row.section-heading.no-desc h2,#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row.section-heading.no-desc h4{margin:0}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row.section-heading .wp-mail-smtp-setting-field{margin:0;max-width:1000px}#wp-mail-smtp .wp-mail-smtp-page-content .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-content .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-content .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox .desc{margin:0 0 0 30px}#wp-mail-smtp .wp-mail-smtp-page-content .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-content .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-text .wp-mail-smtp-setting-label,#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-password .wp-mail-smtp-setting-label,#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-number .wp-mail-smtp-setting-label,#wp-mail-smtp .wp-mail-smtp-page-content .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-content .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-content .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-content .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-content .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-content .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-content .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-content .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:#46B450}#wp-mail-smtp .wp-mail-smtp-page-content .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-content .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox-toggle .wp-mail-smtp-setting-field input[type=checkbox]:disabled+.wp-mail-smtp-setting-toggle-switch{background-color:#69c471;cursor:default}#wp-mail-smtp .wp-mail-smtp-page-content .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-content .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-content .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox-toggle .wp-mail-smtp-setting-field input[type=checkbox]:disabled+.wp-mail-smtp-setting-toggle-switch+.wp-mail-smtp-setting-toggle-checked-label,#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox-toggle .wp-mail-smtp-setting-field input[type=checkbox]:disabled+.wp-mail-smtp-setting-toggle-switch+.wp-mail-smtp-setting-toggle-unchecked-label{color:#aaa}#wp-mail-smtp .wp-mail-smtp-page-content .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-content .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:400;color:#777;font-size:13px}#wp-mail-smtp .wp-mail-smtp-page-content .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-content .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-content .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-content .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-mailer{padding-bottom:20px}#wp-mail-smtp .wp-mail-smtp-page-content .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-content .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-content .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-content .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-mailer .wp-mail-smtp-mailer .wp-mail-smtp-mailer-image img{max-width:90%;max-height:40px;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-content .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-mailer .wp-mail-smtp-mailer.wp-mail-smtp-mailer-smtp .wp-mail-smtp-mailer-image img{max-height:30px}#wp-mail-smtp .wp-mail-smtp-page-content .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-content .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-content .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-content .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-content .wp-mail-smtp-setting-row h2,#wp-mail-smtp .wp-mail-smtp-page-content .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-content .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-content .wp-mail-smtp-setting-row p{margin:12px 0 0;font-size:14px;line-height:1.3}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row p:first-of-type{margin:8px 0 0}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row p.desc{font-style:italic;color:#777}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row p.inline-error{margin:5px 0 15px;box-sizing:border-box;background:#fff;border-left:4px solid #dc3232;box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);padding:10px}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row ul{margin:8px 0 0}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row ul.list li{margin-left:20px;list-style-type:disc}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row table.actions-list td,#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row table.actions-list th{padding:5px 5px 5px 0;text-align:left}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row table.actions-list td.email{padding-right:2em}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row table.actions-list td.status{width:100px}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row table.actions-list td.actions a{border-bottom:1px solid;display:inline-block;margin-right:5px;text-decoration:none}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row table.actions-list td.actions a[class*=delete]{color:#a00}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row table.actions-list td.actions a[class*=delete]:hover,#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row table.actions-list td.actions a[class*=delete]:active,#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row table.actions-list td.actions a[class*=delete]:focus{color:#400}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=text],#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=email],#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=number],#wp-mail-smtp .wp-mail-smtp-page-content .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-content .wp-mail-smtp-setting-row input[type=text],#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=email],#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=number],#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=password]{width:300px}}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=text][readonly],#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=email][readonly],#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=number][readonly],#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=password][readonly]{background-color:#f9f9f9}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=text].small-text,#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=email].small-text,#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=number].small-text,#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=password].small-text{width:75px}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=text]:focus,#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=email]:focus,#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=number]:focus,#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=password]:focus{border-color:#bbb}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=text]:disabled,#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=email]:disabled,#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=number]:disabled,#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=password]:disabled{opacity:0.6}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-label{display:block;float:left;width:200px;padding:0 20px 0 0}@media (max-width: 781px){#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-label{float:none;width:100%;padding-bottom:15px}}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-label label{display:block;font-weight:600;font-size:1.1em}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-field{display:block;margin:0 0 0 200px;max-width:1064px}@media (max-width: 781px){#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-field{margin:0}}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-submit{margin:0;padding:25px 0}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-submit .help-text{margin-left:10px;vertical-align:middle}#wp-mail-smtp .wp-mail-smtp-page-content .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-content .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-content.wp-mail-smtp-page-general p{margin:0}#wp-mail-smtp .wp-mail-smtp-page-content .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-content .notice-inline.notice-success{border-left-color:#46b450}#wp-mail-smtp .wp-mail-smtp-page-content .notice-inline.notice-warning{border-left-color:#ffb900}#wp-mail-smtp .wp-mail-smtp-page-content .notice-inline.notice-error{border-left-color:#dc3232}#wp-mail-smtp .wp-mail-smtp-page-content .notice-inline.notice-info{border-left-color:#00a0d2}#wp-mail-smtp .wp-mail-smtp-page-content .notice p,#wp-mail-smtp .wp-mail-smtp-page-content .notice-inline p{margin:0.5em 0;padding:2px}#wp-mail-smtp .wp-mail-smtp-page-content pre{white-space:pre-line}#wp-mail-smtp .wp-mail-smtp-page-content.active{display:block}#wp-mail-smtp .wp-mail-smtp-page-content .connected-as{margin-left:30px}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug{background-color:#fff;padding:25px 20px 1px 25px}#wp-mail-smtp .wp-mail-smtp-page-content #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-content #wp-mail-smtp-debug p{font-size:14px;color:#555;margin-bottom:1.1em}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug ul,#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug ol{font-size:14px;color:#555;margin:0 0 1.1em 1.8em}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug ul li,#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug ol li{margin:0 0 8px 0;line-height:1.5}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug ul li:last-of-type,#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug ol li:last-of-type{margin:0}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug ul li ul,#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug ol li ul{list-style-type:disc}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug a{color:#FF982D}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug a:hover{color:#f97f00}#wp-mail-smtp .wp-mail-smtp-page-content #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-content #wp-mail-smtp-debug .price-off{color:green;font-weight:bold}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug .error-log-toggle{text-decoration:none;color:#444}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug .error-log-toggle:hover{color:#FF982D}#wp-mail-smtp .wp-mail-smtp-page-content #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-content #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-content #wp-mail-smtp-debug .error-log pre{margin:0}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug .error-log-note{display:none}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner{background-color:#fff;padding:25px 20px;border:1px solid #dadada;margin:10px 0 0 0;position:relative}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner .wp-mail-smtp-pro-banner-dismiss{position:absolute;right:10px;top:10px}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner .wp-mail-smtp-pro-banner-dismiss button{background:none;border:none;color:#a9a9a9;cursor:pointer;margin:0;padding:0}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner h2{color:#444;margin-top:0;font-size:16px;font-weight:700}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner p{font-size:14px;color:#555;margin-bottom:1.1em}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner p:last-of-type{margin:0}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner .benefits{margin:0 0 16px 0;overflow:auto;max-width:1000px}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner .benefits ul{margin:0;padding:0;width:50%;float:left}@media (max-width: 600px){#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner .benefits ul{width:100%;float:none}}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner .benefits ul li{margin:0;padding:0 0 2px 16px;color:#555;font-size:14px;position:relative}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner .benefits ul li:before{content:'+';position:absolute;top:-1px;left:0}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner .benefits ul li.arrow-right:before{content:'→'}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner a{color:#FF982D}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner a:hover,#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner a:active,#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner a:focus{color:#f97f00}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner .stars{text-decoration:none}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner .stars .dashicons{width:16px;height:16px;font-size:16px;vertical-align:text-top}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner .price-off{color:green;font-weight:bold}#wp-mail-smtp .wp-mail-smtp-admin-columns>div[class*="-column-"]{float:left}#wp-mail-smtp .wp-mail-smtp-admin-columns .wp-mail-smtp-admin-column-20{width:20%}#wp-mail-smtp .wp-mail-smtp-admin-columns .wp-mail-smtp-admin-column-33{width:33.33333%}#wp-mail-smtp .wp-mail-smtp-admin-columns .wp-mail-smtp-admin-column-40{width:40%}#wp-mail-smtp .wp-mail-smtp-admin-columns .wp-mail-smtp-admin-column-50{width:50%}#wp-mail-smtp .wp-mail-smtp-admin-columns .wp-mail-smtp-admin-column-60{width:60%}#wp-mail-smtp .wp-mail-smtp-admin-columns .wp-mail-smtp-admin-column-80{width:80%}#wp-mail-smtp .wp-mail-smtp-admin-columns .wp-mail-smtp-admin-column-last{float:right !important}#wp-mail-smtp .wp-mail-smtp-admin-columns:after{content:"";display:table;clear:both}.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-btn .dashicons{font-size:16px;width:16px;height:16px}.wp-mail-smtp-btn:disabled{opacity:0.5;cursor:not-allowed}.wp-mail-smtp-btn.wp-mail-smtp-btn-md{font-size:13px;font-weight:600;padding:8px 12px;min-height:35px}.wp-mail-smtp-btn.wp-mail-smtp-btn-lg{font-size:16px;font-weight:600;padding:16px 28px}.wp-mail-smtp-btn.wp-mail-smtp-btn-orange{background-color:#FF982D;border-color:#FF982D;color:#fff}.wp-mail-smtp-btn.wp-mail-smtp-btn-orange:hover,.wp-mail-smtp-btn.wp-mail-smtp-btn-orange:active,.wp-mail-smtp-btn.wp-mail-smtp-btn-orange:focus{background-color:#f97f00;border-color:#f97f00}.wp-mail-smtp-btn.wp-mail-smtp-btn-red{background-color:#DC3232;border-color:#DC3232;color:#fff}.wp-mail-smtp-btn.wp-mail-smtp-btn-red:hover,.wp-mail-smtp-btn.wp-mail-smtp-btn-red:active,.wp-mail-smtp-btn.wp-mail-smtp-btn-red:focus{background-color:darkred;border-color:darkred}.wp-mail-smtp-btn.wp-mail-smtp-btn-grey{background-color:#f5f5f5;border:1px solid #ccc;color:#666}.wp-mail-smtp-btn.wp-mail-smtp-btn-grey:hover,.wp-mail-smtp-btn.wp-mail-smtp-btn-grey:active,.wp-mail-smtp-btn.wp-mail-smtp-btn-grey:focus{background-color:#d7d7d7;border-color:#ccc;color:#444}.wp-mail-smtp-btn.wp-mail-smtp-btn-light-grey{background-color:#f5f5f5;border:1px solid #ccc;color:#666}.wp-mail-smtp-btn.wp-mail-smtp-btn-light-grey:hover,.wp-mail-smtp-btn.wp-mail-smtp-btn-light-grey:active,.wp-mail-smtp-btn.wp-mail-smtp-btn-light-grey:focus{background-color:#eee;color:#444}
|
2 |
|
3 |
/*# sourceMappingURL=smtp-admin.min.css.map */
|
assets/css/smtp-logs.min.css
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
.wp-mail-smtp-page-logs .wp-mail-smtp-logs-upsell{text-align:center;width:730px;box-shadow:0 0 60px 30px rgba(0,0,0,0.15);border-radius:3px;position:absolute;top:75px;left:50%;margin:0 auto 0 -365px;z-index:100}.wp-mail-smtp-page-logs .wp-mail-smtp-logs-upsell *,.wp-mail-smtp-page-logs .wp-mail-smtp-logs-upsell *::before,.wp-mail-smtp-page-logs .wp-mail-smtp-logs-upsell *::after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wp-mail-smtp-page-logs .wp-mail-smtp-logs-upsell .wp-mail-smtp-logs-upsell-content{background-color:#fff;border-radius:3px 3px 0 0;padding:40px}.wp-mail-smtp-page-logs .wp-mail-smtp-logs-upsell .wp-mail-smtp-logs-upsell-content h2{font-size:20px;margin:0 0 16px 0;padding:0}.wp-mail-smtp-page-logs .wp-mail-smtp-logs-upsell .wp-mail-smtp-logs-upsell-content p{font-size:16px;color:#666;margin:0 0 30px 0;padding:0}.wp-mail-smtp-page-logs .wp-mail-smtp-logs-upsell .wp-mail-smtp-logs-upsell-content ul{float:left;width:50%;margin:0;padding:0 0 0 30px;text-align:left}.wp-mail-smtp-page-logs .wp-mail-smtp-logs-upsell .wp-mail-smtp-logs-upsell-content ul li{color:#666;font-size:16px;padding:6px 0}.wp-mail-smtp-page-logs .wp-mail-smtp-logs-upsell .wp-mail-smtp-logs-upsell-content ul li .dashicons-yes{color:#2a9b39}.wp-mail-smtp-page-logs .wp-mail-smtp-logs-upsell .wp-mail-smtp-logs-upsell-button{border-radius:0 0 3px 3px;padding:30px;background:#f5f5f5;text-align:center}
|
2 |
+
|
3 |
+
/*# sourceMappingURL=smtp-logs.min.css.map */
|
assets/images/about/icon-full.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg viewBox="0 0 37 28" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path d="M12.29 26.462c.328.375.75.562 1.266.562s.937-.187 1.266-.562L35.563 5.79c.329-.328.493-.75.493-1.265 0-.516-.164-.938-.493-1.266L32.962.728a1.567 1.567 0 0 0-1.23-.563c-.493 0-.926.188-1.301.563L13.556 17.603 5.681 9.728c-.375-.375-.808-.563-1.301-.563-.492 0-.902.188-1.23.563L.548 12.259c-.328.328-.492.75-.492 1.265 0 .516.164.938.492 1.266L12.29 26.462z" fill="#6ab255" fill-rule="nonzero"/></svg>
|
assets/images/about/icon-none.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg viewBox="0 0 33 33" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path d="M27.592 32.359a1.928 1.928 0 0 1-1.417.583 1.928 1.928 0 0 1-1.416-.583l-8.084-8.084-8.083 8.084a1.928 1.928 0 0 1-1.417.583 1.93 1.93 0 0 1-1.417-.583l-4.5-4.5a1.932 1.932 0 0 1-.583-1.417c0-.555.195-1.028.583-1.417l8.084-8.083-8.084-8.084a1.931 1.931 0 0 1-.583-1.416c0-.556.195-1.028.583-1.417l4.5-4.5A1.93 1.93 0 0 1 7.175.942c.556 0 1.028.194 1.417.583l8.083 8.083 8.084-8.083a1.928 1.928 0 0 1 1.416-.583c.556 0 1.028.194 1.417.583l4.5 4.5c.389.389.583.861.583 1.417 0 .555-.194 1.027-.583 1.416l-8.083 8.084 8.083 8.083c.389.389.583.862.583 1.417 0 .556-.194 1.028-.583 1.417l-4.5 4.5z" fill="#d83638" fill-rule="nonzero"/></svg>
|
assets/images/about/icon-partial.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg viewBox="0 0 53 53" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-miterlimit="10"><path d="M37.592 42.359a1.928 1.928 0 0 1-1.417.583 1.928 1.928 0 0 1-1.416-.583l-8.084-8.084-8.083 8.084a1.928 1.928 0 0 1-1.417.583 1.93 1.93 0 0 1-1.417-.583l-4.5-4.5a1.932 1.932 0 0 1-.583-1.417c0-.556.195-1.028.583-1.417l8.084-8.083-8.084-8.084a1.93 1.93 0 0 1-.583-1.416c0-.556.195-1.028.583-1.417l4.5-4.5a1.93 1.93 0 0 1 1.417-.584 1.93 1.93 0 0 1 1.417.584l8.083 8.083 8.084-8.083a1.928 1.928 0 0 1 1.416-.584 1.93 1.93 0 0 1 1.417.584l4.5 4.5c.389.389.583.861.583 1.417 0 .555-.194 1.028-.583 1.416l-8.083 8.084 8.083 8.083c.389.389.583.861.583 1.417s-.194 1.028-.583 1.417l-4.5 4.5z" fill="none" stroke="#d83638" stroke-width="2" stroke-dasharray="4,2"/></svg>
|
assets/images/about/plugin-mi.png
ADDED
Binary file
|
assets/images/about/plugin-om.png
ADDED
Binary file
|
assets/images/about/plugin-wpf.png
ADDED
Binary file
|
assets/images/about/team.jpg
ADDED
Binary file
|
assets/images/email/signature.png
CHANGED
Binary file
|
assets/images/email/wp-mail-smtp.png
CHANGED
Binary file
|
assets/images/gmail.png
DELETED
Binary file
|
assets/images/google.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" x="0" y="0" viewBox="0 0 254.79 80.25" xml:space="preserve"><style>.st0{fill:#4285f4}.st1{fill:#ea4335}</style><g id="XMLID_11_"><path id="XMLID_10_" class="st0" d="M31.87 28.59v8.59H52.4C51.77 42 50.17 45.52 47.72 48c-3 3-7.68 6.28-15.85 6.28-12.64 0-22.52-10.19-22.52-22.83S19.23 8.62 31.87 8.62c6.81 0 11.8 2.69 15.46 6.14l6.04-6.04C48.28 3.77 41.43 0 31.87 0 14.56 0 0 14.1 0 31.42s14.56 31.42 31.87 31.42c9.36 0 16.41-3.07 21.92-8.8 5.65-5.65 7.44-13.65 7.44-20.07 0-1.99-.14-3.84-.45-5.38H31.87z"/><path id="XMLID_24_" class="st1" d="M86.88 21.61c-11.21 0-20.35 8.52-20.35 20.28 0 11.66 9.15 20.28 20.35 20.28s20.35-8.59 20.35-20.28c0-11.77-9.14-20.28-20.35-20.28zm0 32.57c-6.14 0-11.45-5.06-11.45-12.29 0-7.3 5.31-12.29 11.45-12.29s11.45 4.99 11.45 12.29c0 7.22-5.3 12.29-11.45 12.29z"/><path id="XMLID_21_" class="st0" d="M186.65 26.15h-.31c-1.99-2.37-5.83-4.54-10.68-4.54-10.12 0-18.95 8.83-18.95 20.28 0 11.38 8.83 20.28 18.95 20.28 4.85 0 8.69-2.16 10.68-4.61h.31v2.83c0 7.75-4.15 11.9-10.82 11.9-5.45 0-8.83-3.91-10.23-7.23l-7.75 3.21c2.23 5.38 8.13 11.97 17.98 11.97 10.44 0 19.27-6.14 19.27-21.12V22.65h-8.45v3.5zm-10.23 28.03c-6.14 0-10.82-5.24-10.82-12.29 0-7.16 4.68-12.29 10.82-12.29 6.07 0 10.82 5.24 10.82 12.36.04 7.08-4.75 12.22-10.82 12.22z"/><path id="XMLID_18_" d="M132.26 21.61c-11.21 0-20.35 8.52-20.35 20.28 0 11.66 9.15 20.28 20.35 20.28s20.35-8.59 20.35-20.28c0-11.77-9.14-20.28-20.35-20.28zm0 32.57c-6.14 0-11.45-5.06-11.45-12.29 0-7.3 5.31-12.29 11.45-12.29s11.45 4.99 11.45 12.29c0 7.22-5.3 12.29-11.45 12.29z" fill="#fbbc05"/><path id="XMLID_3_" d="M202.08.84h8.76v61.33h-8.76V.84z" fill="#34a853"/><path id="XMLID_14_" class="st1" d="M237.89 54.18c-4.54 0-7.75-2.06-9.84-6.14l27.12-11.21-.91-2.3c-1.68-4.54-6.84-12.92-17.35-12.92-10.44 0-19.13 8.2-19.13 20.28 0 11.38 8.59 20.28 20.11 20.28 9.29 0 14.66-5.69 16.9-8.97l-6.91-4.61c-2.31 3.35-5.45 5.59-9.99 5.59zm-.63-24.96c3.6 0 6.67 1.85 7.68 4.47l-18.33 7.57c.01-8.52 6.05-12.04 10.65-12.04z"/></g></svg>
|
assets/images/logo.png
DELETED
Binary file
|
assets/images/logo.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 242 60"><defs><style>.cls-11,.cls-12{fill-rule:evenodd}.cls-4{fill:none}.cls-11{fill:#86a196}.cls-12{fill:#fff}</style></defs><path d="M69.06 11.11L64.7 23.49h-.06l-1.89-6.55-2-6.14h-3.13v.44l6 17.89h1.66l4.39-11.67h.06l4.39 11.67h1.56l6.06-17.89v-.44h-3.2l-1.92 6.14-1.82 6.52h-.06l-4.32-12.35zM87.68 29h-3V10.8h7.54a6.17 6.17 0 0 1 6.42 6.42 6.14 6.14 0 0 1-6.42 6.32h-4.5zm-.05-8.11h4.55a3.54 3.54 0 0 0 3.51-3.75 3.49 3.49 0 0 0-3.51-3.71h-4.55zm29-.73l-7.41-9.41h-1.11V29h3V17.61l5.28 6.74h.41l5.25-6.74V29h3.05V10.75H124zm24.11-2.78v7.88c0 1.14 0 1.87 1.35 1.74v1.92c-1.8.34-3.64.13-3.64-2v-.52a4.57 4.57 0 0 1-4.32 2.73c-3.82 0-5.67-3.07-5.67-6.6.08-4.16 3.05-6.45 7.13-6.37a12.62 12.62 0 0 1 5.16 1.22zM138 22.71V19a6.49 6.49 0 0 0-2.63-.52c-2.39 0-4 1.37-4.08 4.08 0 2.29 1.12 4.08 3.43 4.08 2.13.02 3.22-1.64 3.28-3.93zm6.57-10.12a1.65 1.65 0 0 0 1.75 1.69 1.61 1.61 0 0 0 1.68-1.69 1.71 1.71 0 0 0-3.41 0zm3.12 4h-2.83V29h2.83zM151.3 10v14.53c0 4.18 1.77 5.17 5.62 4.55l-.11-2.19c-2.15.34-2.7-.31-2.7-2.39V10zm13.47 13.86c.08 3.82 3.8 5.59 7.36 5.51 3.4 0 7.17-1.51 7.17-5.51 0-4.19-3.38-4.92-7.07-5.33-2.1-.29-4.16-.55-4.16-2.6s2.16-2.73 3.82-2.73 3.85.62 4 2.57h2.86c-.08-3.72-3.35-5.28-6.81-5.28s-6.84 1.77-6.84 5.51 3.3 4.71 6.63 5c2.11.2 4.58.44 4.58 2.83s-2.29 2.83-4.21 2.83-4.22-.75-4.35-2.8zm26.44-3.67l-7.41-9.41h-1.12V29h3V17.61l5.32 6.74h.42l5.25-6.74V29h3V10.75h-1.07zm16.54-6.68V29h3V13.48H216V10.8h-13.53v2.68zm14 15.52h-3V10.8h7.54a6.17 6.17 0 0 1 6.42 6.42 6.14 6.14 0 0 1-6.42 6.32h-4.5zm0-8.11h4.55a3.54 3.54 0 0 0 3.51-3.75 3.49 3.49 0 0 0-3.51-3.71h-4.55z" fill-rule="evenodd" fill="#23282c"/><path d="M94.18 38.09a.46.46 0 0 1 .09.19 1.15 1.15 0 0 1 0 .2v.18a1.33 1.33 0 0 1-.08.24 1.09 1.09 0 0 1-.21.37.58.58 0 0 1-.46 0 .3.3 0 0 0-.17 0 1.59 1.59 0 0 0-.34-.06h-.35a1.7 1.7 0 0 0-.55.08 1.12 1.12 0 0 0-.47.29 1.72 1.72 0 0 0-.34.6 3.34 3.34 0 0 0-.16 1v1.13h2.1q0 .39-.06.63a2.1 2.1 0 0 1-.1.4.61.61 0 0 1-.15.22 1.26 1.26 0 0 1-.23.13h-.23a5.35 5.35 0 0 1-.61 0h-.75v7.11a1.12 1.12 0 0 1 0 .24.25.25 0 0 1-.2.21 6.08 6.08 0 0 1-.66.07h-.53a3.15 3.15 0 0 1-.61-.06 1.4 1.4 0 0 1 0-.23V43.7a2.19 2.19 0 0 1-1.17-.31c0-.19 0-.35.08-.46a.69.69 0 0 1 .1-.27.61.61 0 0 1 .17-.15.86.86 0 0 1 .25-.1l.22-.06.35-.07v-.73a6.26 6.26 0 0 1 .06-.65 3.79 3.79 0 0 1 .43-1.61 3.16 3.16 0 0 1 .85-1 3.24 3.24 0 0 1 1.09-.49 4.4 4.4 0 0 1 1.1-.15 3.2 3.2 0 0 1 1 .13 1.36 1.36 0 0 1 .53.27zm9.82 5.68a2.08 2.08 0 0 0-.71.12 1.65 1.65 0 0 0-.59.38v6a2.54 2.54 0 0 1 0 .41.91.91 0 0 1-.16.37 1.05 1.05 0 0 1-.24.15 1.3 1.3 0 0 1-.33.06h-1.27v-7a3.88 3.88 0 0 0-.07-.81 4.73 4.73 0 0 0-.18-.63 1.66 1.66 0 0 1 .31-.23 3.66 3.66 0 0 1 .52-.25.56.56 0 0 1 .15 0h.12a.89.89 0 0 1 .45.09.76.76 0 0 1 .24.3 3.57 3.57 0 0 1 .56-.33c.2-.09.39-.17.57-.23a3 3 0 0 1 .55-.14 1.51 1.51 0 0 1 .56 0c.58.06.9.24 1 .53a2.89 2.89 0 0 1-.07.57 1.46 1.46 0 0 1-.27.64h-.87a.56.56 0 0 0-.15 0zm7.91 7.56h-1.67v-5.89a3.2 3.2 0 0 0-.24-1.47.9.9 0 0 0-.86-.43 1.67 1.67 0 0 0-.8.2 2.41 2.41 0 0 0-.63.49v6.14a2.37 2.37 0 0 1 0 .41.64.64 0 0 1-.43.47 1.94 1.94 0 0 1-.32.07 3.28 3.28 0 0 1-.49 0h-.76v-7.01a3.94 3.94 0 0 0-.07-.81 4.82 4.82 0 0 0-.16-.63 2.23 2.23 0 0 1 .83-.48.56.56 0 0 1 .15 0h.09a.8.8 0 0 1 .45.13.86.86 0 0 1 .26.28 4.39 4.39 0 0 1 1.14-.58 3.84 3.84 0 0 1 1.24-.19h.39a2.7 2.7 0 0 1 1 .27 2.26 2.26 0 0 1 .68.53 2.58 2.58 0 0 1 .61-.36c.23-.1.44-.19.63-.25a3.65 3.65 0 0 1 1.21-.19h.4a2.91 2.91 0 0 1 1.12.3 1.9 1.9 0 0 1 .69.69 3 3 0 0 1 .34 1 7.74 7.74 0 0 1 .1 1.33v5.69a1 1 0 0 1-.25.16 1.4 1.4 0 0 1-.35.08h-1.3a3.05 3.05 0 0 1-.13-.32 1.61 1.61 0 0 1 0-.39v-5.11a3.45 3.45 0 0 0-.23-1.48.89.89 0 0 0-.85-.42 1.64 1.64 0 0 0-.81.22 3.48 3.48 0 0 0-.67.53l.06-.06v6.68c.03.2-.1.34-.35.4zM120.6 42h.56a3.05 3.05 0 0 1 1.36.36c.29.19.46.36.5.5a1.29 1.29 0 0 1-.12.48 2.61 2.61 0 0 1-.27.5h-.18a.88.88 0 0 1-.2 0 3 3 0 0 0-.32-.06 1.58 1.58 0 0 1-.31-.09 2.32 2.32 0 0 0-.87-.17 1.15 1.15 0 0 0-.79.25.77.77 0 0 0-.3.63 1 1 0 0 0 .1.44 1.54 1.54 0 0 0 .42.46l.36.27.44.31.57.42.55.4a3.63 3.63 0 0 1 .9 1 2.28 2.28 0 0 1 .28 1.13A2.65 2.65 0 0 1 123 50a2.57 2.57 0 0 1-.72.85 3.19 3.19 0 0 1-1.08.52 4.59 4.59 0 0 1-1.3.17 4.71 4.71 0 0 1-1.66-.26 1.38 1.38 0 0 1-.89-.66 1.57 1.57 0 0 1 .1-.51 1.86 1.86 0 0 1 .28-.52h.27a1.21 1.21 0 0 1 .58.17 3.93 3.93 0 0 0 .66.22 2.86 2.86 0 0 0 .7.09h.34a1 1 0 0 0 .69-.32 1 1 0 0 0 .24-.72 1.16 1.16 0 0 0-.17-.6 1.83 1.83 0 0 0-.56-.55l-.17-.11c-.07-.05-.09-.07-.06 0-.22-.16-.45-.32-.69-.51l-.62-.51-.48-.38a2.62 2.62 0 0 1-.88-1.86 2.11 2.11 0 0 1 .84-1.79 3.66 3.66 0 0 1 2.18-.72zm-20.51 4.7a6.79 6.79 0 0 1-.29 2.12 4.3 4.3 0 0 1-.8 1.52 3.43 3.43 0 0 1-1.22.93 3.87 3.87 0 0 1-1.53.3 3.58 3.58 0 0 1-2.83-1.12 5.39 5.39 0 0 1-1-3.64 6.82 6.82 0 0 1 .29-2.13 4.25 4.25 0 0 1 .8-1.51 3.21 3.21 0 0 1 1.23-.88 4.18 4.18 0 0 1 1.57-.29 3.41 3.41 0 0 1 2.84 1.19 5.55 5.55 0 0 1 .94 3.5zm-5.54 0a8.17 8.17 0 0 0 .13 1.61 3.37 3.37 0 0 0 .37 1 1.45 1.45 0 0 0 .54.58 1.4 1.4 0 0 0 .7.17A1.3 1.3 0 0 0 97 50a1.51 1.51 0 0 0 .53-.58 3.3 3.3 0 0 0 .37-1 8 8 0 0 0 .13-1.6 5.07 5.07 0 0 0-.46-2.55 1.43 1.43 0 0 0-1.27-.75 1.28 1.28 0 0 0-.65.18 1.55 1.55 0 0 0-.53.57 3.34 3.34 0 0 0-.38 1 7.36 7.36 0 0 0-.19 1.46z" fill="#5f5e5e" fill-rule="evenodd"/><path d="M73.52 50.66v.08a.11.11 0 0 1 0 .07 2.68 2.68 0 0 1-.15.39.52.52 0 0 1-.29.22h-.37c-.19 0-.46 0-.82.05a2.14 2.14 0 0 1-.37-.44 1.73 1.73 0 0 1-.24-.5l-.3-1.09-.38-1.24c-.13-.45-.25-.9-.38-1.37s-.25-.91-.36-1.35c-.22-.8-.4-1.45-.53-1.94a5.63 5.63 0 0 0-.3-.92.92.92 0 0 1 .58-.35 4.82 4.82 0 0 1 1.32-.13.89.89 0 0 1 .24.3 1.74 1.74 0 0 1 .13.36c.16.74.35 1.52.55 2.34.07.25.12.51.17.76s.09.5.14.71.1.51.13.68.07.33.1.45 0 .24.07.34.05.21.08.34c.07-.25.14-.55.22-.92s.18-.77.28-1.18c0-.11.08-.33.17-.65l.25-1c.08-.37.16-.71.23-1s.13-.54.16-.65a.73.73 0 0 0 0-.16v-.25a.93.93 0 0 1 .22-.08 3.61 3.61 0 0 1 .45-.12l.51-.07a1 1 0 0 1 .39 0 .89.89 0 0 1 .22.31 3.07 3.07 0 0 1 .14.47l.36 1.52c.13.55.27 1.12.41 1.72 0 .22.1.43.14.64a5.61 5.61 0 0 0 .13.59l.09.37v.17a.27.27 0 0 1 0 .12v.19c.13-.46.25-1 .38-1.57s.25-1.19.39-1.83c.11-.47.22-.91.31-1.31s.16-.77.23-1.11a.24.24 0 0 0 0-.13.48.48 0 0 1 .09-.19.43.43 0 0 1 .21-.11h.53l.4.05h.36a.49.49 0 0 1 .19 0 .2.2 0 0 1 .09.09 1 1 0 0 0 0 .1.54.54 0 0 1 0 .25c0 .09 0 .2-.08.34l-.08.19c-.12.38-.24.81-.36 1.28L79.39 46c-.21.79-.44 1.6-.66 2.42s-.44 1.57-.64 2.22v.15a2 2 0 0 1-.13.39.56.56 0 0 1-.29.22h-.39c-.19 0-.46 0-.8.05a2.15 2.15 0 0 1-.38-.44 2.11 2.11 0 0 1-.25-.5c0-.14-.08-.3-.13-.46s-.09-.31-.12-.45 0-.19-.07-.27a1.25 1.25 0 0 0-.07-.23c-.11-.48-.24-1-.36-1.57s-.25-1.09-.35-1.57c-.11.51-.25 1.06-.4 1.66s-.3 1.15-.44 1.68zm9.1 4.34a1.39 1.39 0 0 1-.42.13 3.28 3.28 0 0 1-1.43 0 6 6 0 0 1 0-.73V44.31a4.7 4.7 0 0 0-.06-.79 4.87 4.87 0 0 0-.15-.63.74.74 0 0 1 .29-.26l.51-.24h.25a.74.74 0 0 1 .44.13.8.8 0 0 1 .27.28 5.64 5.64 0 0 1 1.15-.58q.28-.09.57-.15a2.9 2.9 0 0 1 .62-.06 3.87 3.87 0 0 1 1.33.23 2.78 2.78 0 0 1 1.1.74 3.63 3.63 0 0 1 .74 1.3 6.3 6.3 0 0 1 .17 1.87 7.65 7.65 0 0 1-.48 2.94 4.28 4.28 0 0 1-1.24 1.74 2.76 2.76 0 0 1-1.06.59 4.24 4.24 0 0 1-1 .14 3 3 0 0 1-1.5-.32v3.32a1.69 1.69 0 0 1 0 .38zm1.32-4.9a1.51 1.51 0 0 0 .65-.16 1.66 1.66 0 0 0 .63-.59 3.55 3.55 0 0 0 .48-1.17 7.64 7.64 0 0 0 .2-1.89 3.73 3.73 0 0 0-.45-2.11 1.41 1.41 0 0 0-1.24-.64 1.8 1.8 0 0 0-.81.2 3.76 3.76 0 0 0-.67.46v5.39a1.82 1.82 0 0 0 .54.36 1.56 1.56 0 0 0 .67.15z" fill="#b85a1b" fill-rule="evenodd"/><path class="cls-4" d="M-6.25 0h60v60h-60z"/><path d="M16.66 8.14a15.43 15.43 0 0 0-7.91 10.17 23.51 23.51 0 1 0 30 0 15.41 15.41 0 0 0-9.37-10.83 3.4 3.4 0 0 0-2.08-2.69 4.63 4.63 0 0 0-8.86-1.65 24.41 24.41 0 0 0-1.78 5z" fill="#395360" fill-rule="evenodd"/><path fill="#fbaa6f" d="M18 26h12v14H18z"/><path d="M25.87 33.18l-.12-.08a1.42 1.42 0 1 1 1.67-2.3 1.87 1.87 0 0 0-1.22.81 1.85 1.85 0 0 0-.33 1.57zm-4.48 0a1.8 1.8 0 0 0-.39-1.54 1.91 1.91 0 0 0-1.23-.81 1.42 1.42 0 0 1 1.67 2.3.57.57 0 0 1-.05.05zM28.61 30h.53l-1.07 4.82-2.14 6.43h-4.29l-3.21-5.36 1.07-3.21c1.07 1.43 1.79 2.32 2.14 2.68.54.53 2.68.53 3.75-.54A26.17 26.17 0 0 0 28.61 30z" fill="#dc7f3c" fill-rule="evenodd"/><path d="M9.74 29H15v-9h-4.06a13 13 0 0 1 7.5-10q1.14-5 2.71-6.75l.18-.17.11-.1a2.25 2.25 0 0 1 1.08-.47 2.32 2.32 0 0 1 2.15 3.77h-.06a1.64 1.64 0 0 1-.3.29A15 15 0 0 0 23 8.14a5 5 0 0 1 3-1.5 1.4 1.4 0 0 1 .66.16 1.33 1.33 0 0 1 .51 1.79 1.29 1.29 0 0 1-.6.56 13 13 0 0 1 10.14 11l.12.87H33v8h4.83l1.79 13.43q-6.33 3.93-15.85 3.93T8 42.44zm15.13 9.39q3.87-6.39 3.87-7.61c0-2.23-3.25-4.06-4.87-4.06S19 28.54 19 30.78q0 1.22 3.81 7.62a1.24 1.24 0 0 0 1.06.57 1.08 1.08 0 0 0 1-.56z" fill="#bdcfc8" fill-rule="evenodd"/><path class="cls-4" d="M18.96 31.07h9.65L27 47.14h-6.43l-1.61-16.07z"/><path d="M39.81 48.82a20 20 0 0 1-32.09 0l.84-6.11a2.68 2.68 0 0 0 1 .19 2.83 2.83 0 0 0 2.81-2.43v1.22a2.84 2.84 0 0 0 5.68 0v1.62a2.85 2.85 0 0 0 5.69 0 2.84 2.84 0 0 0 5.68 0v-1.57a2.84 2.84 0 1 0 5.68 0v-1.22A2.84 2.84 0 0 0 38 43a2.87 2.87 0 0 0 1-.18l.81 6z" fill="#809eb0" fill-rule="evenodd"/><path d="M8.3 44.65l.26-1.89a2.68 2.68 0 0 0 1 .19 2.83 2.83 0 0 0 2.81-2.43v1.22a2.84 2.84 0 0 0 5.68 0v1.62a2.85 2.85 0 0 0 5.69 0 2.84 2.84 0 0 0 5.68 0v-1.62a2.84 2.84 0 1 0 5.68 0v-1.22A2.84 2.84 0 0 0 38 43a2.87 2.87 0 0 0 1-.18l.25 1.89a2.85 2.85 0 0 1-4.07-2.14v1.22a2.84 2.84 0 1 1-5.68 0v1.62a2.84 2.84 0 0 1-5.68 0 2.85 2.85 0 0 1-5.69 0v-1.67a2.84 2.84 0 0 1-5.68 0v-1.22A2.83 2.83 0 0 1 9.58 45a2.9 2.9 0 0 1-1.28-.3z" fill="#738e9e" fill-rule="evenodd"/><path class="cls-11" d="M37.78 22.39c-1-2.87-3-4.69-4.72-4.51-2.2.23-2.74 3.76-2.29 8s1.7 7.56 3.9 7.33 4-3.89 3.68-8c-.08 1.23-.52 2.28-1.39 2.35-1.12.1-1.44-1.19-1.59-2.82s-.14-3 1-3.08a1.51 1.51 0 0 1 1.41.73z"/><path class="cls-12" d="M37 21.75c-.63-1.21-1.5-1.95-2.39-1.85-1.51.15-1.87 2.57-1.57 5.47s1.17 5.18 2.67 5c1.11-.12 1.93-1.5 2.16-3.38a1.16 1.16 0 0 1-.89.57c-1.12.1-1.44-1.19-1.59-2.82s-.14-3 1-3.08a1.61 1.61 0 0 1 .61.09z"/><path class="cls-11" d="M9.6 22.39c1-2.87 3-4.69 4.72-4.51 2.2.23 2.74 3.76 2.29 8s-1.7 7.56-3.9 7.33-4-3.89-3.68-8c.08 1.23.51 2.28 1.39 2.35 1.12.1 1.44-1.19 1.58-2.82s.15-3-1-3.08a1.51 1.51 0 0 0-1.43.71z"/><path class="cls-12" d="M10.37 21.75c.63-1.21 1.51-1.95 2.4-1.85 1.5.15 1.87 2.57 1.56 5.47s-1.16 5.18-2.67 5c-1.11-.12-1.93-1.5-2.16-3.38a1.18 1.18 0 0 0 .9.57c1.11.1 1.44-1.19 1.58-2.82s.14-3-1-3.08a1.68 1.68 0 0 0-.64.07z"/><path d="M19 28.63a5.34 5.34 0 0 1 0-.69c0-2.47 1.21-5.28 4.87-5.28s4.87 2.81 4.87 5.28a4.4 4.4 0 0 1-.13 1c-.8-1.35-2.3-2.18-4.8-2.18-2.37.03-3.91.72-4.81 1.87z" fill="#f4f8ff" fill-rule="evenodd"/><path class="cls-11" d="M26.52 9.16L23.34 9l3.93-1.16a1.35 1.35 0 0 1-.75 1.32zM23 8.14l-1.32 1a16.77 16.77 0 0 0 2-3.72A6.56 6.56 0 0 0 24 2.75 2.36 2.36 0 0 1 25.21 5a2.43 2.43 0 0 1-.75 1.51A15 15 0 0 0 23 8.14z"/><path d="M129.58 53.79v-9.35h1.47v.93a2.72 2.72 0 0 1 2.18-1.09c1.75 0 3 1.31 3 3.54s-1.24 3.56-3 3.56a2.67 2.67 0 0 1-2.18-1.11v3.52zm3.21-8.21a2.22 2.22 0 0 0-1.74.91v2.68a2.25 2.25 0 0 0 1.74.91 2 2 0 0 0 1.91-2.26 2 2 0 0 0-1.91-2.24zm4.91-1.14h1.47v1a2.89 2.89 0 0 1 2.2-1.15v1.46a2 2 0 0 0-.46 0 2.36 2.36 0 0 0-1.74.89v4.61h-1.47zm4.44 3.38a3.48 3.48 0 1 1 3.47 3.56 3.38 3.38 0 0 1-3.47-3.56zm5.44 0a2 2 0 1 0-2 2.26 2 2 0 0 0 2-2.26zm7.76 2.47a2.73 2.73 0 0 1-2.17 1.09c-1.73 0-3-1.32-3-3.55s1.26-3.55 3-3.55a2.71 2.71 0 0 1 2.17 1.1v-3.51h1.48v9.34h-1.48zm0-3.8a2.22 2.22 0 0 0-1.75-.91 2 2 0 0 0-1.9 2.25 2 2 0 0 0 1.9 2.25 2.22 2.22 0 0 0 1.75-.9zm7.94 3.82a3.23 3.23 0 0 1-2.39 1.07 1.92 1.92 0 0 1-2.17-2.14v-4.8h1.47v4.26c0 1 .53 1.38 1.36 1.38a2.22 2.22 0 0 0 1.73-.89v-4.75h1.47v6.77h-1.47zm6.46-6.03a3.05 3.05 0 0 1 2.59 1.2l-1 .9a1.79 1.79 0 0 0-1.55-.8 2.26 2.26 0 0 0 0 4.5 1.87 1.87 0 0 0 1.55-.8l1 .89a3 3 0 0 1-2.59 1.21 3.55 3.55 0 0 1 0-7.1zm4.17 5.36v-3.91h-1.12v-1.29h1.12v-1.85h1.47v1.85h1.37v1.29h-1.37v3.55c0 .46.22.8.64.8a1 1 0 0 0 .66-.24l.35 1.1a1.91 1.91 0 0 1-1.39.44 1.56 1.56 0 0 1-1.73-1.74zm-111.71.84a2.87 2.87 0 0 1-2.19.9 2.25 2.25 0 0 1-2.35-2.24 2.18 2.18 0 0 1 2.34-2.2 2.8 2.8 0 0 1 2.19.86v-1c0-.79-.64-1.26-1.58-1.26a2.79 2.79 0 0 0-2 .85l-.6-1a4.05 4.05 0 0 1 2.85-1.09c1.49 0 2.81.63 2.81 2.45v4.48H62.2zm0-1.83a2 2 0 0 0-1.61-.7 1.23 1.23 0 1 0 0 2.42 2 2 0 0 0 1.61-.7z" fill="#999"/></svg>
|
assets/images/mailgun.png
DELETED
Binary file
|
assets/images/mailgun.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" x="0" y="0" viewBox="0 0 448.09 123.26" xml:space="preserve"><style>.st0,.st1{fill:#c02126}.st1{fill-rule:evenodd;clip-rule:evenodd}</style><path class="st0" d="M120.22 105.68h-6.98v4.31h6.78v2.55h-6.78v6h6.98v2.55h-9.61v-17.95h9.61v2.54zm2.43 4.08h2.54v1.05c.49-.53.91-.88 1.25-1.07.37-.19.83-.29 1.39-.29 1.24 0 2.22.56 2.94 1.67.8-1.12 1.88-1.67 3.24-1.67 2.47 0 3.71 1.55 3.71 4.64v7h-2.55v-6.29c0-1.09-.13-1.85-.38-2.3-.26-.46-.7-.69-1.3-.69-.7 0-1.21.27-1.53.81-.32.54-.48 1.42-.48 2.62v5.85h-2.55v-6.25c0-2.01-.56-3.02-1.69-3.02-.71 0-1.23.28-1.56.83-.33.55-.49 1.42-.49 2.6v5.85h-2.54v-11.34zm25.83 0h2.55v11.32h-2.55v-1.19c-1.04 1.01-2.17 1.51-3.37 1.51-1.52 0-2.77-.57-3.77-1.7-.98-1.16-1.48-2.6-1.48-4.33 0-1.7.49-3.11 1.48-4.24.98-1.13 2.22-1.7 3.7-1.7 1.28 0 2.42.54 3.44 1.63v-1.3zm-6.02 5.63c0 1.09.28 1.97.85 2.65.58.69 1.31 1.04 2.19 1.04.94 0 1.7-.33 2.28-1 .58-.69.87-1.57.87-2.63s-.29-1.94-.87-2.63c-.58-.67-1.33-1.01-2.26-1.01-.87 0-1.6.34-2.19 1.02-.58.69-.87 1.54-.87 2.56zm10.86-10.34c0-.46.16-.85.48-1.19.32-.33.71-.5 1.16-.5.46 0 .85.17 1.17.5.32.33.48.72.48 1.2 0 .47-.16.88-.48 1.21-.32.33-.7.5-1.16.5-.46 0-.85-.17-1.17-.5a1.69 1.69 0 0 1-.48-1.22zm2.92 4.71v11.32h-2.54v-11.32h2.54zm5.21-8.31v19.64h-2.54v-19.64h2.54zm19.99 15.27h-7.45l-1.94 4.36h-2.83l8.61-19.08 8.31 19.08h-2.88l-1.82-4.36zm-1.07-2.54l-2.58-6.1-2.71 6.1h5.29zm9.45-4.42v6.5c0 1.88.72 2.81 2.15 2.81 1.44 0 2.15-.94 2.15-2.81v-6.5h2.54v6.56c0 .91-.11 1.69-.33 2.35-.21.59-.58 1.12-1.09 1.59-.86.77-1.95 1.15-3.27 1.15s-2.4-.38-3.26-1.15c-.53-.47-.9-1-1.12-1.59-.21-.53-.32-1.31-.32-2.35v-6.56h2.55zm12.13 2.44v8.88h-2.54v-8.88h-1.08v-2.44h1.08v-4.15h2.54v4.15h1.97v2.44h-1.97zm2.81 3.14c0-1.64.57-3.03 1.7-4.17 1.14-1.15 2.52-1.72 4.15-1.72 1.64 0 3.03.58 4.17 1.73 1.13 1.16 1.69 2.57 1.69 4.26 0 1.7-.57 3.12-1.7 4.27-1.14 1.14-2.54 1.71-4.21 1.71-1.65 0-3.03-.58-4.14-1.74-1.11-1.16-1.66-2.6-1.66-4.34zm2.59.05c0 1.13.29 2.03.88 2.69.6.67 1.39 1 2.38 1s1.79-.33 2.38-.99c.59-.66.89-1.54.89-2.64s-.3-1.98-.89-2.64c-.6-.67-1.39-1-2.38-1-.97 0-1.76.33-2.36 1-.6.66-.9 1.52-.9 2.58zm11.27-5.63h2.54v1.05c.49-.53.91-.88 1.25-1.07.37-.19.83-.29 1.39-.29 1.24 0 2.22.56 2.94 1.67.8-1.12 1.88-1.67 3.24-1.67 2.47 0 3.71 1.55 3.71 4.64v7h-2.55v-6.29c0-1.09-.13-1.85-.38-2.3-.26-.46-.7-.69-1.3-.69-.7 0-1.21.27-1.53.81-.32.54-.48 1.42-.48 2.62v5.85h-2.55v-6.25c0-2.01-.56-3.02-1.69-3.02-.71 0-1.23.28-1.56.83-.33.55-.49 1.42-.49 2.6v5.85h-2.54v-11.34zm25.83 0H247v11.32h-2.55v-1.19c-1.04 1.01-2.17 1.51-3.37 1.51-1.52 0-2.77-.57-3.77-1.7-.99-1.16-1.48-2.6-1.48-4.33 0-1.7.49-3.11 1.48-4.24.98-1.13 2.22-1.7 3.7-1.7 1.28 0 2.42.54 3.44 1.63v-1.3zm-6.02 5.63c0 1.09.28 1.97.85 2.65.58.69 1.31 1.04 2.19 1.04.94 0 1.7-.33 2.28-1 .58-.69.87-1.57.87-2.63s-.29-1.94-.87-2.63c-.58-.67-1.33-1.01-2.25-1.01-.87 0-1.6.34-2.19 1.02-.59.69-.88 1.54-.88 2.56zm13.86-3.19v8.88h-2.54v-8.88h-1.08v-2.44h1.08v-4.15h2.54v4.15h1.97v2.44h-1.97zm2.78-7.15c0-.46.16-.85.48-1.19.32-.33.71-.5 1.16-.5.46 0 .85.17 1.17.5.32.33.49.72.49 1.2 0 .47-.16.88-.49 1.21-.32.33-.7.5-1.16.5-.46 0-.85-.17-1.17-.5a1.69 1.69 0 0 1-.48-1.22zm2.92 4.71v11.32h-2.54v-11.32h2.54zm2.16 5.58c0-1.64.57-3.03 1.7-4.17 1.13-1.15 2.52-1.72 4.15-1.72 1.64 0 3.03.58 4.17 1.73 1.13 1.16 1.69 2.57 1.69 4.26 0 1.7-.57 3.12-1.7 4.27-1.14 1.14-2.54 1.71-4.21 1.71-1.65 0-3.03-.58-4.14-1.74-1.1-1.16-1.66-2.6-1.66-4.34zm2.6.05c0 1.13.29 2.03.88 2.69.6.67 1.39 1 2.38 1s1.79-.33 2.38-.99c.59-.66.89-1.54.89-2.64s-.3-1.98-.89-2.64c-.6-.67-1.39-1-2.38-1-.97 0-1.75.33-2.36 1-.6.66-.9 1.52-.9 2.58zm11.27-5.63h2.55v1.05c.89-.91 1.89-1.36 3-1.36 1.28 0 2.27.42 2.99 1.24.62.71.92 1.86.92 3.45v6.94h-2.55v-6.32c0-1.12-.15-1.88-.45-2.31-.29-.43-.83-.65-1.6-.65-.84 0-1.44.29-1.79.86-.35.56-.52 1.55-.52 2.96v5.46h-2.55v-11.32z"/><path class="st1" d="M343.18 42.36h-12.05v5.97c-4.22-4.72-9.94-7.33-16.41-7.33-14.17 0-24.48 11.81-24.48 28.09 0 15.66 10.31 27.22 24.36 27.22 6.59 0 11.55-2.24 16.53-7.46v7.33c0 10.94-4.35 16.29-13.3 16.29-4.85 0-9.57-2.36-11.68-6.09-1.24-2.11-1.62-4.1-1.99-8.57h-11.8c.12 15.66 9.82 25.48 25.35 25.48 8.95 0 16.65-3.6 21-10.06 3.48-4.97 4.47-9.57 4.47-19.76V42.36zm-26.22 9.44c8.7 0 14.66 6.84 14.66 16.65 0 10.19-5.84 17.02-14.54 17.02-8.82 0-14.54-6.58-14.54-16.78 0-10.17 5.72-16.89 14.42-16.89z"/><path d="M110.42 42.36v52.32h11.95V67.71c0-11.06 2.96-15.91 9.73-15.91 5.42 0 8.01 4.47 8.01 13.92v28.96h11.95V67.71c0-11.19 2.96-15.91 9.73-15.91 5.79 0 8.01 3.85 8.01 13.8v29.08h11.95V62.37c0-14.04-6.04-21.38-17.62-21.38-6.4 0-11.71 2.73-15.4 7.71-3.2-4.97-8.13-7.71-13.92-7.71-5.18 0-7.89 1.37-12.44 6.21v-4.85h-11.95zm116.59 0v6.09c-5.22-5.34-9.69-7.46-16.28-7.46-14.04 0-24.73 11.68-24.73 27.22 0 16.4 10.44 28.09 24.98 28.09 6.34 0 10.44-1.87 16.03-7.09v5.47h12.05V42.36h-12.05zm-14.17 9.44c8.83 0 14.91 6.96 14.91 16.78 0 10.07-6.09 16.9-14.91 16.9-8.45 0-14.54-7.08-14.54-16.9 0-9.69 6.22-16.78 14.54-16.78zm47.89-9.44h-12.06v52.32h12.06V42.36zm-5.97-29.11c-4.47 0-7.95 3.48-7.95 7.83s3.61 7.95 7.83 7.95c4.35 0 7.95-3.6 7.95-7.95s-3.48-7.83-7.83-7.83zM271.79 0h12.05v94.68h-12.05z" fill="#646569" fill-rule="evenodd" clip-rule="evenodd"/><path class="st1" d="M362.48 42.36h-12.06v30.32c0 8.2 1.49 12.68 5.47 17.03 4.23 4.35 9.94 6.59 16.78 6.59 6.96 0 12.68-2.24 16.9-6.59 3.98-4.35 5.47-8.82 5.47-17.03V42.36h-12.05v30.08c0 8.95-3.23 13.05-10.31 13.05-6.96 0-10.19-4.1-10.19-13.05V42.36zm40.62 0v52.32h12.06V69.45c0-12.93 2.98-17.65 11.06-17.65 7.46 0 9.82 3.36 9.82 13.67v29.21h12.05V62.62C448.09 47.95 442 41 429.2 41c-5.72 0-9.32 1.62-14.04 6.21v-4.85H403.1z"/><path class="st0" d="M48.83 46.5c-10.2 0-18.47 8.27-18.47 18.47s8.27 18.47 18.47 18.47S67.3 75.17 67.3 64.97 59.03 46.5 48.83 46.5zm-28.8 18.46c0-15.9 12.89-28.79 28.8-28.79s28.8 12.89 28.8 28.79c0 1.05-.06 2.09-.17 3.11-.22 2.81 1.84 4.95 4.63 4.95 4.73 0 5.24-6.1 5.24-8.06 0-21.26-17.24-38.5-38.5-38.5s-38.5 17.24-38.5 38.5 17.24 38.5 38.5 38.5c11.29 0 21.45-4.86 28.49-12.6l7.91 6.65c-8.94 9.99-21.94 16.29-36.41 16.29C21.86 113.79 0 91.93 0 64.96 0 38 21.86 16.13 48.83 16.13s48.83 21.86 48.83 48.83c0 10.84-5.16 19.64-15.53 19.64-4.56 0-7.34-2.09-8.85-4.42-5.08 8.15-14.13 13.58-24.45 13.58-15.91 0-28.8-12.89-28.8-28.8zm28.8-8.45c4.67 0 8.45 3.78 8.45 8.45s-3.78 8.45-8.45 8.45-8.45-3.78-8.45-8.45c0-4.66 3.78-8.45 8.45-8.45z"/></svg>
|
assets/images/menu-icon.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg xmlns="http://www.w3.org/2000/svg" fill="#9ea3a8" width="64" height="64" viewBox="0 0 43 34"><path d="M.007 3.585v16.836q0 3.586 3.751 3.585L20 24v-5h10v-4.986l.991-1L34 13V3.585Q34 0 30.249 0H3.758Q.007 0 .007 3.585zm3.517 2.572a1.49 1.49 0 0 1-.508-.935 1.581 1.581 0 0 1 .274-1.208 1.449 1.449 0 0 1 1.094-.663 1.756 1.756 0 0 1 1.25.312l11.409 7.716 11.331-7.716a1.96 1.96 0 0 1 1.289-.312 1.546 1.546 0 0 1 1.094.663 1.4 1.4 0 0 1 .273 1.208 1.67 1.67 0 0 1-.547.935l-13.44 11.068z"/><path d="M22 28h10l-.009 4.624a1.126 1.126 0 0 0 1.922.8l8.25-8.236a1.126 1.126 0 0 0 0-1.594l-8.25-8.241a1.126 1.126 0 0 0-1.922.8v4.866L22 21v7z"/></svg>
|
assets/images/php.png
DELETED
Binary file
|
assets/images/php.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg xmlns="http://www.w3.org/2000/svg" width="152" height="80"><path d="M77.5 0C118.645 0 152 17.909 152 40s-33.355 40-74.5 40S0 62.091 0 40 36.355 0 77.5 0z" fill-rule="evenodd" fill="#777bb3"/><path d="M32.331 21.353h15.952q7.023.059 10.178 4.044t2.083 10.884a20.864 20.864 0 0 1-1.844 6.186 18.385 18.385 0 0 1-3.809 5.472 13.3 13.3 0 0 1-6.369 3.925 29.343 29.343 0 0 1-7.022.836h-7.145L32.093 64H23.82l8.511-42.643m6.964 6.78l-3.571 17.839a4.38 4.38 0 0 0 .714.059h.833a31.319 31.319 0 0 0 9.523-1.13q3.809-1.249 5.119-8.683 1.071-6.245-2.143-7.2a26.728 26.728 0 0 0-7.916-.892q-.714.059-1.369.059h-1.25l.06-.059M69.968 9.994h8.214l-2.321 11.36h7.38q6.071.12 9.047 2.5 3.036 2.378 1.786 9.04L90.086 52.7h-8.333l3.809-18.913q.595-2.974-.357-4.223T81.1 28.312l-6.607-.059L69.611 52.7H61.4L69.971 10M102.9 21.353h15.951q7.023.059 10.178 4.044t2.083 10.884a20.861 20.861 0 0 1-1.845 6.185 18.389 18.389 0 0 1-3.809 5.472 13.3 13.3 0 0 1-6.369 3.925 29.341 29.341 0 0 1-7.023.833h-7.143L102.656 64h-8.273l8.517-42.647m6.963 6.78l-3.571 17.842a4.376 4.376 0 0 0 .714.059h.834a31.317 31.317 0 0 0 9.523-1.13q3.809-1.249 5.119-8.683 1.071-6.245-2.143-7.2a26.724 26.724 0 0 0-7.916-.892q-.714.059-1.369.059H109.8l.059-.059" fill="#fff" fill-rule="evenodd"/></svg>
|
assets/images/sendgrid.png
DELETED
Binary file
|
assets/images/sendgrid.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" x="0" y="0" viewBox="0 0 733.7 160" xml:space="preserve"><style>.st0{fill:#243846}.st2{fill:#3f7cbc}</style><path class="st0" d="M151.1 140.8l18.5-14.5c5.2 9 13.5 14.2 23 14.2 10.3 0 15.8-6.7 15.8-14 0-8.7-10.6-11.5-21.9-15-14.2-4.4-30.1-9.9-30.1-30.2 0-17 14.8-30.5 35.3-30.5 17.3 0 27.2 6.5 35.8 15.4l-16.7 12.6c-4.4-6.5-10.6-10-18.9-10-9.4 0-14.5 5.1-14.5 11.8 0 8.1 10.2 10.9 21.5 14.7 14.4 4.7 30.7 11 30.7 31.4 0 16.9-13.4 33.1-36.8 33.1-19.3.1-32.1-8.1-41.7-19zm162.6-55.1h19.8v8.1c4.7-6 11.8-9.6 20.1-9.6 17.1 0 27.5 11 27.5 29.8v44.3h-20.3v-41.7c0-9.7-4.5-15.4-13.4-15.4-7.6 0-13.8 5.2-13.8 17.4v39.7h-19.9V85.7zm72 36.4c0-25.7 18.9-37.8 35.3-37.8 9.4 0 16.9 3.5 21.7 8.6V52.3h19.9v106.1h-19.9v-8.1c-4.8 5.7-12.5 9.6-21.9 9.6-15.5 0-35.1-12.3-35.1-37.8zm57.5-.2c0-10.8-7.8-19.5-18.6-19.5-11 0-19.5 8.3-19.5 19.5s8.4 19.6 19.5 19.6c10.8 0 18.6-8.8 18.6-19.6zm24-16.5c0-30.2 22.8-54.5 54.2-54.5 15.7 0 28.9 5.7 38.5 14.7 3.9 3.7 7.2 7.9 9.8 12.5L552 88.9c-6.5-12.1-16.6-18.3-30.4-18.3-19.3 0-34.3 15.8-34.3 34.9 0 19.5 14.7 34.9 35 34.9 15.4 0 26.3-8.7 30.1-22.2h-33.3V98.9h55.1v8.1c0 28.5-20.3 53-51.9 53-33.2-.1-55.1-25.3-55.1-54.6zm112-19.7H599v11.9c3.6-7.6 10.2-11.9 20.1-11.9h8l-7.2 19.3h-5.4c-10.6 0-15.3 5.5-15.3 19v34.3h-19.9V85.7h-.1zm53 0h19.9v72.7h-19.9v-53.3H625l7.2-19.4zm10-11c6.6 0 11.9-5.3 11.9-11.9s-5.3-11.9-11.9-11.9c-6.6 0-11.9 5.3-11.9 11.9 0 6.5 5.3 11.9 11.9 11.9zm14.6 47.4c0-25.7 18.9-37.8 35.3-37.8 9.4 0 16.9 3.5 21.7 8.6V52.3h19.9v106.1h-19.9v-8.1c-4.8 5.7-12.5 9.6-21.9 9.6-15.5 0-35.1-12.3-35.1-37.8zm57.6-.2c0-10.8-7.8-19.5-18.6-19.5-11 0-19.5 8.3-19.5 19.5s8.4 19.6 19.5 19.6c10.7 0 18.6-8.8 18.6-19.6zm-405.4 0c0-20.9-15.3-37.6-37.5-37.6-20.9 0-37.8 16.9-37.8 37.8s15.7 37.8 38.4 37.8c15.7 0 27-7.6 33.3-18.4l-15.8-9.4c-3.3 6.4-9.8 10.4-17.4 10.4-10.5 0-17-5.2-19.3-13.2H309v-7.4zm-55.2-8.7c3.1-6.8 9.4-11.5 17.9-11.5 8.4 0 14.7 3.9 17.3 11.5h-35.2z"/><path d="M42.4 116h42.4v42.4H42.4zm0-42.5H0V116h42.4z" fill="#9edbee"/><path class="st2" d="M0 116h42.4v42.4H0z"/><path d="M127.3 73.5H84.9V116h42.4zM42.4 31.1h42.4v42.4H42.4z" fill="#07b2e2"/><path fill="#0f9cd5" d="M42.4 73.5V116h42.5V73.5z"/><path class="st2" d="M84.9 31.1h42.4v42.4H84.9z"/><path class="st0" d="M171.2 5.5v24.7h-5.7V5.5h-8.8v-5h23.4v4.9h-8.9v.1zm50.5 24.7h-5.4l-6.6-21.6-6.6 21.6h-5.4L189.4.4l6 .1 5.5 21 6.2-21h5.7l6.2 21 5.4-21h5.7l-8.4 29.7zm19.8 0V.5h5.7v29.7h-5.7zm19 0V.5h5.7v24.7h9.9l.1 5h-15.7zm27.5 0V.5h5.7v29.7H288zm31.8.6c-8.4 0-13.9-6.2-13.9-15.4S311.4 0 319.9 0s13.9 6.2 13.9 15.4c-.1 9.1-5.5 15.4-14 15.4zm0-26.1c-5.1 0-8.1 4.2-8.1 10.7s3.1 10.7 8.1 10.7c5.1 0 8.2-4.2 8.2-10.7s-3.1-10.7-8.2-10.7z"/></svg>
|
assets/images/smtp.png
DELETED
Binary file
|
assets/images/smtp.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg xmlns="http://www.w3.org/2000/svg" width="181" height="60"><defs><style>.cls-1{fill:#ccc;fill-rule:evenodd}</style></defs><path id="Rounded_Rectangle_1" data-name="Rounded Rectangle 1" class="cls-1" d="M47.124 46.084h34.292a4.277 4.277 0 1 1 0 8.555H47.124a4.277 4.277 0 1 1 0-8.555z"/><path id="Rounded_Rectangle_1-2" data-name="Rounded Rectangle 1" class="cls-1" d="M25.707 26.777h55.7a4.284 4.284 0 0 1 4.284 4.284v.016a4.284 4.284 0 0 1-4.284 4.284h-55.7a4.284 4.284 0 0 1-4.284-4.284v-.016a4.284 4.284 0 0 1 4.284-4.284z"/><path id="Rounded_Rectangle_1-3" data-name="Rounded Rectangle 1" class="cls-1" d="M4.284 6.416H81.41a4.284 4.284 0 0 1 4.284 4.284v.016A4.284 4.284 0 0 1 81.41 15H4.284A4.284 4.284 0 0 1 0 10.716V10.7a4.284 4.284 0 0 1 4.284-4.284z"/><path id="_" data-name="" d="M178.878 57.783a6.911 6.911 0 0 1-5.186 2.2h-68.954a6.9 6.9 0 0 1-5.186-2.2 7.317 7.317 0 0 1-2.113-5.261V8.516a7.327 7.327 0 0 1 2.113-5.261 6.914 6.914 0 0 1 5.186-2.2h68.954a6.922 6.922 0 0 1 5.186 2.2 7.338 7.338 0 0 1 2.113 5.261v44.005a7.328 7.328 0 0 1-2.113 5.262zm-8.835-49.458l-30.732 24.681L108.58 8.325q-2.693-2.3-4.8-.383a2.672 2.672 0 0 0-.768 2.2 3.334 3.334 0 0 0 .96 1.818l19.976 18.367-19.208 19.9a1.743 1.743 0 0 0-.192 2.487 1.392 1.392 0 0 0 1.249.574 2.532 2.532 0 0 0 1.44-.383l21.512-18.176 10.562 9.371 10.372-9.375L171.2 52.9a2.536 2.536 0 0 0 1.441.383 1.958 1.958 0 0 0 1.44-.574q.96-1.148-.384-2.487l-19.207-19.9 19.971-18.362a4.023 4.023 0 0 0 1.056-1.818 2.274 2.274 0 0 0-.864-2.2q-1.923-1.91-4.61.383z" fill="#819eaf" fill-rule="evenodd"/></svg>
|
assets/js/jquery.matchHeight.js
ADDED
@@ -0,0 +1,388 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* jquery-match-height 0.7.2 by @liabru
|
3 |
+
* http://brm.io/jquery-match-height/
|
4 |
+
* License: MIT
|
5 |
+
*/
|
6 |
+
|
7 |
+
;(function(factory) { // eslint-disable-line no-extra-semi
|
8 |
+
'use strict';
|
9 |
+
if (typeof define === 'function' && define.amd) {
|
10 |
+
// AMD
|
11 |
+
define(['jquery'], factory);
|
12 |
+
} else if (typeof module !== 'undefined' && module.exports) {
|
13 |
+
// CommonJS
|
14 |
+
module.exports = factory(require('jquery'));
|
15 |
+
} else {
|
16 |
+
// Global
|
17 |
+
factory(jQuery);
|
18 |
+
}
|
19 |
+
})(function($) {
|
20 |
+
/*
|
21 |
+
* internal
|
22 |
+
*/
|
23 |
+
|
24 |
+
var _previousResizeWidth = -1,
|
25 |
+
_updateTimeout = -1;
|
26 |
+
|
27 |
+
/*
|
28 |
+
* _parse
|
29 |
+
* value parse utility function
|
30 |
+
*/
|
31 |
+
|
32 |
+
var _parse = function(value) {
|
33 |
+
// parse value and convert NaN to 0
|
34 |
+
return parseFloat(value) || 0;
|
35 |
+
};
|
36 |
+
|
37 |
+
/*
|
38 |
+
* _rows
|
39 |
+
* utility function returns array of jQuery selections representing each row
|
40 |
+
* (as displayed after float wrapping applied by browser)
|
41 |
+
*/
|
42 |
+
|
43 |
+
var _rows = function(elements) {
|
44 |
+
var tolerance = 1,
|
45 |
+
$elements = $(elements),
|
46 |
+
lastTop = null,
|
47 |
+
rows = [];
|
48 |
+
|
49 |
+
// group elements by their top position
|
50 |
+
$elements.each(function(){
|
51 |
+
var $that = $(this),
|
52 |
+
top = $that.offset().top - _parse($that.css('margin-top')),
|
53 |
+
lastRow = rows.length > 0 ? rows[rows.length - 1] : null;
|
54 |
+
|
55 |
+
if (lastRow === null) {
|
56 |
+
// first item on the row, so just push it
|
57 |
+
rows.push($that);
|
58 |
+
} else {
|
59 |
+
// if the row top is the same, add to the row group
|
60 |
+
if (Math.floor(Math.abs(lastTop - top)) <= tolerance) {
|
61 |
+
rows[rows.length - 1] = lastRow.add($that);
|
62 |
+
} else {
|
63 |
+
// otherwise start a new row group
|
64 |
+
rows.push($that);
|
65 |
+
}
|
66 |
+
}
|
67 |
+
|
68 |
+
// keep track of the last row top
|
69 |
+
lastTop = top;
|
70 |
+
});
|
71 |
+
|
72 |
+
return rows;
|
73 |
+
};
|
74 |
+
|
75 |
+
/*
|
76 |
+
* _parseOptions
|
77 |
+
* handle plugin options
|
78 |
+
*/
|
79 |
+
|
80 |
+
var _parseOptions = function(options) {
|
81 |
+
var opts = {
|
82 |
+
byRow: true,
|
83 |
+
property: 'height',
|
84 |
+
target: null,
|
85 |
+
remove: false
|
86 |
+
};
|
87 |
+
|
88 |
+
if (typeof options === 'object') {
|
89 |
+
return $.extend(opts, options);
|
90 |
+
}
|
91 |
+
|
92 |
+
if (typeof options === 'boolean') {
|
93 |
+
opts.byRow = options;
|
94 |
+
} else if (options === 'remove') {
|
95 |
+
opts.remove = true;
|
96 |
+
}
|
97 |
+
|
98 |
+
return opts;
|
99 |
+
};
|
100 |
+
|
101 |
+
/*
|
102 |
+
* matchHeight
|
103 |
+
* plugin definition
|
104 |
+
*/
|
105 |
+
|
106 |
+
var matchHeight = $.fn.matchHeight = function(options) {
|
107 |
+
var opts = _parseOptions(options);
|
108 |
+
|
109 |
+
// handle remove
|
110 |
+
if (opts.remove) {
|
111 |
+
var that = this;
|
112 |
+
|
113 |
+
// remove fixed height from all selected elements
|
114 |
+
this.css(opts.property, '');
|
115 |
+
|
116 |
+
// remove selected elements from all groups
|
117 |
+
$.each(matchHeight._groups, function(key, group) {
|
118 |
+
group.elements = group.elements.not(that);
|
119 |
+
});
|
120 |
+
|
121 |
+
// TODO: cleanup empty groups
|
122 |
+
|
123 |
+
return this;
|
124 |
+
}
|
125 |
+
|
126 |
+
if (this.length <= 1 && !opts.target) {
|
127 |
+
return this;
|
128 |
+
}
|
129 |
+
|
130 |
+
// keep track of this group so we can re-apply later on load and resize events
|
131 |
+
matchHeight._groups.push({
|
132 |
+
elements: this,
|
133 |
+
options: opts
|
134 |
+
});
|
135 |
+
|
136 |
+
// match each element's height to the tallest element in the selection
|
137 |
+
matchHeight._apply(this, opts);
|
138 |
+
|
139 |
+
return this;
|
140 |
+
};
|
141 |
+
|
142 |
+
/*
|
143 |
+
* plugin global options
|
144 |
+
*/
|
145 |
+
|
146 |
+
matchHeight.version = '0.7.2';
|
147 |
+
matchHeight._groups = [];
|
148 |
+
matchHeight._throttle = 80;
|
149 |
+
matchHeight._maintainScroll = false;
|
150 |
+
matchHeight._beforeUpdate = null;
|
151 |
+
matchHeight._afterUpdate = null;
|
152 |
+
matchHeight._rows = _rows;
|
153 |
+
matchHeight._parse = _parse;
|
154 |
+
matchHeight._parseOptions = _parseOptions;
|
155 |
+
|
156 |
+
/*
|
157 |
+
* matchHeight._apply
|
158 |
+
* apply matchHeight to given elements
|
159 |
+
*/
|
160 |
+
|
161 |
+
matchHeight._apply = function(elements, options) {
|
162 |
+
var opts = _parseOptions(options),
|
163 |
+
$elements = $(elements),
|
164 |
+
rows = [$elements];
|
165 |
+
|
166 |
+
// take note of scroll position
|
167 |
+
var scrollTop = $(window).scrollTop(),
|
168 |
+
htmlHeight = $('html').outerHeight(true);
|
169 |
+
|
170 |
+
// get hidden parents
|
171 |
+
var $hiddenParents = $elements.parents().filter(':hidden');
|
172 |
+
|
173 |
+
// cache the original inline style
|
174 |
+
$hiddenParents.each(function() {
|
175 |
+
var $that = $(this);
|
176 |
+
$that.data('style-cache', $that.attr('style'));
|
177 |
+
});
|
178 |
+
|
179 |
+
// temporarily must force hidden parents visible
|
180 |
+
$hiddenParents.css('display', 'block');
|
181 |
+
|
182 |
+
// get rows if using byRow, otherwise assume one row
|
183 |
+
if (opts.byRow && !opts.target) {
|
184 |
+
|
185 |
+
// must first force an arbitrary equal height so floating elements break evenly
|
186 |
+
$elements.each(function() {
|
187 |
+
var $that = $(this),
|
188 |
+
display = $that.css('display');
|
189 |
+
|
190 |
+
// temporarily force a usable display value
|
191 |
+
if (display !== 'inline-block' && display !== 'flex' && display !== 'inline-flex') {
|
192 |
+
display = 'block';
|
193 |
+
}
|
194 |
+
|
195 |
+
// cache the original inline style
|
196 |
+
$that.data('style-cache', $that.attr('style'));
|
197 |
+
|
198 |
+
$that.css({
|
199 |
+
'display': display,
|
200 |
+
'padding-top': '0',
|
201 |
+
'padding-bottom': '0',
|
202 |
+
'margin-top': '0',
|
203 |
+
'margin-bottom': '0',
|
204 |
+
'border-top-width': '0',
|
205 |
+
'border-bottom-width': '0',
|
206 |
+
'height': '100px',
|
207 |
+
'overflow': 'hidden'
|
208 |
+
});
|
209 |
+
});
|
210 |
+
|
211 |
+
// get the array of rows (based on element top position)
|
212 |
+
rows = _rows($elements);
|
213 |
+
|
214 |
+
// revert original inline styles
|
215 |
+
$elements.each(function() {
|
216 |
+
var $that = $(this);
|
217 |
+
$that.attr('style', $that.data('style-cache') || '');
|
218 |
+
});
|
219 |
+
}
|
220 |
+
|
221 |
+
$.each(rows, function(key, row) {
|
222 |
+
var $row = $(row),
|
223 |
+
targetHeight = 0;
|
224 |
+
|
225 |
+
if (!opts.target) {
|
226 |
+
// skip apply to rows with only one item
|
227 |
+
if (opts.byRow && $row.length <= 1) {
|
228 |
+
$row.css(opts.property, '');
|
229 |
+
return;
|
230 |
+
}
|
231 |
+
|
232 |
+
// iterate the row and find the max height
|
233 |
+
$row.each(function(){
|
234 |
+
var $that = $(this),
|
235 |
+
style = $that.attr('style'),
|
236 |
+
display = $that.css('display');
|
237 |
+
|
238 |
+
// temporarily force a usable display value
|
239 |
+
if (display !== 'inline-block' && display !== 'flex' && display !== 'inline-flex') {
|
240 |
+
display = 'block';
|
241 |
+
}
|
242 |
+
|
243 |
+
// ensure we get the correct actual height (and not a previously set height value)
|
244 |
+
var css = { 'display': display };
|
245 |
+
css[opts.property] = '';
|
246 |
+
$that.css(css);
|
247 |
+
|
248 |
+
// find the max height (including padding, but not margin)
|
249 |
+
if ($that.outerHeight(false) > targetHeight) {
|
250 |
+
targetHeight = $that.outerHeight(false);
|
251 |
+
}
|
252 |
+
|
253 |
+
// revert styles
|
254 |
+
if (style) {
|
255 |
+
$that.attr('style', style);
|
256 |
+
} else {
|
257 |
+
$that.css('display', '');
|
258 |
+
}
|
259 |
+
});
|
260 |
+
} else {
|
261 |
+
// if target set, use the height of the target element
|
262 |
+
targetHeight = opts.target.outerHeight(false);
|
263 |
+
}
|
264 |
+
|
265 |
+
// iterate the row and apply the height to all elements
|
266 |
+
$row.each(function(){
|
267 |
+
var $that = $(this),
|
268 |
+
verticalPadding = 0;
|
269 |
+
|
270 |
+
// don't apply to a target
|
271 |
+
if (opts.target && $that.is(opts.target)) {
|
272 |
+
return;
|
273 |
+
}
|
274 |
+
|
275 |
+
// handle padding and border correctly (required when not using border-box)
|
276 |
+
if ($that.css('box-sizing') !== 'border-box') {
|
277 |
+
verticalPadding += _parse($that.css('border-top-width')) + _parse($that.css('border-bottom-width'));
|
278 |
+
verticalPadding += _parse($that.css('padding-top')) + _parse($that.css('padding-bottom'));
|
279 |
+
}
|
280 |
+
|
281 |
+
// set the height (accounting for padding and border)
|
282 |
+
$that.css(opts.property, (targetHeight - verticalPadding) + 'px');
|
283 |
+
});
|
284 |
+
});
|
285 |
+
|
286 |
+
// revert hidden parents
|
287 |
+
$hiddenParents.each(function() {
|
288 |
+
var $that = $(this);
|
289 |
+
$that.attr('style', $that.data('style-cache') || null);
|
290 |
+
});
|
291 |
+
|
292 |
+
// restore scroll position if enabled
|
293 |
+
if (matchHeight._maintainScroll) {
|
294 |
+
$(window).scrollTop((scrollTop / htmlHeight) * $('html').outerHeight(true));
|
295 |
+
}
|
296 |
+
|
297 |
+
return this;
|
298 |
+
};
|
299 |
+
|
300 |
+
/*
|
301 |
+
* matchHeight._applyDataApi
|
302 |
+
* applies matchHeight to all elements with a data-match-height attribute
|
303 |
+
*/
|
304 |
+
|
305 |
+
matchHeight._applyDataApi = function() {
|
306 |
+
var groups = {};
|
307 |
+
|
308 |
+
// generate groups by their groupId set by elements using data-match-height
|
309 |
+
$('[data-match-height], [data-mh]').each(function() {
|
310 |
+
var $this = $(this),
|
311 |
+
groupId = $this.attr('data-mh') || $this.attr('data-match-height');
|
312 |
+
|
313 |
+
if (groupId in groups) {
|
314 |
+
groups[groupId] = groups[groupId].add($this);
|
315 |
+
} else {
|
316 |
+
groups[groupId] = $this;
|
317 |
+
}
|
318 |
+
});
|
319 |
+
|
320 |
+
// apply matchHeight to each group
|
321 |
+
$.each(groups, function() {
|
322 |
+
this.matchHeight(true);
|
323 |
+
});
|
324 |
+
};
|
325 |
+
|
326 |
+
/*
|
327 |
+
* matchHeight._update
|
328 |
+
* updates matchHeight on all current groups with their correct options
|
329 |
+
*/
|
330 |
+
|
331 |
+
var _update = function(event) {
|
332 |
+
if (matchHeight._beforeUpdate) {
|
333 |
+
matchHeight._beforeUpdate(event, matchHeight._groups);
|
334 |
+
}
|
335 |
+
|
336 |
+
$.each(matchHeight._groups, function() {
|
337 |
+
matchHeight._apply(this.elements, this.options);
|
338 |
+
});
|
339 |
+
|
340 |
+
if (matchHeight._afterUpdate) {
|
341 |
+
matchHeight._afterUpdate(event, matchHeight._groups);
|
342 |
+
}
|
343 |
+
};
|
344 |
+
|
345 |
+
matchHeight._update = function(throttle, event) {
|
346 |
+
// prevent update if fired from a resize event
|
347 |
+
// where the viewport width hasn't actually changed
|
348 |
+
// fixes an event looping bug in IE8
|
349 |
+
if (event && event.type === 'resize') {
|
350 |
+
var windowWidth = $(window).width();
|
351 |
+
if (windowWidth === _previousResizeWidth) {
|
352 |
+
return;
|
353 |
+
}
|
354 |
+
_previousResizeWidth = windowWidth;
|
355 |
+
}
|
356 |
+
|
357 |
+
// throttle updates
|
358 |
+
if (!throttle) {
|
359 |
+
_update(event);
|
360 |
+
} else if (_updateTimeout === -1) {
|
361 |
+
_updateTimeout = setTimeout(function() {
|
362 |
+
_update(event);
|
363 |
+
_updateTimeout = -1;
|
364 |
+
}, matchHeight._throttle);
|
365 |
+
}
|
366 |
+
};
|
367 |
+
|
368 |
+
/*
|
369 |
+
* bind events
|
370 |
+
*/
|
371 |
+
|
372 |
+
// apply on DOM ready event
|
373 |
+
$(matchHeight._applyDataApi);
|
374 |
+
|
375 |
+
// use on or bind where supported
|
376 |
+
var on = $.fn.on ? 'on' : 'bind';
|
377 |
+
|
378 |
+
// update heights on load and resize events
|
379 |
+
$(window)[on]('load', function(event) {
|
380 |
+
matchHeight._update(false, event);
|
381 |
+
});
|
382 |
+
|
383 |
+
// throttled update heights on resize events
|
384 |
+
$(window)[on]('resize orientationchange', function(event) {
|
385 |
+
matchHeight._update(true, event);
|
386 |
+
});
|
387 |
+
|
388 |
+
});
|
assets/js/jquery.matchHeight.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):"undefined"!=typeof module&&module.exports?module.exports=t(require("jquery")):t(jQuery)}(function(l){function h(t){return parseFloat(t)||0}function c(t){var e=l(t),n=null,a=[];return e.each(function(){var t=l(this),e=t.offset().top-h(t.css("margin-top")),o=0<a.length?a[a.length-1]:null;null===o?a.push(t):Math.floor(Math.abs(n-e))<=1?a[a.length-1]=o.add(t):a.push(t),n=e}),a}function p(t){var e={byRow:!0,property:"height",target:null,remove:!1};return"object"==typeof t?l.extend(e,t):("boolean"==typeof t?e.byRow=t:"remove"===t&&(e.remove=!0),e)}var n=-1,a=-1,u=l.fn.matchHeight=function(t){var e=p(t);if(e.remove){var o=this;return this.css(e.property,""),l.each(u._groups,function(t,e){e.elements=e.elements.not(o)}),this}return this.length<=1&&!e.target||(u._groups.push({elements:this,options:e}),u._apply(this,e)),this};u.version="0.7.2",u._groups=[],u._throttle=80,u._maintainScroll=!1,u._beforeUpdate=null,u._afterUpdate=null,u._rows=c,u._parse=h,u._parseOptions=p,u._apply=function(t,e){var i=p(e),o=l(t),n=[o],a=l(window).scrollTop(),r=l("html").outerHeight(!0),s=o.parents().filter(":hidden");return s.each(function(){var t=l(this);t.data("style-cache",t.attr("style"))}),s.css("display","block"),i.byRow&&!i.target&&(o.each(function(){var t=l(this),e=t.css("display");"inline-block"!==e&&"flex"!==e&&"inline-flex"!==e&&(e="block"),t.data("style-cache",t.attr("style")),t.css({display:e,"padding-top":"0","padding-bottom":"0","margin-top":"0","margin-bottom":"0","border-top-width":"0","border-bottom-width":"0",height:"100px",overflow:"hidden"})}),n=c(o),o.each(function(){var t=l(this);t.attr("style",t.data("style-cache")||"")})),l.each(n,function(t,e){var o=l(e),a=0;if(i.target)a=i.target.outerHeight(!1);else{if(i.byRow&&o.length<=1)return void o.css(i.property,"");o.each(function(){var t=l(this),e=t.attr("style"),o=t.css("display");"inline-block"!==o&&"flex"!==o&&"inline-flex"!==o&&(o="block");var n={display:o};n[i.property]="",t.css(n),t.outerHeight(!1)>a&&(a=t.outerHeight(!1)),e?t.attr("style",e):t.css("display","")})}o.each(function(){var t=l(this),e=0;i.target&&t.is(i.target)||("border-box"!==t.css("box-sizing")&&(e+=h(t.css("border-top-width"))+h(t.css("border-bottom-width")),e+=h(t.css("padding-top"))+h(t.css("padding-bottom"))),t.css(i.property,a-e+"px"))})}),s.each(function(){var t=l(this);t.attr("style",t.data("style-cache")||null)}),u._maintainScroll&&l(window).scrollTop(a/r*l("html").outerHeight(!0)),this},u._applyDataApi=function(){var o={};l("[data-match-height], [data-mh]").each(function(){var t=l(this),e=t.attr("data-mh")||t.attr("data-match-height");o[e]=e in o?o[e].add(t):t}),l.each(o,function(){this.matchHeight(!0)})};function i(t){u._beforeUpdate&&u._beforeUpdate(t,u._groups),l.each(u._groups,function(){u._apply(this.elements,this.options)}),u._afterUpdate&&u._afterUpdate(t,u._groups)}u._update=function(t,e){if(e&&"resize"===e.type){var o=l(window).width();if(o===n)return;n=o}t?-1===a&&(a=setTimeout(function(){i(e),a=-1},u._throttle)):i(e)},l(u._applyDataApi);var t=l.fn.on?"on":"bind";l(window)[t]("load",function(t){u._update(!1,t)}),l(window)[t]("resize orientationchange",function(t){u._update(!0,t)})});
|
assets/js/smtp-about.js
ADDED
@@ -0,0 +1,181 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* global WPMailSMTP, jQuery, wp_mail_smtp_about */
|
2 |
+
|
3 |
+
var WPMailSMTP = window.WPMailSMTP || {};
|
4 |
+
WPMailSMTP.Admin = WPMailSMTP.Admin || {};
|
5 |
+
|
6 |
+
/**
|
7 |
+
* WP Mail SMTP Admin area About module.
|
8 |
+
*
|
9 |
+
* @since 1.5.0
|
10 |
+
*/
|
11 |
+
WPMailSMTP.Admin.About = WPMailSMTP.Admin.About || (function ( document, window, $ ) {
|
12 |
+
|
13 |
+
'use strict';
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Private functions and properties.
|
17 |
+
*
|
18 |
+
* @since 1.5.0
|
19 |
+
*
|
20 |
+
* @type {Object}
|
21 |
+
*/
|
22 |
+
var __private = {};
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Public functions and properties.
|
26 |
+
*
|
27 |
+
* @since 1.5.0
|
28 |
+
*
|
29 |
+
* @type {Object}
|
30 |
+
*/
|
31 |
+
var app = {
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Start the engine. DOM is not ready yet, use only to init something.
|
35 |
+
*
|
36 |
+
* @since 1.5.0
|
37 |
+
*/
|
38 |
+
init: function () {
|
39 |
+
|
40 |
+
// Do that when DOM is ready.
|
41 |
+
$( document ).ready( app.ready );
|
42 |
+
},
|
43 |
+
|
44 |
+
/**
|
45 |
+
* DOM is fully loaded.
|
46 |
+
*
|
47 |
+
* @since 1.5.0
|
48 |
+
*/
|
49 |
+
ready: function () {
|
50 |
+
|
51 |
+
app.pageHolder = $( '.wp-mail-smtp-page-about' );
|
52 |
+
|
53 |
+
app.bindActions();
|
54 |
+
|
55 |
+
$( '.wp-mail-smtp-page' ).trigger( 'WPMailSMTP.Admin.About.ready' );
|
56 |
+
},
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Process all generic actions/events, mostly custom that were fired by our API.
|
60 |
+
*
|
61 |
+
* @since 1.5.0
|
62 |
+
*/
|
63 |
+
bindActions: function () {
|
64 |
+
|
65 |
+
/*
|
66 |
+
* Make plugins description the same height.
|
67 |
+
*/
|
68 |
+
jQuery('.wp-mail-smtp-admin-about-plugins .plugin-item .details').matchHeight();
|
69 |
+
|
70 |
+
/*
|
71 |
+
* Install/Active the plugins.
|
72 |
+
*/
|
73 |
+
$( document ).on( 'click', '.wp-mail-smtp-admin-about-plugins .plugin-item .action-button .button', function( e ) {
|
74 |
+
e.preventDefault();
|
75 |
+
|
76 |
+
var $btn = $( this );
|
77 |
+
|
78 |
+
if ( $btn.hasClass( 'disabled' ) || $btn.hasClass( 'loading' ) ) {
|
79 |
+
return false;
|
80 |
+
}
|
81 |
+
|
82 |
+
var $plugin = $btn.closest( '.plugin-item' ),
|
83 |
+
plugin = $btn.attr( 'data-plugin' ),
|
84 |
+
task,
|
85 |
+
cssClass,
|
86 |
+
statusText,
|
87 |
+
buttonText,
|
88 |
+
errorText,
|
89 |
+
successText;
|
90 |
+
|
91 |
+
$btn.prop( 'disabled', true ).addClass( 'loading' );
|
92 |
+
$btn.text( wp_mail_smtp_about.plugin_processing );
|
93 |
+
|
94 |
+
if ( $btn.hasClass( 'status-inactive' ) ) {
|
95 |
+
// Activate.
|
96 |
+
task = 'about_plugin_activate';
|
97 |
+
cssClass = 'status-active button button-secondary disabled';
|
98 |
+
statusText = wp_mail_smtp_about.plugin_active;
|
99 |
+
buttonText = wp_mail_smtp_about.plugin_activated;
|
100 |
+
errorText = wp_mail_smtp_about.plugin_activate;
|
101 |
+
|
102 |
+
} else if ( $btn.hasClass( 'status-download' ) ) {
|
103 |
+
// Install & Activate.
|
104 |
+
task = 'about_plugin_install';
|
105 |
+
cssClass = 'status-active button disabled';
|
106 |
+
statusText = wp_mail_smtp_about.plugin_active;
|
107 |
+
buttonText = wp_mail_smtp_about.plugin_activated;
|
108 |
+
errorText = wp_mail_smtp_about.plugin_activate;
|
109 |
+
|
110 |
+
} else {
|
111 |
+
return;
|
112 |
+
}
|
113 |
+
|
114 |
+
// Setup ajax POST data.
|
115 |
+
var data = {
|
116 |
+
action: 'wp_mail_smtp_ajax',
|
117 |
+
task: task,
|
118 |
+
nonce : wp_mail_smtp_about.nonce,
|
119 |
+
plugin: plugin
|
120 |
+
};
|
121 |
+
|
122 |
+
$.post( wp_mail_smtp_about.ajax_url, data, function( res ) {
|
123 |
+
|
124 |
+
if ( res.success ) {
|
125 |
+
if ( 'about_plugin_install' === task ) {
|
126 |
+
$btn.attr( 'data-plugin', res.data.basename );
|
127 |
+
successText = res.data.msg;
|
128 |
+
if ( ! res.data.is_activated ) {
|
129 |
+
cssClass = 'button';
|
130 |
+
statusText = wp_mail_smtp_about.plugin_inactive;
|
131 |
+
buttonText = wp_mail_smtp_about.plugin_activate;
|
132 |
+
}
|
133 |
+
} else {
|
134 |
+
successText = res.data;
|
135 |
+
}
|
136 |
+
$plugin.find( '.actions' ).append( '<div class="msg success">'+successText+'</div>' );
|
137 |
+
$plugin.find( 'span.status-label' )
|
138 |
+
.removeClass( 'status-active status-inactive status-download' )
|
139 |
+
.addClass( cssClass )
|
140 |
+
.removeClass( 'button button-primary button-secondary disabled' )
|
141 |
+
.text( statusText );
|
142 |
+
$btn
|
143 |
+
.removeClass( 'status-active status-inactive status-download' )
|
144 |
+
.removeClass( 'button button-primary button-secondary disabled' )
|
145 |
+
.addClass( cssClass ).html( buttonText );
|
146 |
+
} else {
|
147 |
+
if (
|
148 |
+
res.hasOwnProperty('data') &&
|
149 |
+
res.data.hasOwnProperty(0) &&
|
150 |
+
res.data[0].hasOwnProperty('code') &&
|
151 |
+
res.data[0].code === 'download_failed'
|
152 |
+
) {
|
153 |
+
// Specific server-returned error.
|
154 |
+
$plugin.find( '.actions' ).append( '<div class="msg error">'+wp_mail_smtp_about.plugin_install_error+'</div>' );
|
155 |
+
} else {
|
156 |
+
// Generic error.
|
157 |
+
$plugin.find( '.actions' ).append( '<div class="msg error">'+res.data+'</div>' );
|
158 |
+
}
|
159 |
+
$btn.html( errorText );
|
160 |
+
}
|
161 |
+
|
162 |
+
$btn.prop( 'disabled', false ).removeClass( 'loading' );
|
163 |
+
|
164 |
+
// Automatically clear plugin messages after 3 seconds.
|
165 |
+
setTimeout( function() {
|
166 |
+
$( '.plugin-item .msg' ).remove();
|
167 |
+
}, 3000 );
|
168 |
+
|
169 |
+
}).fail( function( xhr ) {
|
170 |
+
console.log( xhr.responseText );
|
171 |
+
});
|
172 |
+
});
|
173 |
+
}
|
174 |
+
};
|
175 |
+
|
176 |
+
// Provide access to public functions/properties.
|
177 |
+
return app;
|
178 |
+
})( document, window, jQuery );
|
179 |
+
|
180 |
+
// Initialize.
|
181 |
+
WPMailSMTP.Admin.About.init();
|
assets/js/smtp-about.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
var WPMailSMTP=window.WPMailSMTP||{};WPMailSMTP.Admin=WPMailSMTP.Admin||{},WPMailSMTP.Admin.About=WPMailSMTP.Admin.About||function(a,t,m){"use strict";var i={init:function(){m(a).ready(i.ready)},ready:function(){i.pageHolder=m(".wp-mail-smtp-page-about"),i.bindActions(),m(".wp-mail-smtp-page").trigger("WPMailSMTP.Admin.About.ready")},bindActions:function(){jQuery(".wp-mail-smtp-admin-about-plugins .plugin-item .details").matchHeight(),m(a).on("click",".wp-mail-smtp-admin-about-plugins .plugin-item .action-button .button",function(a){a.preventDefault();var t=m(this);if(t.hasClass("disabled")||t.hasClass("loading"))return!1;var i,s,n,l,e,o,u=t.closest(".plugin-item"),d=t.attr("data-plugin");if(t.prop("disabled",!0).addClass("loading"),t.text(wp_mail_smtp_about.plugin_processing),t.hasClass("status-inactive"))i="about_plugin_activate",s="status-active button button-secondary disabled",n=wp_mail_smtp_about.plugin_active,l=wp_mail_smtp_about.plugin_activated,e=wp_mail_smtp_about.plugin_activate;else{if(!t.hasClass("status-download"))return;i="about_plugin_install",s="status-active button disabled",n=wp_mail_smtp_about.plugin_active,l=wp_mail_smtp_about.plugin_activated,e=wp_mail_smtp_about.plugin_activate}var p={action:"wp_mail_smtp_ajax",task:i,nonce:wp_mail_smtp_about.nonce,plugin:d};m.post(wp_mail_smtp_about.ajax_url,p,function(a){a.success?("about_plugin_install"===i?(t.attr("data-plugin",a.data.basename),o=a.data.msg,a.data.is_activated||(s="button",n=wp_mail_smtp_about.plugin_inactive,l=wp_mail_smtp_about.plugin_activate)):o=a.data,u.find(".actions").append('<div class="msg success">'+o+"</div>"),u.find("span.status-label").removeClass("status-active status-inactive status-download").addClass(s).removeClass("button button-primary button-secondary disabled").text(n),t.removeClass("status-active status-inactive status-download").removeClass("button button-primary button-secondary disabled").addClass(s).html(l)):(a.hasOwnProperty("data")&&a.data.hasOwnProperty(0)&&a.data[0].hasOwnProperty("code")&&"download_failed"===a.data[0].code?u.find(".actions").append('<div class="msg error">'+wp_mail_smtp_about.plugin_install_error+"</div>"):u.find(".actions").append('<div class="msg error">'+a.data+"</div>"),t.html(e)),t.prop("disabled",!1).removeClass("loading"),setTimeout(function(){m(".plugin-item .msg").remove()},3e3)}).fail(function(a){console.log(a.responseText)})})}};return i}(document,window,jQuery),WPMailSMTP.Admin.About.init();
|
assets/js/smtp-admin.js
CHANGED
@@ -50,18 +50,18 @@ jQuery( document ).ready( function ( $ ) {
|
|
50 |
}
|
51 |
} );
|
52 |
|
53 |
-
$( '#wp-mail-smtp-
|
54 |
$.ajax( {
|
55 |
url: ajaxurl,
|
56 |
dataType: 'json',
|
57 |
type: 'POST',
|
58 |
data: {
|
59 |
action: 'wp_mail_smtp_ajax',
|
60 |
-
task: '
|
61 |
}
|
62 |
} )
|
63 |
.always( function () {
|
64 |
-
$( '#wp-mail-smtp-
|
65 |
} );
|
66 |
} );
|
67 |
|
@@ -73,7 +73,7 @@ jQuery( document ).ready( function ( $ ) {
|
|
73 |
$( '#wp-mail-smtp-debug .error-log-note' ).toggle();
|
74 |
} );
|
75 |
|
76 |
-
$( '
|
77 |
-
return confirm( window.wp_mail_smtp.
|
78 |
} );
|
79 |
} );
|
50 |
}
|
51 |
} );
|
52 |
|
53 |
+
$( '#wp-mail-smtp-pro-banner-dismiss' ).on( 'click', function () {
|
54 |
$.ajax( {
|
55 |
url: ajaxurl,
|
56 |
dataType: 'json',
|
57 |
type: 'POST',
|
58 |
data: {
|
59 |
action: 'wp_mail_smtp_ajax',
|
60 |
+
task: 'pro_banner_dismiss'
|
61 |
}
|
62 |
} )
|
63 |
.always( function () {
|
64 |
+
$( '#wp-mail-smtp-pro-banner' ).fadeOut( 'fast' );
|
65 |
} );
|
66 |
} );
|
67 |
|
73 |
$( '#wp-mail-smtp-debug .error-log-note' ).toggle();
|
74 |
} );
|
75 |
|
76 |
+
$( '.js-wp-mail-smtp-provider-remove' ).on( 'click', function () {
|
77 |
+
return confirm( window.wp_mail_smtp.text_provider_remove );
|
78 |
} );
|
79 |
} );
|
assets/js/smtp-admin.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(document).ready(function(
|
1 |
+
jQuery(document).ready(function(i){i(".wp-mail-smtp-mailer input").click(function(){if(i(this).prop("disabled"))return!1;i(".wp-mail-smtp-mailer").removeClass("active"),i(this).parents(".wp-mail-smtp-mailer").addClass("active"),i(".wp-mail-smtp-mailer-option").addClass("hidden").removeClass("active"),i(".wp-mail-smtp-mailer-option-"+i(this).val()).addClass("active").removeClass("hidden")}),i(".wp-mail-smtp-mailer-image").click(function(){i(this).parents(".wp-mail-smtp-mailer").find("input").trigger("click")}),i(".wp-mail-smtp-setting-copy").click(function(t){t.preventDefault(),i("#"+i(this).data("source_id")).get(0).select(),document.execCommand("Copy")}),i("#wp-mail-smtp-setting-smtp-auth").change(function(){i("#wp-mail-smtp-setting-row-smtp-user, #wp-mail-smtp-setting-row-smtp-pass").toggleClass("inactive")}),i("#wp-mail-smtp-setting-row-smtp-encryption input").change(function(){var t=i(this),a=i("#wp-mail-smtp-setting-smtp-port");"tls"===t.val()?(a.val("587"),i("#wp-mail-smtp-setting-row-smtp-autotls").addClass("inactive")):("ssl"===t.val()?a.val("465"):a.val("25"),i("#wp-mail-smtp-setting-row-smtp-autotls").removeClass("inactive"))}),i("#wp-mail-smtp-pro-banner-dismiss").on("click",function(){i.ajax({url:ajaxurl,dataType:"json",type:"POST",data:{action:"wp_mail_smtp_ajax",task:"pro_banner_dismiss"}}).always(function(){i("#wp-mail-smtp-pro-banner").fadeOut("fast")})}),i("#wp-mail-smtp-debug .error-log-toggle").on("click",function(t){t.preventDefault(),i("#wp-mail-smtp-debug .error-log-toggle").find(".dashicons").toggleClass("dashicons-arrow-right-alt2 dashicons-arrow-down-alt2"),i("#wp-mail-smtp-debug .error-log").slideToggle(),i("#wp-mail-smtp-debug .error-log-note").toggle()}),i(".js-wp-mail-smtp-provider-remove").on("click",function(){return confirm(window.wp_mail_smtp.text_provider_remove)})});
|
assets/languages/wp-mail-smtp.pot
ADDED
@@ -0,0 +1,1507 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: WP Mail SMTP 1.5.0\n"
|
4 |
+
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wp-mail-smtp\n"
|
5 |
+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
6 |
+
"Language-Team: LANGUAGE <LL@li.org>\n"
|
7 |
+
"MIME-Version: 1.0\n"
|
8 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
9 |
+
"Content-Transfer-Encoding: 8bit\n"
|
10 |
+
"POT-Creation-Date: 2019-07-09T13:56:27+03:00\n"
|
11 |
+
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
12 |
+
"X-Generator: WP-CLI 2.2.0\n"
|
13 |
+
"X-Domain: wp-mail-smtp\n"
|
14 |
+
|
15 |
+
#. Plugin Name of the plugin
|
16 |
+
msgid "WP Mail SMTP Pro"
|
17 |
+
msgstr ""
|
18 |
+
|
19 |
+
#. Plugin URI of the plugin
|
20 |
+
#. Author URI of the plugin
|
21 |
+
msgid "https://wpforms.com/"
|
22 |
+
msgstr ""
|
23 |
+
|
24 |
+
#. Description of the plugin
|
25 |
+
msgid "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."
|
26 |
+
msgstr ""
|
27 |
+
|
28 |
+
#. Author of the plugin
|
29 |
+
msgid "WPForms"
|
30 |
+
msgstr ""
|
31 |
+
|
32 |
+
#. translators: %s - error code, returned by Google API.
|
33 |
+
#: src/Admin/Area.php:112
|
34 |
+
msgid "There was an error while processing the authentication request: %s. Please try again."
|
35 |
+
msgstr ""
|
36 |
+
|
37 |
+
#: src/Admin/Area.php:120
|
38 |
+
msgid "There was an error while processing the authentication request. Please try again."
|
39 |
+
msgstr ""
|
40 |
+
|
41 |
+
#: src/Admin/Area.php:127
|
42 |
+
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."
|
43 |
+
msgstr ""
|
44 |
+
|
45 |
+
#: src/Admin/Area.php:136
|
46 |
+
msgid "You have successfully linked the current site with your Google API project. Now you can start sending emails through Gmail."
|
47 |
+
msgstr ""
|
48 |
+
|
49 |
+
#: src/Admin/Area.php:142
|
50 |
+
msgid "You have successfully linked the current site with your Microsoft API project. Now you can start sending emails through Outlook."
|
51 |
+
msgstr ""
|
52 |
+
|
53 |
+
#. translators: %s - Mailer anchor link.
|
54 |
+
#: src/Admin/Area.php:174
|
55 |
+
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>."
|
56 |
+
msgstr ""
|
57 |
+
|
58 |
+
#: src/Admin/Area.php:197
|
59 |
+
#: src/Admin/Area.php:198
|
60 |
+
#: wp-mail-smtp-0.11.2.php:603
|
61 |
+
msgid "WP Mail SMTP"
|
62 |
+
msgstr ""
|
63 |
+
|
64 |
+
#: src/Admin/Area.php:208
|
65 |
+
#: src/Admin/Area.php:209
|
66 |
+
#: src/Admin/Area.php:722
|
67 |
+
#: wp-mail-smtp-0.11.2.php:709
|
68 |
+
msgid "Settings"
|
69 |
+
msgstr ""
|
70 |
+
|
71 |
+
#: src/Admin/Area.php:216
|
72 |
+
#: src/Admin/Area.php:217
|
73 |
+
#: src/Admin/Area.php:723
|
74 |
+
#: src/Admin/Pages/About.php:615
|
75 |
+
#: src/Admin/Pages/Logs.php:40
|
76 |
+
msgid "Email Log"
|
77 |
+
msgstr ""
|
78 |
+
|
79 |
+
#: src/Admin/Area.php:224
|
80 |
+
#: src/Admin/Area.php:225
|
81 |
+
#: src/Admin/Pages/About.php:105
|
82 |
+
msgid "About Us"
|
83 |
+
msgstr ""
|
84 |
+
|
85 |
+
#: src/Admin/Area.php:266
|
86 |
+
msgid "Are you sure you want to reset the current provider connection? You will need to immediately create a new one to be able to send emails."
|
87 |
+
msgstr ""
|
88 |
+
|
89 |
+
#: src/Admin/Area.php:314
|
90 |
+
#: src/Admin/Area.php:321
|
91 |
+
#: src/Admin/Pages/About.php:307
|
92 |
+
msgid "Activate"
|
93 |
+
msgstr ""
|
94 |
+
|
95 |
+
#: src/Admin/Area.php:315
|
96 |
+
#: src/Admin/Pages/About.php:299
|
97 |
+
msgid "Activated"
|
98 |
+
msgstr ""
|
99 |
+
|
100 |
+
#: src/Admin/Area.php:316
|
101 |
+
#: src/Admin/Pages/About.php:296
|
102 |
+
msgid "Active"
|
103 |
+
msgstr ""
|
104 |
+
|
105 |
+
#: src/Admin/Area.php:317
|
106 |
+
#: src/Admin/Pages/About.php:304
|
107 |
+
msgid "Inactive"
|
108 |
+
msgstr ""
|
109 |
+
|
110 |
+
#: src/Admin/Area.php:318
|
111 |
+
msgid "Processing..."
|
112 |
+
msgstr ""
|
113 |
+
|
114 |
+
#: src/Admin/Area.php:319
|
115 |
+
msgid "Could not install a plugin. Please download from WordPress.org and install manually."
|
116 |
+
msgstr ""
|
117 |
+
|
118 |
+
#: src/Admin/Area.php:320
|
119 |
+
msgid "Install and Activate"
|
120 |
+
msgstr ""
|
121 |
+
|
122 |
+
#. translators: %1$s - WP.org link; %2$s - same WP.org link.
|
123 |
+
#: src/Admin/Area.php:380
|
124 |
+
msgid "Please rate <strong>WP Mail SMTP</strong> <a href=\"%1$s\" target=\"_blank\" rel=\"noopener noreferrer\">★★★★★</a> on <a href=\"%2$s\" target=\"_blank\" rel=\"noopener noreferrer\">WordPress.org</a> to help us spread the word. Thank you from the WP Mail SMTP team!"
|
125 |
+
msgstr ""
|
126 |
+
|
127 |
+
#: src/Admin/Area.php:678
|
128 |
+
msgid "WP Mail SMTP Pro related message was successfully dismissed."
|
129 |
+
msgstr ""
|
130 |
+
|
131 |
+
#: src/Admin/PageAbstract.php:77
|
132 |
+
msgid "Save Settings"
|
133 |
+
msgstr ""
|
134 |
+
|
135 |
+
#. translators: %s - plugin current license type.
|
136 |
+
#: src/Admin/Pages/About.php:98
|
137 |
+
#: src/Admin/Pages/About.php:514
|
138 |
+
msgid "%s vs Pro"
|
139 |
+
msgstr ""
|
140 |
+
|
141 |
+
#: src/Admin/Pages/About.php:170
|
142 |
+
msgid "Hello and welcome to WP Mail SMTP, the easiest and most popular WordPress SMTP plugin. We build software that helps your site reliably deliver emails every time."
|
143 |
+
msgstr ""
|
144 |
+
|
145 |
+
#: src/Admin/Pages/About.php:174
|
146 |
+
msgid "Email deliverability has been a well-documented problem for all WordPress websites. However as WPForms grew, we became more aware of this painful issue that affects our users and the larger WordPress community. So we decided to solve this problem and make a solution that's beginner friendly."
|
147 |
+
msgstr ""
|
148 |
+
|
149 |
+
#: src/Admin/Pages/About.php:177
|
150 |
+
msgid "Our goal is to make reliable email deliverability easy for WordPress."
|
151 |
+
msgstr ""
|
152 |
+
|
153 |
+
#. translators: %1$s - WPBeginner URL, %2$s - OptinMonster URL, %3$s - MonsterInsights URL.
|
154 |
+
#: src/Admin/Pages/About.php:184
|
155 |
+
msgid "WP Mail SMTP is brought to you by the same team that's behind the most user friendly WordPress forms, <a href=\"%1$s\" target=\"_blank\" rel=\"noopener noreferrer\">WPForms</a>, the largest WordPress resource site, <a href=\"%1$s\" target=\"_blank\" rel=\"noopener noreferrer\">WPBeginner</a>, the most popular lead-generation software, <a href=\"%2$s\" target=\"_blank\" rel=\"noopener noreferrer\">OptinMonster</a>, and the best WordPress analytics plugin, <a href=\"%3$s\" target=\"_blank\" rel=\"noopener noreferrer\">MonsterInsights</a>."
|
156 |
+
msgstr ""
|
157 |
+
|
158 |
+
#: src/Admin/Pages/About.php:201
|
159 |
+
msgid "Yup, we know a thing or two about building awesome products that customers love."
|
160 |
+
msgstr ""
|
161 |
+
|
162 |
+
#: src/Admin/Pages/About.php:207
|
163 |
+
msgid "The WPForms Team photo"
|
164 |
+
msgstr ""
|
165 |
+
|
166 |
+
#: src/Admin/Pages/About.php:209
|
167 |
+
msgid "The WPForms Team"
|
168 |
+
msgstr ""
|
169 |
+
|
170 |
+
#. translators: %s - status HTML text.
|
171 |
+
#: src/Admin/Pages/About.php:249
|
172 |
+
msgid "Status: %s"
|
173 |
+
msgstr ""
|
174 |
+
|
175 |
+
#: src/Admin/Pages/About.php:315
|
176 |
+
msgid "Not Installed"
|
177 |
+
msgstr ""
|
178 |
+
|
179 |
+
#: src/Admin/Pages/About.php:318
|
180 |
+
msgid "Install Plugin"
|
181 |
+
msgstr ""
|
182 |
+
|
183 |
+
#: src/Admin/Pages/About.php:339
|
184 |
+
msgid "MonsterInsights"
|
185 |
+
msgstr ""
|
186 |
+
|
187 |
+
#: src/Admin/Pages/About.php:340
|
188 |
+
#: src/Admin/Pages/About.php:346
|
189 |
+
msgid "MonsterInsights makes it “effortless” to properly connect your WordPress site with Google Analytics, so you can start making data-driven decisions to grow your business."
|
190 |
+
msgstr ""
|
191 |
+
|
192 |
+
#: src/Admin/Pages/About.php:345
|
193 |
+
msgid "MonsterInsights Pro"
|
194 |
+
msgstr ""
|
195 |
+
|
196 |
+
#: src/Admin/Pages/About.php:353
|
197 |
+
msgid "OptinMonster"
|
198 |
+
msgstr ""
|
199 |
+
|
200 |
+
#: src/Admin/Pages/About.php:354
|
201 |
+
msgid "Our high-converting optin forms like Exit-Intent® popups, Fullscreen Welcome Mats, and Scroll boxes help you dramatically boost conversions and get more email subscribers."
|
202 |
+
msgstr ""
|
203 |
+
|
204 |
+
#: src/Admin/Pages/About.php:360
|
205 |
+
msgid "Contact Forms by WPForms"
|
206 |
+
msgstr ""
|
207 |
+
|
208 |
+
#: src/Admin/Pages/About.php:361
|
209 |
+
#: src/Admin/Pages/About.php:367
|
210 |
+
msgid "The best WordPress contact form plugin. Drag & Drop online form builder that helps you create beautiful contact forms with just a few clicks."
|
211 |
+
msgstr ""
|
212 |
+
|
213 |
+
#: src/Admin/Pages/About.php:366
|
214 |
+
msgid "WPForms Pro"
|
215 |
+
msgstr ""
|
216 |
+
|
217 |
+
#: src/Admin/Pages/About.php:386
|
218 |
+
msgid "Could not activate the plugin. Please activate it from the Plugins page."
|
219 |
+
msgstr ""
|
220 |
+
|
221 |
+
#: src/Admin/Pages/About.php:398
|
222 |
+
msgid "Plugin activated."
|
223 |
+
msgstr ""
|
224 |
+
|
225 |
+
#: src/Admin/Pages/About.php:415
|
226 |
+
msgid "Could not install the plugin."
|
227 |
+
msgstr ""
|
228 |
+
|
229 |
+
#: src/Admin/Pages/About.php:479
|
230 |
+
msgid "Plugin installed & activated."
|
231 |
+
msgstr ""
|
232 |
+
|
233 |
+
#: src/Admin/Pages/About.php:487
|
234 |
+
msgid "Plugin installed."
|
235 |
+
msgstr ""
|
236 |
+
|
237 |
+
#: src/Admin/Pages/About.php:522
|
238 |
+
msgid "Get the most out of WP Mail SMTP by upgrading to Pro and unlocking all of the powerful features."
|
239 |
+
msgstr ""
|
240 |
+
|
241 |
+
#: src/Admin/Pages/About.php:531
|
242 |
+
msgid "Feature"
|
243 |
+
msgstr ""
|
244 |
+
|
245 |
+
#: src/Admin/Pages/About.php:541
|
246 |
+
msgid "Pro"
|
247 |
+
msgstr ""
|
248 |
+
|
249 |
+
#: src/Admin/Pages/About.php:582
|
250 |
+
msgid "Get WP Mail SMTP Pro Today and Unlock all of these Powerful Features"
|
251 |
+
msgstr ""
|
252 |
+
|
253 |
+
#: src/Admin/Pages/About.php:589
|
254 |
+
msgid "Bonus: WP Mail SMTP Lite users get <span class=\"price-off\">20% off regular price</span>, automatically applied at checkout."
|
255 |
+
msgstr ""
|
256 |
+
|
257 |
+
#: src/Admin/Pages/About.php:616
|
258 |
+
msgid "Email Controls"
|
259 |
+
msgstr ""
|
260 |
+
|
261 |
+
#: src/Admin/Pages/About.php:617
|
262 |
+
msgid "Additional Mailers"
|
263 |
+
msgstr ""
|
264 |
+
|
265 |
+
#: src/Admin/Pages/About.php:618
|
266 |
+
msgid "Customer Support"
|
267 |
+
msgstr ""
|
268 |
+
|
269 |
+
#: src/Admin/Pages/About.php:639
|
270 |
+
msgid "Emails are not logged"
|
271 |
+
msgstr ""
|
272 |
+
|
273 |
+
#: src/Admin/Pages/About.php:645
|
274 |
+
msgid "Complete Email Log management inside WordPress"
|
275 |
+
msgstr ""
|
276 |
+
|
277 |
+
#: src/Admin/Pages/About.php:653
|
278 |
+
msgid "No controls over whether default WordPress emails are sent"
|
279 |
+
msgstr ""
|
280 |
+
|
281 |
+
#: src/Admin/Pages/About.php:659
|
282 |
+
msgid "Complete Email Controls management for most default WordPress emails"
|
283 |
+
msgstr ""
|
284 |
+
|
285 |
+
#: src/Admin/Pages/About.php:667
|
286 |
+
msgid "Only default list of mailers"
|
287 |
+
msgstr ""
|
288 |
+
|
289 |
+
#: src/Admin/Pages/About.php:673
|
290 |
+
msgid "Additional mailers: Microsoft Outlook (with Office365 support) and Amazon SES"
|
291 |
+
msgstr ""
|
292 |
+
|
293 |
+
#: src/Admin/Pages/About.php:681
|
294 |
+
msgid "Limited Support"
|
295 |
+
msgstr ""
|
296 |
+
|
297 |
+
#: src/Admin/Pages/About.php:687
|
298 |
+
msgid "Priority Support"
|
299 |
+
msgstr ""
|
300 |
+
|
301 |
+
#: src/Admin/Pages/Logs.php:71
|
302 |
+
msgid "View and Manage All Sent Emails inside WordPress"
|
303 |
+
msgstr ""
|
304 |
+
|
305 |
+
#: src/Admin/Pages/Logs.php:75
|
306 |
+
msgid "Sent emails are not stored in WP Mail SMTP Lite."
|
307 |
+
msgstr ""
|
308 |
+
|
309 |
+
#: src/Admin/Pages/Logs.php:76
|
310 |
+
msgid "Once you upgrade to WP Mail SMTP Pro, all future sent emails will be stored in your WordPress database and displayed on this Logs screen."
|
311 |
+
msgstr ""
|
312 |
+
|
313 |
+
#: src/Admin/Pages/Logs.php:81
|
314 |
+
msgid "View Sent Emails in Dashboard"
|
315 |
+
msgstr ""
|
316 |
+
|
317 |
+
#: src/Admin/Pages/Logs.php:82
|
318 |
+
msgid "View Emails Sent Status"
|
319 |
+
msgstr ""
|
320 |
+
|
321 |
+
#: src/Admin/Pages/Logs.php:85
|
322 |
+
msgid "Filter All Emails"
|
323 |
+
msgstr ""
|
324 |
+
|
325 |
+
#: src/Admin/Pages/Logs.php:86
|
326 |
+
msgid "Search for Specific Emails"
|
327 |
+
msgstr ""
|
328 |
+
|
329 |
+
#: src/Admin/Pages/Logs.php:94
|
330 |
+
msgid "Upgrade to WP Mail SMTP Pro Now"
|
331 |
+
msgstr ""
|
332 |
+
|
333 |
+
#: src/Admin/Pages/Logs.php:98
|
334 |
+
msgid "and start logging all emails!"
|
335 |
+
msgstr ""
|
336 |
+
|
337 |
+
#: src/Admin/Pages/Misc.php:24
|
338 |
+
msgid "Misc"
|
339 |
+
msgstr ""
|
340 |
+
|
341 |
+
#: src/Admin/Pages/Misc.php:48
|
342 |
+
#: src/Admin/Pages/Settings.php:36
|
343 |
+
msgid "General"
|
344 |
+
msgstr ""
|
345 |
+
|
346 |
+
#: src/Admin/Pages/Misc.php:56
|
347 |
+
msgid "Do Not Send"
|
348 |
+
msgstr ""
|
349 |
+
|
350 |
+
#: src/Admin/Pages/Misc.php:65
|
351 |
+
msgid "Check this if you would like to stop sending all emails."
|
352 |
+
msgstr ""
|
353 |
+
|
354 |
+
#: src/Admin/Pages/Misc.php:71
|
355 |
+
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."
|
356 |
+
msgstr ""
|
357 |
+
|
358 |
+
#: src/Admin/Pages/Misc.php:79
|
359 |
+
msgid "You will need to consult with their documentation to switch them to use default WordPress email delivery."
|
360 |
+
msgstr ""
|
361 |
+
|
362 |
+
#: src/Admin/Pages/Misc.php:81
|
363 |
+
msgid "Test emails are allowed to be sent, regardless of this option."
|
364 |
+
msgstr ""
|
365 |
+
|
366 |
+
#: src/Admin/Pages/Misc.php:90
|
367 |
+
#: wp-mail-smtp-0.11.2.php:346
|
368 |
+
#: wp-mail-smtp-0.11.2.php:351
|
369 |
+
msgid "Hide Announcements"
|
370 |
+
msgstr ""
|
371 |
+
|
372 |
+
#: src/Admin/Pages/Misc.php:99
|
373 |
+
#: wp-mail-smtp-0.11.2.php:356
|
374 |
+
msgid "Check this if you would like to hide plugin announcements and update details."
|
375 |
+
msgstr ""
|
376 |
+
|
377 |
+
#: src/Admin/Pages/Misc.php:108
|
378 |
+
msgid "Uninstall WP Mail SMTP"
|
379 |
+
msgstr ""
|
380 |
+
|
381 |
+
#: src/Admin/Pages/Misc.php:116
|
382 |
+
msgid "Check this if you would like to remove ALL WP Mail SMTP data upon plugin deletion. All settings will be unrecoverable."
|
383 |
+
msgstr ""
|
384 |
+
|
385 |
+
#: src/Admin/Pages/Misc.php:151
|
386 |
+
#: src/Admin/Pages/Settings.php:502
|
387 |
+
msgid "Settings were successfully saved."
|
388 |
+
msgstr ""
|
389 |
+
|
390 |
+
#: src/Admin/Pages/Settings.php:64
|
391 |
+
msgid "License"
|
392 |
+
msgstr ""
|
393 |
+
|
394 |
+
#: src/Admin/Pages/Settings.php:67
|
395 |
+
msgid "Your license key provides access to updates and support."
|
396 |
+
msgstr ""
|
397 |
+
|
398 |
+
#: src/Admin/Pages/Settings.php:75
|
399 |
+
msgid "License Key"
|
400 |
+
msgstr ""
|
401 |
+
|
402 |
+
#: src/Admin/Pages/Settings.php:85
|
403 |
+
msgid "Mail"
|
404 |
+
msgstr ""
|
405 |
+
|
406 |
+
#: src/Admin/Pages/Settings.php:92
|
407 |
+
#: wp-mail-smtp-0.11.2.php:247
|
408 |
+
msgid "From Email"
|
409 |
+
msgstr ""
|
410 |
+
|
411 |
+
#: src/Admin/Pages/Settings.php:103
|
412 |
+
msgid "The email address which emails are sent from."
|
413 |
+
msgstr ""
|
414 |
+
|
415 |
+
#: src/Admin/Pages/Settings.php:104
|
416 |
+
msgid "If you using an email provider (Gmail, Yahoo, Outlook.com, etc) this should be your email address for that account."
|
417 |
+
msgstr ""
|
418 |
+
|
419 |
+
#: src/Admin/Pages/Settings.php:107
|
420 |
+
msgid "Please note that other plugins can change this, to prevent this use the setting below."
|
421 |
+
msgstr ""
|
422 |
+
|
423 |
+
#: src/Admin/Pages/Settings.php:119
|
424 |
+
msgid "Force From Email"
|
425 |
+
msgstr ""
|
426 |
+
|
427 |
+
#: src/Admin/Pages/Settings.php:124
|
428 |
+
msgid "Current provider will automatically force From Email to be the email address that you use to set up the connection below."
|
429 |
+
msgstr ""
|
430 |
+
|
431 |
+
#: src/Admin/Pages/Settings.php:128
|
432 |
+
msgid "If checked, the From Email setting above will be used for all emails, ignoring values set by other plugins."
|
433 |
+
msgstr ""
|
434 |
+
|
435 |
+
#: src/Admin/Pages/Settings.php:138
|
436 |
+
#: wp-mail-smtp-0.11.2.php:266
|
437 |
+
msgid "From Name"
|
438 |
+
msgstr ""
|
439 |
+
|
440 |
+
#: src/Admin/Pages/Settings.php:149
|
441 |
+
msgid "The name which emails are sent from."
|
442 |
+
msgstr ""
|
443 |
+
|
444 |
+
#: src/Admin/Pages/Settings.php:161
|
445 |
+
msgid "Force From Name"
|
446 |
+
msgstr ""
|
447 |
+
|
448 |
+
#: src/Admin/Pages/Settings.php:166
|
449 |
+
msgid "Current provider doesn't support setting and forcing From Name. Emails will be sent on behalf of the account name used to setup the connection below."
|
450 |
+
msgstr ""
|
451 |
+
|
452 |
+
#: src/Admin/Pages/Settings.php:170
|
453 |
+
msgid "If checked, the From Name setting above will be used for all emails, ignoring values set by other plugins."
|
454 |
+
msgstr ""
|
455 |
+
|
456 |
+
#: src/Admin/Pages/Settings.php:179
|
457 |
+
#: wp-mail-smtp-0.11.2.php:322
|
458 |
+
#: wp-mail-smtp-0.11.2.php:327
|
459 |
+
msgid "Return Path"
|
460 |
+
msgstr ""
|
461 |
+
|
462 |
+
#: src/Admin/Pages/Settings.php:188
|
463 |
+
#: wp-mail-smtp-0.11.2.php:332
|
464 |
+
msgid "Set the return-path to match the From Email"
|
465 |
+
msgstr ""
|
466 |
+
|
467 |
+
#: src/Admin/Pages/Settings.php:192
|
468 |
+
#: wp-mail-smtp-0.11.2.php:336
|
469 |
+
msgid "Return Path indicates where non-delivery receipts - or bounce messages - are to be sent."
|
470 |
+
msgstr ""
|
471 |
+
|
472 |
+
#: src/Admin/Pages/Settings.php:193
|
473 |
+
msgid "If unchecked, bounce messages may be lost. Some providers may ignore this option."
|
474 |
+
msgstr ""
|
475 |
+
|
476 |
+
#: src/Admin/Pages/Settings.php:201
|
477 |
+
#: wp-mail-smtp-0.11.2.php:281
|
478 |
+
#: wp-mail-smtp-0.11.2.php:286
|
479 |
+
msgid "Mailer"
|
480 |
+
msgstr ""
|
481 |
+
|
482 |
+
#: src/Admin/Pages/Settings.php:276
|
483 |
+
msgid "You're using WP Mail SMTP Lite - no license needed. Enjoy!"
|
484 |
+
msgstr ""
|
485 |
+
|
486 |
+
#. translators: %s - WPMailSMTP.com upgrade URL.
|
487 |
+
#: src/Admin/Pages/Settings.php:282
|
488 |
+
msgid "To unlock more features consider <strong><a href=\"%s\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"wp-mail-smtp-upgrade-modal\">upgrading to PRO</a></strong>."
|
489 |
+
msgstr ""
|
490 |
+
|
491 |
+
#: src/Admin/Pages/Settings.php:301
|
492 |
+
msgid "As a valued WP Mail SMTP Lite user you receive <strong>20% off</strong>, automatically applied at checkout!"
|
493 |
+
msgstr ""
|
494 |
+
|
495 |
+
#: src/Admin/Pages/Settings.php:362
|
496 |
+
msgid "Get WP Mail SMTP Pro and Unlock all the Powerful Features"
|
497 |
+
msgstr ""
|
498 |
+
|
499 |
+
#: src/Admin/Pages/Settings.php:366
|
500 |
+
msgid "Thanks for being a loyal WP Mail SMTP user. Upgrade to WP Mail SMTP Pro to unlock more awesome features and experience why WP Mail SMTP is the most popular SMTP plugin."
|
501 |
+
msgstr ""
|
502 |
+
|
503 |
+
#: src/Admin/Pages/Settings.php:370
|
504 |
+
msgid "We know that you will truly love WP Mail SMTP. It's used by over 1,000,000 websites."
|
505 |
+
msgstr ""
|
506 |
+
|
507 |
+
#: src/Admin/Pages/Settings.php:373
|
508 |
+
msgid "Pro Features:"
|
509 |
+
msgstr ""
|
510 |
+
|
511 |
+
#: src/Admin/Pages/Settings.php:377
|
512 |
+
msgid "Manage Notifications - control which emails your site sends"
|
513 |
+
msgstr ""
|
514 |
+
|
515 |
+
#: src/Admin/Pages/Settings.php:378
|
516 |
+
msgid "Email Logging - keep track of every email sent from your site"
|
517 |
+
msgstr ""
|
518 |
+
|
519 |
+
#: src/Admin/Pages/Settings.php:379
|
520 |
+
msgid "Office 365 - send emails using your Office 365 account"
|
521 |
+
msgstr ""
|
522 |
+
|
523 |
+
#: src/Admin/Pages/Settings.php:380
|
524 |
+
msgid "Amazon SES - harness the power of AWS"
|
525 |
+
msgstr ""
|
526 |
+
|
527 |
+
#: src/Admin/Pages/Settings.php:381
|
528 |
+
msgid "Outlook.com - send emails using your Outlook.com account"
|
529 |
+
msgstr ""
|
530 |
+
|
531 |
+
#: src/Admin/Pages/Settings.php:382
|
532 |
+
msgid "Access to our world class support team"
|
533 |
+
msgstr ""
|
534 |
+
|
535 |
+
#: src/Admin/Pages/Settings.php:385
|
536 |
+
msgid "White Glove Setup - sit back and relax while we handle everything for you"
|
537 |
+
msgstr ""
|
538 |
+
|
539 |
+
#: src/Admin/Pages/Settings.php:386
|
540 |
+
msgid "Install WP Mail SMTP Pro plugin"
|
541 |
+
msgstr ""
|
542 |
+
|
543 |
+
#: src/Admin/Pages/Settings.php:387
|
544 |
+
msgid "Set up domain name verification (DNS)"
|
545 |
+
msgstr ""
|
546 |
+
|
547 |
+
#: src/Admin/Pages/Settings.php:388
|
548 |
+
msgid "Configure Mailgun service"
|
549 |
+
msgstr ""
|
550 |
+
|
551 |
+
#: src/Admin/Pages/Settings.php:389
|
552 |
+
msgid "Set up WP Mail SMTP Pro plugin"
|
553 |
+
msgstr ""
|
554 |
+
|
555 |
+
#: src/Admin/Pages/Settings.php:390
|
556 |
+
msgid "Test and verify email delivery"
|
557 |
+
msgstr ""
|
558 |
+
|
559 |
+
#. translators: %s - WPMailSMTP.com URL.
|
560 |
+
#: src/Admin/Pages/Settings.php:398
|
561 |
+
msgid "<a href=\"%s\" target=\"_blank\" rel=\"noopener noreferrer\">Get WP Mail SMTP Pro Today and Unlock all the Powerful Features »</a>"
|
562 |
+
msgstr ""
|
563 |
+
|
564 |
+
#: src/Admin/Pages/Settings.php:416
|
565 |
+
msgid "<strong>Bonus:</strong> WP Mail SMTP users get <span class=\"price-off\">20% off regular price</span>, automatically applied at checkout."
|
566 |
+
msgstr ""
|
567 |
+
|
568 |
+
#: src/Admin/Pages/Test.php:37
|
569 |
+
msgid "Email Test"
|
570 |
+
msgstr ""
|
571 |
+
|
572 |
+
#: src/Admin/Pages/Test.php:59
|
573 |
+
#: wp-mail-smtp-0.11.2.php:549
|
574 |
+
msgid "Send a Test Email"
|
575 |
+
msgstr ""
|
576 |
+
|
577 |
+
#: src/Admin/Pages/Test.php:66
|
578 |
+
msgid "Send To"
|
579 |
+
msgstr ""
|
580 |
+
|
581 |
+
#: src/Admin/Pages/Test.php:72
|
582 |
+
msgid "Enter email address where test email will be sent."
|
583 |
+
msgstr ""
|
584 |
+
|
585 |
+
#: src/Admin/Pages/Test.php:80
|
586 |
+
msgid "HTML"
|
587 |
+
msgstr ""
|
588 |
+
|
589 |
+
#: src/Admin/Pages/Test.php:86
|
590 |
+
#: src/Providers/OptionsAbstract.php:204
|
591 |
+
#: src/Providers/OptionsAbstract.php:226
|
592 |
+
msgid "On"
|
593 |
+
msgstr ""
|
594 |
+
|
595 |
+
#: src/Admin/Pages/Test.php:87
|
596 |
+
#: src/Providers/OptionsAbstract.php:205
|
597 |
+
#: src/Providers/OptionsAbstract.php:227
|
598 |
+
msgid "Off"
|
599 |
+
msgstr ""
|
600 |
+
|
601 |
+
#: src/Admin/Pages/Test.php:90
|
602 |
+
msgid "Send this email in HTML or in plain text format."
|
603 |
+
msgstr ""
|
604 |
+
|
605 |
+
#: src/Admin/Pages/Test.php:105
|
606 |
+
msgid "You cannot send an email. Mailer is not properly configured. Please check your settings."
|
607 |
+
msgstr ""
|
608 |
+
|
609 |
+
#: src/Admin/Pages/Test.php:109
|
610 |
+
msgid "Send Email"
|
611 |
+
msgstr ""
|
612 |
+
|
613 |
+
#: src/Admin/Pages/Test.php:137
|
614 |
+
msgid "Test failed. Please use a valid email address and try to resend the test email."
|
615 |
+
msgstr ""
|
616 |
+
|
617 |
+
#. translators: %s - email address a test email will be sent to.
|
618 |
+
#: src/Admin/Pages/Test.php:149
|
619 |
+
#: src/Admin/Pages/Test.php:155
|
620 |
+
msgid "Test email to %s"
|
621 |
+
msgstr ""
|
622 |
+
|
623 |
+
#: src/Admin/Pages/Test.php:181
|
624 |
+
msgid "Test plain text email was sent successfully!"
|
625 |
+
msgstr ""
|
626 |
+
|
627 |
+
#. translators: %s - "HTML" in bold.
|
628 |
+
#: src/Admin/Pages/Test.php:185
|
629 |
+
msgid "Test %s email was sent successfully! Please check your inbox to make sure it is delivered."
|
630 |
+
msgstr ""
|
631 |
+
|
632 |
+
#: src/Admin/Pages/Test.php:513
|
633 |
+
msgid "SSL certificate issue."
|
634 |
+
msgstr ""
|
635 |
+
|
636 |
+
#: src/Admin/Pages/Test.php:514
|
637 |
+
msgid "This means your web server cannot reliably make secure connections (make requests to HTTPS sites)."
|
638 |
+
msgstr ""
|
639 |
+
|
640 |
+
#: src/Admin/Pages/Test.php:515
|
641 |
+
#: src/Admin/Pages/Test.php:566
|
642 |
+
msgid "Typically this error is returned when web server is not configured properly."
|
643 |
+
msgstr ""
|
644 |
+
|
645 |
+
#: src/Admin/Pages/Test.php:518
|
646 |
+
msgid "Contact your web hosting provider and inform them your site has an issue with SSL certificates."
|
647 |
+
msgstr ""
|
648 |
+
|
649 |
+
#: src/Admin/Pages/Test.php:519
|
650 |
+
#: src/Admin/Pages/Test.php:570
|
651 |
+
msgid "The exact error you can provide them is in the Error log, available at the bottom of this page."
|
652 |
+
msgstr ""
|
653 |
+
|
654 |
+
#: src/Admin/Pages/Test.php:520
|
655 |
+
#: src/Admin/Pages/Test.php:571
|
656 |
+
msgid "Ask them to resolve the issue then try again."
|
657 |
+
msgstr ""
|
658 |
+
|
659 |
+
#: src/Admin/Pages/Test.php:531
|
660 |
+
msgid "Could not connect to host."
|
661 |
+
msgstr ""
|
662 |
+
|
663 |
+
#. translators: %s - SMTP host address.
|
664 |
+
#: src/Admin/Pages/Test.php:535
|
665 |
+
#: src/Admin/Pages/Test.php:562
|
666 |
+
#: src/Admin/Pages/Test.php:635
|
667 |
+
msgid "This means your web server was unable to connect to %s."
|
668 |
+
msgstr ""
|
669 |
+
|
670 |
+
#: src/Admin/Pages/Test.php:538
|
671 |
+
#: src/Admin/Pages/Test.php:565
|
672 |
+
#: src/Admin/Pages/Test.php:638
|
673 |
+
msgid "This means your web server was unable to connect to the host server."
|
674 |
+
msgstr ""
|
675 |
+
|
676 |
+
#: src/Admin/Pages/Test.php:539
|
677 |
+
msgid "Typically this error is returned your web server is blocking the connections or the SMTP host denying the request."
|
678 |
+
msgstr ""
|
679 |
+
|
680 |
+
#. translators: %s - SMTP host address.
|
681 |
+
#: src/Admin/Pages/Test.php:544
|
682 |
+
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."
|
683 |
+
msgstr ""
|
684 |
+
|
685 |
+
#: src/Admin/Pages/Test.php:547
|
686 |
+
msgid "If using \"Other SMTP\" Mailer, triple check your SMTP settings including host address, email, and password."
|
687 |
+
msgstr ""
|
688 |
+
|
689 |
+
#: src/Admin/Pages/Test.php:548
|
690 |
+
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)."
|
691 |
+
msgstr ""
|
692 |
+
|
693 |
+
#: src/Admin/Pages/Test.php:558
|
694 |
+
msgid "Could not connect to your host."
|
695 |
+
msgstr ""
|
696 |
+
|
697 |
+
#: src/Admin/Pages/Test.php:569
|
698 |
+
msgid "Contact your web hosting provider and inform them you are having issues making outbound connections."
|
699 |
+
msgstr ""
|
700 |
+
|
701 |
+
#: src/Admin/Pages/Test.php:581
|
702 |
+
msgid "Could not authenticate your SMTP account."
|
703 |
+
msgstr ""
|
704 |
+
|
705 |
+
#: src/Admin/Pages/Test.php:582
|
706 |
+
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."
|
707 |
+
msgstr ""
|
708 |
+
|
709 |
+
#: src/Admin/Pages/Test.php:583
|
710 |
+
msgid "Typically this error is returned when the email or password is not correct or is not what the SMTP host is expecting."
|
711 |
+
msgstr ""
|
712 |
+
|
713 |
+
#: src/Admin/Pages/Test.php:586
|
714 |
+
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."
|
715 |
+
msgstr ""
|
716 |
+
|
717 |
+
#: src/Admin/Pages/Test.php:587
|
718 |
+
#: src/Admin/Pages/Test.php:664
|
719 |
+
msgid "Contact your SMTP host to confirm you are using the correct username and password."
|
720 |
+
msgstr ""
|
721 |
+
|
722 |
+
#: src/Admin/Pages/Test.php:588
|
723 |
+
#: src/Admin/Pages/Test.php:665
|
724 |
+
msgid "Verify with your SMTP host that your account has permissions to send emails using outside connections."
|
725 |
+
msgstr ""
|
726 |
+
|
727 |
+
#: src/Admin/Pages/Test.php:598
|
728 |
+
msgid "Error due to unsolicited and/or bulk e-mail."
|
729 |
+
msgstr ""
|
730 |
+
|
731 |
+
#: src/Admin/Pages/Test.php:599
|
732 |
+
msgid "This means the connection to your SMTP host was made successfully, but the host rejected the email."
|
733 |
+
msgstr ""
|
734 |
+
|
735 |
+
#: src/Admin/Pages/Test.php:600
|
736 |
+
msgid "Typically this error is returned when your are sending too many e-mails or e-mails that have been identified as spam."
|
737 |
+
msgstr ""
|
738 |
+
|
739 |
+
#: src/Admin/Pages/Test.php:603
|
740 |
+
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."
|
741 |
+
msgstr ""
|
742 |
+
|
743 |
+
#: src/Admin/Pages/Test.php:604
|
744 |
+
msgid "Contact your SMTP host to ask about sending/rate limits."
|
745 |
+
msgstr ""
|
746 |
+
|
747 |
+
#: src/Admin/Pages/Test.php:605
|
748 |
+
msgid "Verify with them your SMTP account is in good standing and your account has not been flagged."
|
749 |
+
msgstr ""
|
750 |
+
|
751 |
+
#: src/Admin/Pages/Test.php:615
|
752 |
+
msgid "Unauthenticated senders are not allowed."
|
753 |
+
msgstr ""
|
754 |
+
|
755 |
+
#: src/Admin/Pages/Test.php:616
|
756 |
+
msgid "This means the connection to your SMTP host was made successfully, but you should enable Authentication and provide correct Username and Password."
|
757 |
+
msgstr ""
|
758 |
+
|
759 |
+
#: src/Admin/Pages/Test.php:619
|
760 |
+
msgid "Go to WP Mail SMTP plugin Settings page."
|
761 |
+
msgstr ""
|
762 |
+
|
763 |
+
#: src/Admin/Pages/Test.php:620
|
764 |
+
msgid "Enable Authentication"
|
765 |
+
msgstr ""
|
766 |
+
|
767 |
+
#: src/Admin/Pages/Test.php:621
|
768 |
+
msgid "Enter correct SMTP Username (usually this is an email address) and Password in the appropriate fields."
|
769 |
+
msgstr ""
|
770 |
+
|
771 |
+
#: src/Admin/Pages/Test.php:631
|
772 |
+
msgid "Could not connect to the SMTP host."
|
773 |
+
msgstr ""
|
774 |
+
|
775 |
+
#: src/Admin/Pages/Test.php:639
|
776 |
+
#: src/Admin/Pages/Test.php:975
|
777 |
+
msgid "Typically this error is returned for one of the following reasons:"
|
778 |
+
msgstr ""
|
779 |
+
|
780 |
+
#: src/Admin/Pages/Test.php:640
|
781 |
+
msgid "SMTP settings are incorrect (wrong port, security setting, incorrect host)."
|
782 |
+
msgstr ""
|
783 |
+
|
784 |
+
#: src/Admin/Pages/Test.php:641
|
785 |
+
#: src/Admin/Pages/Test.php:977
|
786 |
+
msgid "Your web server is blocking the connection."
|
787 |
+
msgstr ""
|
788 |
+
|
789 |
+
#: src/Admin/Pages/Test.php:642
|
790 |
+
msgid "Your SMTP host is rejecting the connection."
|
791 |
+
msgstr ""
|
792 |
+
|
793 |
+
#: src/Admin/Pages/Test.php:645
|
794 |
+
msgid "Triple check your SMTP settings including host address, email, and password, port, and security."
|
795 |
+
msgstr ""
|
796 |
+
|
797 |
+
#. translators: %1$s - SMTP host address, %2$s - SMTP port, %3$s - SMTP encryption.
|
798 |
+
#: src/Admin/Pages/Test.php:649
|
799 |
+
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>"
|
800 |
+
msgstr ""
|
801 |
+
|
802 |
+
#: src/Admin/Pages/Test.php:662
|
803 |
+
msgid "no"
|
804 |
+
msgstr ""
|
805 |
+
|
806 |
+
#: src/Admin/Pages/Test.php:675
|
807 |
+
#: src/Admin/Pages/Test.php:690
|
808 |
+
#: src/Admin/Pages/Test.php:706
|
809 |
+
msgid "Mailgun failed."
|
810 |
+
msgstr ""
|
811 |
+
|
812 |
+
#: src/Admin/Pages/Test.php:676
|
813 |
+
msgid "It seems that you forgot to activate your Mailgun account."
|
814 |
+
msgstr ""
|
815 |
+
|
816 |
+
#: src/Admin/Pages/Test.php:679
|
817 |
+
msgid "Check your inbox you used to create a Mailgun account. Click the activation link in an email from Mailgun."
|
818 |
+
msgstr ""
|
819 |
+
|
820 |
+
#: src/Admin/Pages/Test.php:680
|
821 |
+
msgid "If you do not see activation email, go to your Mailgun control panel and resend the activation email."
|
822 |
+
msgstr ""
|
823 |
+
|
824 |
+
#: src/Admin/Pages/Test.php:691
|
825 |
+
msgid "Typically this error is because there is an issue with your Mailgun settings, in many cases the API key."
|
826 |
+
msgstr ""
|
827 |
+
|
828 |
+
#: src/Admin/Pages/Test.php:694
|
829 |
+
msgid "Verify your API key is correct."
|
830 |
+
msgstr ""
|
831 |
+
|
832 |
+
#: src/Admin/Pages/Test.php:695
|
833 |
+
msgid "Go to your Mailgun account and view your API key."
|
834 |
+
msgstr ""
|
835 |
+
|
836 |
+
#: src/Admin/Pages/Test.php:696
|
837 |
+
msgid "Note that the API key includes the \"key\" prefix, so make sure that it is in the WP Mail SMTP Mailgun API setting."
|
838 |
+
msgstr ""
|
839 |
+
|
840 |
+
#: src/Admin/Pages/Test.php:707
|
841 |
+
msgid "Your Mailgun account does not have access to send emails."
|
842 |
+
msgstr ""
|
843 |
+
|
844 |
+
#: src/Admin/Pages/Test.php:708
|
845 |
+
msgid "Typically this error is because you have not set up and/or complete domain name verification for your Mailgun account."
|
846 |
+
msgstr ""
|
847 |
+
|
848 |
+
#. translators: %s - Mailgun documentation URL.
|
849 |
+
#: src/Admin/Pages/Test.php:714
|
850 |
+
msgid "Go to our how-to guide for setting up <a href=\"%s\" target=\"_blank\" rel=\"noopener noreferrer\">Mailgun with WP Mail SMTP</a>."
|
851 |
+
msgstr ""
|
852 |
+
|
853 |
+
#: src/Admin/Pages/Test.php:725
|
854 |
+
msgid "Complete the steps in section \"2. Verify Your Domain\"."
|
855 |
+
msgstr ""
|
856 |
+
|
857 |
+
#: src/Admin/Pages/Test.php:735
|
858 |
+
#: src/Admin/Pages/Test.php:786
|
859 |
+
#: src/Admin/Pages/Test.php:807
|
860 |
+
#: src/Admin/Pages/Test.php:834
|
861 |
+
#: src/Admin/Pages/Test.php:850
|
862 |
+
#: src/Admin/Pages/Test.php:905
|
863 |
+
#: src/Admin/Pages/Test.php:932
|
864 |
+
msgid "Google API Error."
|
865 |
+
msgstr ""
|
866 |
+
|
867 |
+
#: src/Admin/Pages/Test.php:736
|
868 |
+
msgid "You have not properly configured Gmail mailer."
|
869 |
+
msgstr ""
|
870 |
+
|
871 |
+
#: src/Admin/Pages/Test.php:737
|
872 |
+
msgid "Make sure that you have clicked the \"Allow plugin to send emails using your Google account\" button under Gmail settings."
|
873 |
+
msgstr ""
|
874 |
+
|
875 |
+
#: src/Admin/Pages/Test.php:740
|
876 |
+
msgid "Go to plugin Settings page and click the \"Allow plugin to send emails using your Google account\" button."
|
877 |
+
msgstr ""
|
878 |
+
|
879 |
+
#: src/Admin/Pages/Test.php:741
|
880 |
+
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."
|
881 |
+
msgstr ""
|
882 |
+
|
883 |
+
#: src/Admin/Pages/Test.php:742
|
884 |
+
msgid "Please click \"Agree\", if you see that button. If not - you will need to enable less secure apps first:"
|
885 |
+
msgstr ""
|
886 |
+
|
887 |
+
#. translators: %s - Google support article URL.
|
888 |
+
#: src/Admin/Pages/Test.php:748
|
889 |
+
msgid "if you are using regular Gmail account, please <a href=\"%s\" target=\"_blank\" rel=\"noopener noreferrer\">read this article</a> to proceed."
|
890 |
+
msgstr ""
|
891 |
+
|
892 |
+
#. translators: %s - Google support article URL.
|
893 |
+
#: src/Admin/Pages/Test.php:764
|
894 |
+
msgid "if you are using G Suite, please <a href=\"%s\" target=\"_blank\" rel=\"noopener noreferrer\">read this article</a> to proceed."
|
895 |
+
msgstr ""
|
896 |
+
|
897 |
+
#: src/Admin/Pages/Test.php:787
|
898 |
+
msgid "Typically this error is because address the email was sent to is invalid or was empty."
|
899 |
+
msgstr ""
|
900 |
+
|
901 |
+
#: src/Admin/Pages/Test.php:790
|
902 |
+
msgid "Check the \"Send To\" email address used and confirm it is a valid email and was not empty."
|
903 |
+
msgstr ""
|
904 |
+
|
905 |
+
#. translators: 1 - correct email address example. 2 - incorrect email address example.
|
906 |
+
#: src/Admin/Pages/Test.php:793
|
907 |
+
msgid "It should be something like this: %1$s. These are incorrect values: %2$s."
|
908 |
+
msgstr ""
|
909 |
+
|
910 |
+
#: src/Admin/Pages/Test.php:797
|
911 |
+
msgid "Make sure that the generated email has a TO header, useful when you are responsible for email creation."
|
912 |
+
msgstr ""
|
913 |
+
|
914 |
+
#: src/Admin/Pages/Test.php:808
|
915 |
+
msgid "Unfortunately, this error can be due to many different reasons."
|
916 |
+
msgstr ""
|
917 |
+
|
918 |
+
#. translators: %s - Blog article URL.
|
919 |
+
#: src/Admin/Pages/Test.php:814
|
920 |
+
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."
|
921 |
+
msgstr ""
|
922 |
+
|
923 |
+
#: src/Admin/Pages/Test.php:835
|
924 |
+
msgid "Authentication code that Google returned to you has already been used on your previous auth attempt."
|
925 |
+
msgstr ""
|
926 |
+
|
927 |
+
#: src/Admin/Pages/Test.php:838
|
928 |
+
msgid "Make sure that you are not trying to manually clean up the plugin options to retry the \"Allow...\" step."
|
929 |
+
msgstr ""
|
930 |
+
|
931 |
+
#: src/Admin/Pages/Test.php:839
|
932 |
+
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."
|
933 |
+
msgstr ""
|
934 |
+
|
935 |
+
#: src/Admin/Pages/Test.php:840
|
936 |
+
msgid "Make sure there is no aggressive caching on site admin area pages or try to clean cache between attempts."
|
937 |
+
msgstr ""
|
938 |
+
|
939 |
+
#: src/Admin/Pages/Test.php:851
|
940 |
+
msgid "There are various reasons for that, please review the steps below."
|
941 |
+
msgstr ""
|
942 |
+
|
943 |
+
#. translators: %s - Google G Suite Admin area URL.
|
944 |
+
#: src/Admin/Pages/Test.php:857
|
945 |
+
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>."
|
946 |
+
msgstr ""
|
947 |
+
|
948 |
+
#. translators: %s - Google G Suite Admin area URL.
|
949 |
+
#: src/Admin/Pages/Test.php:871
|
950 |
+
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."
|
951 |
+
msgstr ""
|
952 |
+
|
953 |
+
#. translators: %s - Google Developers Console URL.
|
954 |
+
#: src/Admin/Pages/Test.php:885
|
955 |
+
msgid "Make sure that you have Gmail API enabled, and you can do that <a href=\"%s\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>."
|
956 |
+
msgstr ""
|
957 |
+
|
958 |
+
#: src/Admin/Pages/Test.php:908
|
959 |
+
#: src/Admin/Pages/Test.php:936
|
960 |
+
msgid "Make sure that the used Client ID/Secret correspond to a proper project that has Gmail API enabled."
|
961 |
+
msgstr ""
|
962 |
+
|
963 |
+
#. translators: %s - WPForms.com tutorial URL.
|
964 |
+
#: src/Admin/Pages/Test.php:912
|
965 |
+
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."
|
966 |
+
msgstr ""
|
967 |
+
|
968 |
+
#: src/Admin/Pages/Test.php:933
|
969 |
+
msgid "You may have added a new API to a project"
|
970 |
+
msgstr ""
|
971 |
+
|
972 |
+
#: src/Admin/Pages/Test.php:937
|
973 |
+
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."
|
974 |
+
msgstr ""
|
975 |
+
|
976 |
+
#: src/Admin/Pages/Test.php:973
|
977 |
+
msgid "An issue was detected."
|
978 |
+
msgstr ""
|
979 |
+
|
980 |
+
#: src/Admin/Pages/Test.php:974
|
981 |
+
msgid "This means your test email was unable to be sent."
|
982 |
+
msgstr ""
|
983 |
+
|
984 |
+
#: src/Admin/Pages/Test.php:976
|
985 |
+
msgid "Plugin settings are incorrect (wrong SMTP settings, invalid Mailer configuration, etc)."
|
986 |
+
msgstr ""
|
987 |
+
|
988 |
+
#: src/Admin/Pages/Test.php:978
|
989 |
+
msgid "Your host is rejecting the connection."
|
990 |
+
msgstr ""
|
991 |
+
|
992 |
+
#: src/Admin/Pages/Test.php:981
|
993 |
+
msgid "Triple check the plugin settings, consider reconfiguring to make sure everything is correct (eg bad copy and paste)."
|
994 |
+
msgstr ""
|
995 |
+
|
996 |
+
#: src/Admin/Pages/Test.php:983
|
997 |
+
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>"
|
998 |
+
msgstr ""
|
999 |
+
|
1000 |
+
#: src/Admin/Pages/Test.php:989
|
1001 |
+
msgid "Try using a different mailer."
|
1002 |
+
msgstr ""
|
1003 |
+
|
1004 |
+
#: src/Admin/Pages/Test.php:1008
|
1005 |
+
msgid "There was a problem while sending the test email."
|
1006 |
+
msgstr ""
|
1007 |
+
|
1008 |
+
#: src/Admin/Pages/Test.php:1018
|
1009 |
+
msgid "Recommended next steps:"
|
1010 |
+
msgstr ""
|
1011 |
+
|
1012 |
+
#: src/Admin/Pages/Test.php:1028
|
1013 |
+
msgid "Need support?"
|
1014 |
+
msgstr ""
|
1015 |
+
|
1016 |
+
#. translators: %s - WPMailSMTP.com account area link.
|
1017 |
+
#: src/Admin/Pages/Test.php:1036
|
1018 |
+
msgid "As a WP Mail SMTP Pro user you have access to WP Mail SMTP priority support. Please log in to your WPMailSMTP.com account and <a href=\"%s\" target=\"_blank\" rel=\"noopener noreferrer\">submit a support ticket</a>."
|
1019 |
+
msgstr ""
|
1020 |
+
|
1021 |
+
#: src/Admin/Pages/Test.php:1053
|
1022 |
+
msgid "WP Mail SMTP is a free plugin, and the team behind WPForms maintains it to give back to the WordPress community."
|
1023 |
+
msgstr ""
|
1024 |
+
|
1025 |
+
#. translators: %s - WPMailSMTP.com URL.
|
1026 |
+
#: src/Admin/Pages/Test.php:1060
|
1027 |
+
msgid "To access our world class support, please <a href=\"%s\" target=\"_blank\" rel=\"noopener noreferrer\">upgrade to WP Mail SMTP Pro</a>. Along with getting expert support, you will also get Notification controls, Email Logging, and integrations for Amazon SES, Office 365, and Outlook.com."
|
1028 |
+
msgstr ""
|
1029 |
+
|
1030 |
+
#: src/Admin/Pages/Test.php:1075
|
1031 |
+
msgid "Additionally, you can take advantage of our White Glove Setup. Sit back and relax while we handle everything for you! If you simply don't have time or maybe you feel a bit in over your head - we got you covered."
|
1032 |
+
msgstr ""
|
1033 |
+
|
1034 |
+
#: src/Admin/Pages/Test.php:1081
|
1035 |
+
msgid "As a valued WP Mail SMTP user, you will get <span class=\"price-off\">20% off regular pricing</span>, automatically applied at checkout!"
|
1036 |
+
msgstr ""
|
1037 |
+
|
1038 |
+
#. translators: %1$s - WP Mail SMTP support policy URL, %2$s - WP Mail SMTP support forum URL, %3$s - WPMailSMTP.com URL.
|
1039 |
+
#: src/Admin/Pages/Test.php:1095
|
1040 |
+
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\">upgrading to WP Mail SMTP Pro</a> to access our priority support ticket system."
|
1041 |
+
msgstr ""
|
1042 |
+
|
1043 |
+
#: src/Admin/Pages/Test.php:1116
|
1044 |
+
msgid "Click here to view the full Error Log for debugging"
|
1045 |
+
msgstr ""
|
1046 |
+
|
1047 |
+
#: src/Admin/Pages/Test.php:1125
|
1048 |
+
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."
|
1049 |
+
msgstr ""
|
1050 |
+
|
1051 |
+
#. translators: %1$s - Plugin name causing conflict; %2$s - Plugin name causing conflict.
|
1052 |
+
#: src/Conflicts.php:160
|
1053 |
+
msgid "Heads up! WP Mail SMTP has detected %1$s is activated. Please deactivate %2$s to prevent conflicts."
|
1054 |
+
msgstr ""
|
1055 |
+
|
1056 |
+
#. translators: %1$s - WPBeginner URL for recommended WordPress hosting.
|
1057 |
+
#: src/Core.php:106
|
1058 |
+
msgid "Your site is running an <strong>insecure version</strong> of PHP that is no longer supported. Please contact your web hosting provider to update your PHP version or switch to a <a href=\"%1$s\" target=\"_blank\" rel=\"noopener noreferrer\">recommended WordPress hosting company</a>."
|
1059 |
+
msgstr ""
|
1060 |
+
|
1061 |
+
#. translators: %s - WPForms.com URL for documentation with more details.
|
1062 |
+
#: src/Core.php:123
|
1063 |
+
msgid "<strong>Note:</strong> WP Mail SMTP plugin is disabled on your site until you fix the issue. <a href=\"%s\" target=\"_blank\" rel=\"noopener noreferrer\">Read more for additional information.</a>"
|
1064 |
+
msgstr ""
|
1065 |
+
|
1066 |
+
#. translators: %1$s - WP Mail SMTP plugin name; %2$s - WPForms.com URL to a related doc.
|
1067 |
+
#: src/Core.php:365
|
1068 |
+
msgid "Your site is running an outdated version of PHP that is no longer supported and may cause issues with %1$s. <a href=\"%2$s\" target=\"_blank\" rel=\"noopener noreferrer\">Read more</a> for additional information."
|
1069 |
+
msgstr ""
|
1070 |
+
|
1071 |
+
#: src/Core.php:379
|
1072 |
+
msgid "<strong>Please Note:</strong> Support for PHP 5.3-5.5 will be discontinued in 2019. After this, if no further action is taken, WP Mail SMTP functionality will be disabled."
|
1073 |
+
msgstr ""
|
1074 |
+
|
1075 |
+
#. translators: %1$s - plugin name and its version, %2$s - plugin Misc settings page.
|
1076 |
+
#: src/Core.php:418
|
1077 |
+
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."
|
1078 |
+
msgstr ""
|
1079 |
+
|
1080 |
+
#. translators: %s - plugin name and its version.
|
1081 |
+
#: src/Core.php:447
|
1082 |
+
msgid "<strong>EMAIL DELIVERY ERROR:</strong> the plugin %s logged this error during the last time it tried to send an email:"
|
1083 |
+
msgstr ""
|
1084 |
+
|
1085 |
+
#: src/Core.php:477
|
1086 |
+
msgid "Consider running an email test after fixing it."
|
1087 |
+
msgstr ""
|
1088 |
+
|
1089 |
+
#: src/Providers/Gmail/Options.php:32
|
1090 |
+
msgid "Gmail"
|
1091 |
+
msgstr ""
|
1092 |
+
|
1093 |
+
#. translators: %1$s - opening link tag; %2$s - closing link tag.
|
1094 |
+
#: src/Providers/Gmail/Options.php:36
|
1095 |
+
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."
|
1096 |
+
msgstr ""
|
1097 |
+
|
1098 |
+
#: src/Providers/Gmail/Options.php:71
|
1099 |
+
msgid "Client ID"
|
1100 |
+
msgstr ""
|
1101 |
+
|
1102 |
+
#: src/Providers/Gmail/Options.php:86
|
1103 |
+
msgid "Client Secret"
|
1104 |
+
msgstr ""
|
1105 |
+
|
1106 |
+
#: src/Providers/Gmail/Options.php:108
|
1107 |
+
msgid "Authorized redirect URI"
|
1108 |
+
msgstr ""
|
1109 |
+
|
1110 |
+
#: src/Providers/Gmail/Options.php:116
|
1111 |
+
msgid "Copy URL to clipboard"
|
1112 |
+
msgstr ""
|
1113 |
+
|
1114 |
+
#: src/Providers/Gmail/Options.php:121
|
1115 |
+
msgid "Please copy this URL into the \"Authorized redirect URIs\" field of your Google web application."
|
1116 |
+
msgstr ""
|
1117 |
+
|
1118 |
+
#: src/Providers/Gmail/Options.php:130
|
1119 |
+
msgid "Authorization"
|
1120 |
+
msgstr ""
|
1121 |
+
|
1122 |
+
#: src/Providers/Gmail/Options.php:158
|
1123 |
+
msgid "Allow plugin to send emails using your Google account"
|
1124 |
+
msgstr ""
|
1125 |
+
|
1126 |
+
#: src/Providers/Gmail/Options.php:161
|
1127 |
+
msgid "Click the button above to confirm authorization."
|
1128 |
+
msgstr ""
|
1129 |
+
|
1130 |
+
#: src/Providers/Gmail/Options.php:167
|
1131 |
+
msgid "Remove Connection"
|
1132 |
+
msgstr ""
|
1133 |
+
|
1134 |
+
#. translators: %s - email address, as received from Google API.
|
1135 |
+
#: src/Providers/Gmail/Options.php:176
|
1136 |
+
msgid "Connected as %s"
|
1137 |
+
msgstr ""
|
1138 |
+
|
1139 |
+
#: src/Providers/Gmail/Options.php:183
|
1140 |
+
msgid "Removing the connection will give you an ability to redo the connection or link to another Google account."
|
1141 |
+
msgstr ""
|
1142 |
+
|
1143 |
+
#: src/Providers/Gmail/Options.php:191
|
1144 |
+
msgid "You need to save settings with Client ID and Client Secret before you can proceed."
|
1145 |
+
msgstr ""
|
1146 |
+
|
1147 |
+
#: src/Providers/Mail/Options.php:25
|
1148 |
+
msgid "Default (none)"
|
1149 |
+
msgstr ""
|
1150 |
+
|
1151 |
+
#: src/Providers/Mail/Options.php:37
|
1152 |
+
msgid "You currently have the native WordPress option selected. Please select any other Mailer option above to continue the setup."
|
1153 |
+
msgstr ""
|
1154 |
+
|
1155 |
+
#: src/Providers/Mailgun/Options.php:25
|
1156 |
+
msgid "Mailgun"
|
1157 |
+
msgstr ""
|
1158 |
+
|
1159 |
+
#. translators: %1$s - opening link tag; %2$s - closing link tag; %3$s - opening link tag; %4$s - closing link tag.
|
1160 |
+
#: src/Providers/Mailgun/Options.php:29
|
1161 |
+
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."
|
1162 |
+
msgstr ""
|
1163 |
+
|
1164 |
+
#: src/Providers/Mailgun/Options.php:57
|
1165 |
+
msgid "Private API Key"
|
1166 |
+
msgstr ""
|
1167 |
+
|
1168 |
+
#. translators: %s - API key link.
|
1169 |
+
#: src/Providers/Mailgun/Options.php:76
|
1170 |
+
msgid "Follow this link to get an API Key from Mailgun: %s."
|
1171 |
+
msgstr ""
|
1172 |
+
|
1173 |
+
#: src/Providers/Mailgun/Options.php:78
|
1174 |
+
msgid "Get a Private API Key"
|
1175 |
+
msgstr ""
|
1176 |
+
|
1177 |
+
#: src/Providers/Mailgun/Options.php:89
|
1178 |
+
msgid "Domain Name"
|
1179 |
+
msgstr ""
|
1180 |
+
|
1181 |
+
#. translators: %s - Domain Name link.
|
1182 |
+
#: src/Providers/Mailgun/Options.php:101
|
1183 |
+
msgid "Follow this link to get a Domain Name from Mailgun: %s."
|
1184 |
+
msgstr ""
|
1185 |
+
|
1186 |
+
#: src/Providers/Mailgun/Options.php:103
|
1187 |
+
msgid "Get a Domain Name"
|
1188 |
+
msgstr ""
|
1189 |
+
|
1190 |
+
#: src/Providers/Mailgun/Options.php:114
|
1191 |
+
msgid "Region"
|
1192 |
+
msgstr ""
|
1193 |
+
|
1194 |
+
#: src/Providers/Mailgun/Options.php:124
|
1195 |
+
msgid "US"
|
1196 |
+
msgstr ""
|
1197 |
+
|
1198 |
+
#: src/Providers/Mailgun/Options.php:133
|
1199 |
+
msgid "EU"
|
1200 |
+
msgstr ""
|
1201 |
+
|
1202 |
+
#: src/Providers/Mailgun/Options.php:137
|
1203 |
+
msgid "Define which endpoint you want to use for sending messages."
|
1204 |
+
msgstr ""
|
1205 |
+
|
1206 |
+
#: src/Providers/Mailgun/Options.php:138
|
1207 |
+
msgid "If you are operating under EU laws, you may be required to use EU region."
|
1208 |
+
msgstr ""
|
1209 |
+
|
1210 |
+
#. translators: %s - URL to Mailgun.com page.
|
1211 |
+
#: src/Providers/Mailgun/Options.php:143
|
1212 |
+
msgid "<a href=\"%s\" rel=\"\" target=\"_blank\">More information</a> on Mailgun.com."
|
1213 |
+
msgstr ""
|
1214 |
+
|
1215 |
+
#: src/Providers/OptionsAbstract.php:126
|
1216 |
+
#: wp-mail-smtp-0.11.2.php:376
|
1217 |
+
msgid "SMTP Host"
|
1218 |
+
msgstr ""
|
1219 |
+
|
1220 |
+
#: src/Providers/OptionsAbstract.php:140
|
1221 |
+
#: wp-mail-smtp-0.11.2.php:391
|
1222 |
+
#: wp-mail-smtp-0.11.2.php:395
|
1223 |
+
#: wp-mail-smtp-0.11.2.php:510
|
1224 |
+
#: wp-mail-smtp-0.11.2.php:516
|
1225 |
+
msgid "Encryption"
|
1226 |
+
msgstr ""
|
1227 |
+
|
1228 |
+
#: src/Providers/OptionsAbstract.php:150
|
1229 |
+
msgid "None"
|
1230 |
+
msgstr ""
|
1231 |
+
|
1232 |
+
#: src/Providers/OptionsAbstract.php:159
|
1233 |
+
msgid "SSL"
|
1234 |
+
msgstr ""
|
1235 |
+
|
1236 |
+
#: src/Providers/OptionsAbstract.php:168
|
1237 |
+
msgid "TLS"
|
1238 |
+
msgstr ""
|
1239 |
+
|
1240 |
+
#: src/Providers/OptionsAbstract.php:172
|
1241 |
+
msgid "For most servers TLS is the recommended option. If your SMTP provider offers both SSL and TLS options, we recommend using TLS."
|
1242 |
+
msgstr ""
|
1243 |
+
|
1244 |
+
#: src/Providers/OptionsAbstract.php:180
|
1245 |
+
#: wp-mail-smtp-0.11.2.php:384
|
1246 |
+
#: wp-mail-smtp-0.11.2.php:502
|
1247 |
+
msgid "SMTP Port"
|
1248 |
+
msgstr ""
|
1249 |
+
|
1250 |
+
#: src/Providers/OptionsAbstract.php:194
|
1251 |
+
msgid "Auto TLS"
|
1252 |
+
msgstr ""
|
1253 |
+
|
1254 |
+
#: src/Providers/OptionsAbstract.php:208
|
1255 |
+
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."
|
1256 |
+
msgstr ""
|
1257 |
+
|
1258 |
+
#: src/Providers/OptionsAbstract.php:216
|
1259 |
+
#: wp-mail-smtp-0.11.2.php:418
|
1260 |
+
#: wp-mail-smtp-0.11.2.php:422
|
1261 |
+
msgid "Authentication"
|
1262 |
+
msgstr ""
|
1263 |
+
|
1264 |
+
#: src/Providers/OptionsAbstract.php:235
|
1265 |
+
msgid "SMTP Username"
|
1266 |
+
msgstr ""
|
1267 |
+
|
1268 |
+
#: src/Providers/OptionsAbstract.php:249
|
1269 |
+
msgid "SMTP Password"
|
1270 |
+
msgstr ""
|
1271 |
+
|
1272 |
+
#. translators: %s - constant name: WPMS_SMTP_PASS.
|
1273 |
+
#: src/Providers/OptionsAbstract.php:261
|
1274 |
+
msgid "To change the password you need to change the value of the constant there: %s"
|
1275 |
+
msgstr ""
|
1276 |
+
|
1277 |
+
#. translators: %1$s - wp-config.php file, %2$s - WPMS_ON constant name.
|
1278 |
+
#: src/Providers/OptionsAbstract.php:269
|
1279 |
+
msgid "If you want to disable the use of constants, find in %1$s file the constant %2$s and turn if off:"
|
1280 |
+
msgstr ""
|
1281 |
+
|
1282 |
+
#: src/Providers/OptionsAbstract.php:279
|
1283 |
+
msgid "All the defined constants will stop working and you will be able to change all the values on this page."
|
1284 |
+
msgstr ""
|
1285 |
+
|
1286 |
+
#: src/Providers/OptionsAbstract.php:287
|
1287 |
+
msgid "The password is stored in plain text. We highly recommend you set up your password in your WordPress configuration file for improved security."
|
1288 |
+
msgstr ""
|
1289 |
+
|
1290 |
+
#. translators: %s - wp-config.php.
|
1291 |
+
#: src/Providers/OptionsAbstract.php:292
|
1292 |
+
msgid "To do this add the lines below to your %s file:"
|
1293 |
+
msgstr ""
|
1294 |
+
|
1295 |
+
#. translators: %1$s - Provider name; %2$s - PHP version required by Provider; %3$s - current PHP version.
|
1296 |
+
#: src/Providers/OptionsAbstract.php:333
|
1297 |
+
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."
|
1298 |
+
msgstr ""
|
1299 |
+
|
1300 |
+
#: src/Providers/OptionsAbstract.php:340
|
1301 |
+
#: src/Providers/OptionsAbstract.php:364
|
1302 |
+
msgid "Meanwhile you can switch to the \"Other SMTP\" Mailer option."
|
1303 |
+
msgstr ""
|
1304 |
+
|
1305 |
+
#. translators: %s - Provider name.
|
1306 |
+
#: src/Providers/OptionsAbstract.php:359
|
1307 |
+
msgid "%s requires a SSL certificate on a site to work and does not support you current installation. Please contact your host and request a SSL certificate or install a free one, like Let's Encrypt."
|
1308 |
+
msgstr ""
|
1309 |
+
|
1310 |
+
#. translators: %1$s - constant name, %2$s - file name.
|
1311 |
+
#: src/Providers/OptionsAbstract.php:383
|
1312 |
+
msgid "The value of this field was set using a constant %1$s most likely inside %2$s of your WordPress installation."
|
1313 |
+
msgstr ""
|
1314 |
+
|
1315 |
+
#: src/Providers/Pepipost/Options.php:25
|
1316 |
+
msgid "Pepipost"
|
1317 |
+
msgstr ""
|
1318 |
+
|
1319 |
+
#: src/Providers/Sendgrid/Options.php:25
|
1320 |
+
msgid "SendGrid"
|
1321 |
+
msgstr ""
|
1322 |
+
|
1323 |
+
#. translators: %1$s - opening link tag; %2$s - closing link tag; %3$s - opening link tag; %4$s - closing link tag.
|
1324 |
+
#: src/Providers/Sendgrid/Options.php:29
|
1325 |
+
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 day.<br><br>Read our %3$sSendGrid documentation%4$s to learn how to set up SendGrid and improve your email deliverability."
|
1326 |
+
msgstr ""
|
1327 |
+
|
1328 |
+
#: src/Providers/Sendgrid/Options.php:57
|
1329 |
+
msgid "API Key"
|
1330 |
+
msgstr ""
|
1331 |
+
|
1332 |
+
#. translators: %s - API key link.
|
1333 |
+
#: src/Providers/Sendgrid/Options.php:76
|
1334 |
+
msgid "Follow this link to get an API Key from SendGrid: %s."
|
1335 |
+
msgstr ""
|
1336 |
+
|
1337 |
+
#: src/Providers/Sendgrid/Options.php:78
|
1338 |
+
msgid "Create API Key"
|
1339 |
+
msgstr ""
|
1340 |
+
|
1341 |
+
#. translators: %s - SendGrid access level.
|
1342 |
+
#: src/Providers/Sendgrid/Options.php:86
|
1343 |
+
msgid "To send emails you will need only a %s access level for this API key."
|
1344 |
+
msgstr ""
|
1345 |
+
|
1346 |
+
#: src/Providers/SMTP/Options.php:25
|
1347 |
+
msgid "Other SMTP"
|
1348 |
+
msgstr ""
|
1349 |
+
|
1350 |
+
#. translators: %s - URL to a related article on WPForms.com.
|
1351 |
+
#: src/Providers/SMTP/Options.php:29
|
1352 |
+
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 <a href=\"%s\" target=\"_blank\" rel=\"noopener noreferrer\">SMTP documentation</a>."
|
1353 |
+
msgstr ""
|
1354 |
+
|
1355 |
+
#. translators: %1$s - date, \a\t - specially escaped "at", %2$s - time.
|
1356 |
+
#: src/WP.php:183
|
1357 |
+
msgid "%1$s \\a\\t %2$s"
|
1358 |
+
msgstr ""
|
1359 |
+
|
1360 |
+
#: wp-mail-smtp-0.11.2.php:193
|
1361 |
+
#: wp-mail-smtp-0.11.2.php:567
|
1362 |
+
msgid "Send Test"
|
1363 |
+
msgstr ""
|
1364 |
+
|
1365 |
+
#. translators: %s - email address where test mail will be sent to.
|
1366 |
+
#: wp-mail-smtp-0.11.2.php:202
|
1367 |
+
msgid "Test mail to %s"
|
1368 |
+
msgstr ""
|
1369 |
+
|
1370 |
+
#: wp-mail-smtp-0.11.2.php:203
|
1371 |
+
msgid "This is a test email generated by the WP Mail SMTP WordPress plugin."
|
1372 |
+
msgstr ""
|
1373 |
+
|
1374 |
+
#: wp-mail-smtp-0.11.2.php:219
|
1375 |
+
msgid "Test Message Sent"
|
1376 |
+
msgstr ""
|
1377 |
+
|
1378 |
+
#: wp-mail-smtp-0.11.2.php:220
|
1379 |
+
msgid "The result was:"
|
1380 |
+
msgstr ""
|
1381 |
+
|
1382 |
+
#: wp-mail-smtp-0.11.2.php:223
|
1383 |
+
msgid "The full debugging output is shown below:"
|
1384 |
+
msgstr ""
|
1385 |
+
|
1386 |
+
#: wp-mail-smtp-0.11.2.php:226
|
1387 |
+
msgid "The SMTP debugging output is shown below:"
|
1388 |
+
msgstr ""
|
1389 |
+
|
1390 |
+
#: wp-mail-smtp-0.11.2.php:238
|
1391 |
+
#: wp-mail-smtp-0.11.2.php:603
|
1392 |
+
msgid "WP Mail SMTP Settings"
|
1393 |
+
msgstr ""
|
1394 |
+
|
1395 |
+
#: wp-mail-smtp-0.11.2.php:254
|
1396 |
+
msgid "You can specify the email address that emails should be sent from. If you leave this blank, the default email will be used."
|
1397 |
+
msgstr ""
|
1398 |
+
|
1399 |
+
#: wp-mail-smtp-0.11.2.php:257
|
1400 |
+
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<email@domain.com> in this field."
|
1401 |
+
msgstr ""
|
1402 |
+
|
1403 |
+
#: wp-mail-smtp-0.11.2.php:272
|
1404 |
+
msgid "You can specify the name that emails should be sent from. If you leave this blank, the emails will be sent from WordPress."
|
1405 |
+
msgstr ""
|
1406 |
+
|
1407 |
+
#: wp-mail-smtp-0.11.2.php:291
|
1408 |
+
msgid "Send all WordPress emails via SMTP."
|
1409 |
+
msgstr ""
|
1410 |
+
|
1411 |
+
#: wp-mail-smtp-0.11.2.php:295
|
1412 |
+
msgid "Use the PHP mail() function to send emails."
|
1413 |
+
msgstr ""
|
1414 |
+
|
1415 |
+
#: wp-mail-smtp-0.11.2.php:301
|
1416 |
+
msgid "Use Pepipost SMTP to send emails."
|
1417 |
+
msgstr ""
|
1418 |
+
|
1419 |
+
#. translators: %1$s - link start; %2$s - link end.
|
1420 |
+
#: wp-mail-smtp-0.11.2.php:307
|
1421 |
+
msgid "Looking for high inbox delivery? Try Pepipost with easy setup and free emails. Learn more %1$shere%2$s."
|
1422 |
+
msgstr ""
|
1423 |
+
|
1424 |
+
#: wp-mail-smtp-0.11.2.php:364
|
1425 |
+
#: wp-mail-smtp-0.11.2.php:464
|
1426 |
+
#: wp-mail-smtp-0.11.2.php:540
|
1427 |
+
msgid "Save Changes"
|
1428 |
+
msgstr ""
|
1429 |
+
|
1430 |
+
#: wp-mail-smtp-0.11.2.php:369
|
1431 |
+
msgid "SMTP Options"
|
1432 |
+
msgstr ""
|
1433 |
+
|
1434 |
+
#: wp-mail-smtp-0.11.2.php:371
|
1435 |
+
msgid "These options only apply if you have chosen to send mail by SMTP above."
|
1436 |
+
msgstr ""
|
1437 |
+
|
1438 |
+
#: wp-mail-smtp-0.11.2.php:400
|
1439 |
+
#: wp-mail-smtp-0.11.2.php:522
|
1440 |
+
msgid "No encryption."
|
1441 |
+
msgstr ""
|
1442 |
+
|
1443 |
+
#: wp-mail-smtp-0.11.2.php:405
|
1444 |
+
#: wp-mail-smtp-0.11.2.php:527
|
1445 |
+
msgid "Use SSL encryption."
|
1446 |
+
msgstr ""
|
1447 |
+
|
1448 |
+
#: wp-mail-smtp-0.11.2.php:410
|
1449 |
+
#: wp-mail-smtp-0.11.2.php:532
|
1450 |
+
msgid "Use TLS encryption."
|
1451 |
+
msgstr ""
|
1452 |
+
|
1453 |
+
#: wp-mail-smtp-0.11.2.php:413
|
1454 |
+
msgid "TLS is not the same as STARTTLS. For most servers SSL is the recommended option."
|
1455 |
+
msgstr ""
|
1456 |
+
|
1457 |
+
#: wp-mail-smtp-0.11.2.php:427
|
1458 |
+
msgid "No: Do not use SMTP authentication."
|
1459 |
+
msgstr ""
|
1460 |
+
|
1461 |
+
#: wp-mail-smtp-0.11.2.php:432
|
1462 |
+
msgid "Yes: Use SMTP authentication."
|
1463 |
+
msgstr ""
|
1464 |
+
|
1465 |
+
#: wp-mail-smtp-0.11.2.php:436
|
1466 |
+
msgid "If this is set to no, the values below are ignored."
|
1467 |
+
msgstr ""
|
1468 |
+
|
1469 |
+
#: wp-mail-smtp-0.11.2.php:443
|
1470 |
+
#: wp-mail-smtp-0.11.2.php:486
|
1471 |
+
msgid "Username"
|
1472 |
+
msgstr ""
|
1473 |
+
|
1474 |
+
#: wp-mail-smtp-0.11.2.php:451
|
1475 |
+
#: wp-mail-smtp-0.11.2.php:494
|
1476 |
+
msgid "Password"
|
1477 |
+
msgstr ""
|
1478 |
+
|
1479 |
+
#: wp-mail-smtp-0.11.2.php:457
|
1480 |
+
msgid "This is in plain text because it must not be stored encrypted."
|
1481 |
+
msgstr ""
|
1482 |
+
|
1483 |
+
#: wp-mail-smtp-0.11.2.php:471
|
1484 |
+
msgid "Pepipost SMTP Options"
|
1485 |
+
msgstr ""
|
1486 |
+
|
1487 |
+
#. translators: %s - Pepipost registration URL.
|
1488 |
+
#: wp-mail-smtp-0.11.2.php:477
|
1489 |
+
msgid "You need to signup on %s to get the SMTP username/password."
|
1490 |
+
msgstr ""
|
1491 |
+
|
1492 |
+
#: wp-mail-smtp-0.11.2.php:557
|
1493 |
+
msgid "To"
|
1494 |
+
msgstr ""
|
1495 |
+
|
1496 |
+
#: wp-mail-smtp-0.11.2.php:561
|
1497 |
+
msgid "Type an email address here and then click Send Test to generate a test email."
|
1498 |
+
msgstr ""
|
1499 |
+
|
1500 |
+
#. translators: %1$s - WP Mail SMTP plugin name; %2$s - opening a link tag; %3$s - closing a link tag.
|
1501 |
+
#: wp-mail-smtp-0.11.2.php:770
|
1502 |
+
msgid "Your site is running an outdated version of PHP that is no longer supported and may cause issues with %1$s. %2$sRead more%3$s for additional information."
|
1503 |
+
msgstr ""
|
1504 |
+
|
1505 |
+
#: wp_mail_smtp.php:122
|
1506 |
+
msgid "Please deactivate the free version of the WP Mail SMTP plugin before activating WP Mail SMTP Pro."
|
1507 |
+
msgstr ""
|
languages/wp-mail-smtp-he_IL.mo
DELETED
Binary file
|
languages/wp-mail-smtp-ja.mo
DELETED
Binary file
|
languages/wp-mail-smtp.pot
DELETED
@@ -1,1115 +0,0 @@
|
|
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:667
|
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\">★★★★★</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:773
|
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:410, wp_mail_smtp.php:415
|
89 |
-
msgid "Hide Announcements"
|
90 |
-
msgstr ""
|
91 |
-
|
92 |
-
#: src/Admin/Pages/Misc.php:99, wp_mail_smtp.php:420
|
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:311
|
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:330
|
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:345, wp_mail_smtp.php:350
|
165 |
-
msgid "Mailer"
|
166 |
-
msgstr ""
|
167 |
-
|
168 |
-
#: src/Admin/Pages/Settings.php:189, wp_mail_smtp.php:386, wp_mail_smtp.php:391
|
169 |
-
msgid "Return Path"
|
170 |
-
msgstr ""
|
171 |
-
|
172 |
-
#: src/Admin/Pages/Settings.php:198, wp_mail_smtp.php:396
|
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:400
|
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:613
|
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:440
|
886 |
-
msgid "SMTP Host"
|
887 |
-
msgstr ""
|
888 |
-
|
889 |
-
#: src/Providers/OptionsAbstract.php:140, wp_mail_smtp.php:455, wp_mail_smtp.php:459, wp_mail_smtp.php:574, wp_mail_smtp.php:580
|
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:448, wp_mail_smtp.php:566
|
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:482, wp_mail_smtp.php:486
|
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:266
|
988 |
-
msgid "Test mail to %s"
|
989 |
-
msgstr ""
|
990 |
-
|
991 |
-
#: wp_mail_smtp.php:267
|
992 |
-
msgid "This is a test email generated by the WP Mail SMTP WordPress plugin."
|
993 |
-
msgstr ""
|
994 |
-
|
995 |
-
#: wp_mail_smtp.php:283
|
996 |
-
msgid "Test Message Sent"
|
997 |
-
msgstr ""
|
998 |
-
|
999 |
-
#: wp_mail_smtp.php:284
|
1000 |
-
msgid "The result was:"
|
1001 |
-
msgstr ""
|
1002 |
-
|
1003 |
-
#: wp_mail_smtp.php:287
|
1004 |
-
msgid "The full debugging output is shown below:"
|
1005 |
-
msgstr ""
|
1006 |
-
|
1007 |
-
#: wp_mail_smtp.php:290
|
1008 |
-
msgid "The SMTP debugging output is shown below:"
|
1009 |
-
msgstr ""
|
1010 |
-
|
1011 |
-
#: wp_mail_smtp.php:257, wp_mail_smtp.php:631
|
1012 |
-
msgid "Send Test"
|
1013 |
-
msgstr ""
|
1014 |
-
|
1015 |
-
#: wp_mail_smtp.php:302, wp_mail_smtp.php:667
|
1016 |
-
msgid "WP Mail SMTP Settings"
|
1017 |
-
msgstr ""
|
1018 |
-
|
1019 |
-
#: wp_mail_smtp.php:318
|
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:321
|
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<email@domain.com> in this field."
|
1025 |
-
msgstr ""
|
1026 |
-
|
1027 |
-
#: wp_mail_smtp.php:336
|
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:355
|
1032 |
-
msgid "Send all WordPress emails via SMTP."
|
1033 |
-
msgstr ""
|
1034 |
-
|
1035 |
-
#: wp_mail_smtp.php:359
|
1036 |
-
msgid "Use the PHP mail() function to send emails."
|
1037 |
-
msgstr ""
|
1038 |
-
|
1039 |
-
#: wp_mail_smtp.php:365
|
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:371
|
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:428, wp_mail_smtp.php:528, wp_mail_smtp.php:604
|
1049 |
-
msgid "Save Changes"
|
1050 |
-
msgstr ""
|
1051 |
-
|
1052 |
-
#: wp_mail_smtp.php:433
|
1053 |
-
msgid "SMTP Options"
|
1054 |
-
msgstr ""
|
1055 |
-
|
1056 |
-
#: wp_mail_smtp.php:435
|
1057 |
-
msgid "These options only apply if you have chosen to send mail by SMTP above."
|
1058 |
-
msgstr ""
|
1059 |
-
|
1060 |
-
#: wp_mail_smtp.php:464, wp_mail_smtp.php:586
|
1061 |
-
msgid "No encryption."
|
1062 |
-
msgstr ""
|
1063 |
-
|
1064 |
-
#: wp_mail_smtp.php:469, wp_mail_smtp.php:591
|
1065 |
-
msgid "Use SSL encryption."
|
1066 |
-
msgstr ""
|
1067 |
-
|
1068 |
-
#: wp_mail_smtp.php:474, wp_mail_smtp.php:596
|
1069 |
-
msgid "Use TLS encryption."
|
1070 |
-
msgstr ""
|
1071 |
-
|
1072 |
-
#: wp_mail_smtp.php:477
|
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:491
|
1077 |
-
msgid "No: Do not use SMTP authentication."
|
1078 |
-
msgstr ""
|
1079 |
-
|
1080 |
-
#: wp_mail_smtp.php:496
|
1081 |
-
msgid "Yes: Use SMTP authentication."
|
1082 |
-
msgstr ""
|
1083 |
-
|
1084 |
-
#: wp_mail_smtp.php:500
|
1085 |
-
msgid "If this is set to no, the values below are ignored."
|
1086 |
-
msgstr ""
|
1087 |
-
|
1088 |
-
#: wp_mail_smtp.php:507, wp_mail_smtp.php:550
|
1089 |
-
msgid "Username"
|
1090 |
-
msgstr ""
|
1091 |
-
|
1092 |
-
#: wp_mail_smtp.php:515, wp_mail_smtp.php:558
|
1093 |
-
msgid "Password"
|
1094 |
-
msgstr ""
|
1095 |
-
|
1096 |
-
#: wp_mail_smtp.php:521
|
1097 |
-
msgid "This is in plain text because it must not be stored encrypted."
|
1098 |
-
msgstr ""
|
1099 |
-
|
1100 |
-
#: wp_mail_smtp.php:535
|
1101 |
-
msgid "Pepipost SMTP Options"
|
1102 |
-
msgstr ""
|
1103 |
-
|
1104 |
-
#. translators: %s - Pepipost registration URL.
|
1105 |
-
#: wp_mail_smtp.php:541
|
1106 |
-
msgid "You need to signup on %s to get the SMTP username/password."
|
1107 |
-
msgstr ""
|
1108 |
-
|
1109 |
-
#: wp_mail_smtp.php:621
|
1110 |
-
msgid "To"
|
1111 |
-
msgstr ""
|
1112 |
-
|
1113 |
-
#: wp_mail_smtp.php:625
|
1114 |
-
msgid "Type an email address here and then click Send Test to generate a test email."
|
1115 |
-
msgstr ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
loco.xml
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="utf-8"?>
|
2 |
+
<bundle name="WP Mail SMTP">
|
3 |
+
<domain name="wp-mail-smtp">
|
4 |
+
<project name="WP Mail SMTP" slug="wp-mail-smtp">
|
5 |
+
<source>
|
6 |
+
<directory>.</directory>
|
7 |
+
</source>
|
8 |
+
<target>
|
9 |
+
<directory>assets/languages</directory>
|
10 |
+
</target>
|
11 |
+
<template>
|
12 |
+
<file>assets/languages/wp-mail-smtp.pot</file>
|
13 |
+
</template>
|
14 |
+
</project>
|
15 |
+
</domain>
|
16 |
+
<domain name="wp-mail-smtp-pro">
|
17 |
+
<project name="WP Mail SMTP Pro" slug="wp-mail-smtp-pro">
|
18 |
+
<source>
|
19 |
+
<directory>.</directory>
|
20 |
+
</source>
|
21 |
+
<target>
|
22 |
+
<directory>assets/pro/languages</directory>
|
23 |
+
</target>
|
24 |
+
<template>
|
25 |
+
<file>assets/pro/languages/wp-mail-smtp-pro.pot</file>
|
26 |
+
</template>
|
27 |
+
</project>
|
28 |
+
</domain>
|
29 |
+
</bundle>
|
readme.txt
CHANGED
@@ -1,28 +1,30 @@
|
|
1 |
=== WP Mail SMTP by WPForms ===
|
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:
|
5 |
Tested up to: 5.2
|
6 |
-
Stable tag: 1.
|
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 |
-
|
14 |
|
15 |
-
Having problems with your WordPress site not sending emails? You're not alone. Over 1 million websites use WP Mail SMTP to
|
16 |
|
17 |
-
|
|
|
|
|
18 |
|
19 |
= What is SMTP? =
|
20 |
|
21 |
-
SMTP (Simple Mail Transfer Protocol) is an industry standard for sending emails. SMTP helps increase email deliverability by using
|
22 |
|
23 |
-
Popular email clients like Gmail, Yahoo,
|
24 |
|
25 |
-
If the proper authentication isn't there, then
|
26 |
|
27 |
This is a problem for a lot of WordPress sites because by default, WordPress uses the PHP mail function to send emails generated by WordPress or any contact form plugin like <a href="https://wpforms.com/" rel="friend">WPForms</a>.
|
28 |
|
@@ -32,15 +34,19 @@ The combination of two causes your WordPress emails to not get delivered.
|
|
32 |
|
33 |
= How does WP Mail SMTP work? =
|
34 |
|
35 |
-
WP Mail SMTP plugin
|
|
|
|
|
36 |
|
37 |
This helps you fix all WordPress not sending email issues.
|
38 |
|
39 |
-
WP Mail SMTP plugin includes
|
40 |
|
41 |
1. Mailgun SMTP
|
42 |
2. SendGrid SMTP
|
43 |
3. Gmail SMTP
|
|
|
|
|
44 |
4. All Other SMTP
|
45 |
|
46 |
For all options, you can specify the "from name" and "email address" for outgoing emails.
|
@@ -71,6 +77,14 @@ SendGrid has a free SMTP plan that you can use to send up to 100 emails per day.
|
|
71 |
|
72 |
Read our <a href="https://wpforms.com/fix-wordpress-email-notifications-with-sendgrid/" rel="friend">SendGrid documentation</a> for more details.
|
73 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
= Other SMTP =
|
75 |
|
76 |
WP Mail SMTP plugin also works with all major email services such as Gmail, Yahoo, Outlook, Microsoft Live, and any other email sending service that offers SMTP.
|
@@ -83,24 +97,55 @@ You can set the following options:
|
|
83 |
* Choose to use SMTP authentication or not.
|
84 |
* Specify an SMTP username and password.
|
85 |
|
86 |
-
WP Mail SMTP also gives you the option to insert your password in your wp-config.php file, so it's not visible in your WordPress settings.
|
87 |
-
|
88 |
To see recommended settings for the popular services as well as troubleshooting tips, check out our <a href="https://wpforms.com/docs/how-to-set-up-smtp-using-the-wp-mail-smtp-plugin/" rel="friend">SMTP documentation</a>.
|
89 |
|
90 |
-
We hope that you find WP Mail SMTP plugin helpful
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
|
92 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
|
94 |
WP Mail SMTP plugin was originally created by Callum Macdonald. It is now owned and maintained by the team behind <a href="https://wpforms.com/" rel="friend">WPForms</a> - the best drag & drop form builder for WordPress.
|
95 |
|
96 |
You can try the <a href="https://wordpress.org/plugins/wpforms-lite/" rel="friend">free version of WPForms plugin</a> to see why it's the best in the market.
|
97 |
|
98 |
-
|
99 |
|
100 |
-
If you like this plugin, then
|
101 |
|
102 |
-
* <a href="
|
103 |
-
* <a href="https://www.monsterinsights.com/" rel="friend" title="MonsterInsights">MonsterInsights</a> - Best Google Analytics Plugin for WordPress
|
|
|
104 |
|
105 |
Visit <a href="http://www.wpbeginner.com/" rel="friend" title="WPBeginner">WPBeginner</a> to learn from our <a href="http://www.wpbeginner.com/category/wp-tutorials/" rel="friend" title="WordPress Tutorials">WordPress Tutorials</a> and find out about other <a href="http://www.wpbeginner.com/category/plugins/" rel="friend" title="Best WordPress Plugins">best WordPress plugins</a>.
|
106 |
|
@@ -110,7 +155,7 @@ Visit <a href="http://www.wpbeginner.com/" rel="friend" title="WPBeginner">WPBeg
|
|
110 |
2. Activate WP Mail SMTP by WPForms.
|
111 |
3. Navigate to the Settings area of WP Mail SMTP in the WordPress admin.
|
112 |
4. Choose your SMTP option (Mailgun SMTP, SendGrid SMTP, Gmail SMTP, or Other SMTP) and follow the instructions to set it up.
|
113 |
-
5.
|
114 |
|
115 |
== Frequently Asked Questions ==
|
116 |
|
@@ -124,6 +169,10 @@ Yes! We have extensive documentation that covers setting up SMTP most popular em
|
|
124 |
|
125 |
Please read <a href="https://wordpress.org/support/topic/wp-mail-smtp-support-policy/">our support policy</a> for more information.
|
126 |
|
|
|
|
|
|
|
|
|
127 |
= I found a bug, now what? =
|
128 |
|
129 |
If you've stumbled upon a bug, the best place to report it is in the <a href="https://github.com/awesomemotive/wp-mail-smtp">WP Mail SMTP GitHub repository</a>. GitHub is where the plugin is actively developed, and posting there will get your issue quickly seen by our developers (myself and Slava). Once posted, we'll review your bug report and triage the bug. When creating an issue, the more details you can add to your report, the faster the bug can be solved.
|
@@ -133,7 +182,7 @@ If you've stumbled upon a bug, the best place to report it is in the <a href="ht
|
|
133 |
Short answer: maybe.
|
134 |
|
135 |
By all means please contact us to discuss features or options you'd like to see added to the plugin. We can't guarantee to add all of them, but we will consider all sensible requests. We can be contacted here:
|
136 |
-
<a href="https://
|
137 |
|
138 |
== Screenshots ==
|
139 |
|
@@ -146,6 +195,22 @@ By all means please contact us to discuss features or options you'd like to see
|
|
146 |
|
147 |
== Changelog ==
|
148 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
149 |
= 1.4.2 - 2019-03-23 =
|
150 |
* Changed: Tested up to WordPress 5.1.x.
|
151 |
* Changed: Removed TGMPA library.
|
1 |
=== WP Mail SMTP by WPForms ===
|
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: 4.9
|
5 |
Tested up to: 5.2
|
6 |
+
Stable tag: 1.5.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 send their emails reliabily.
|
16 |
|
17 |
+
Our goal is to make email deliverability easy and reliable. We want to ensure your emails reach the inbox.
|
18 |
+
|
19 |
+
WP Mail SMTP fixes your email deliverability by reconfiguring WordPress to use a proper SMTP provider when sending emails.
|
20 |
|
21 |
= What is SMTP? =
|
22 |
|
23 |
+
SMTP (Simple Mail Transfer Protocol) is an industry standard for sending emails. Proper SMTP configuration helps increase email deliverability by using authentication.
|
24 |
|
25 |
+
Popular email clients like Gmail, Yahoo, and Office 365 are in a constant battle with email spammers. One of the things they look at is if an email is originating from the location it claims to be originating from.
|
26 |
|
27 |
+
If the proper authentication isn't there, then emails either go in the SPAM folder or worst, don't get delivered at all.
|
28 |
|
29 |
This is a problem for a lot of WordPress sites because by default, WordPress uses the PHP mail function to send emails generated by WordPress or any contact form plugin like <a href="https://wpforms.com/" rel="friend">WPForms</a>.
|
30 |
|
34 |
|
35 |
= How does WP Mail SMTP work? =
|
36 |
|
37 |
+
WP Mail SMTP plugin easily resolves email delivery problems by improving and changing how your WordPress site sends email. We reconfigure the `wp_mail()` function to either use proper SMTP host credentials or leverage a built-in SMTP mail provider.
|
38 |
+
|
39 |
+
When using one of our built-in SMTP mail provider integrations (recommended), emails are sent using the provider's direct API. This means even if your web host is blocking SMTP ports, your emails still send successfully.
|
40 |
|
41 |
This helps you fix all WordPress not sending email issues.
|
42 |
|
43 |
+
WP Mail SMTP plugin includes many different SMTP setup options:
|
44 |
|
45 |
1. Mailgun SMTP
|
46 |
2. SendGrid SMTP
|
47 |
3. Gmail SMTP
|
48 |
+
4. Microsoft SMTP (Outlook.com and Office 365) <a href="https://wpmailsmtp.com/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion&utm_content=readme" rel="friend">[Pro]</a>
|
49 |
+
5. Amazon SES SMTP <a href="https://wpmailsmtp.com/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion&utm_content=readme" rel="friend">[Pro]</a>
|
50 |
4. All Other SMTP
|
51 |
|
52 |
For all options, you can specify the "from name" and "email address" for outgoing emails.
|
77 |
|
78 |
Read our <a href="https://wpforms.com/fix-wordpress-email-notifications-with-sendgrid/" rel="friend">SendGrid documentation</a> for more details.
|
79 |
|
80 |
+
= Microsoft SMTP (Outlook.com and Office 365) =
|
81 |
+
|
82 |
+
Many business use Outlook.com or Office 365 to their to power their email. For those users, the Microsoft mailer can be a great option. This integration allows you to use your existing Outlook.com or Office 365 account to send your emails reliably.
|
83 |
+
|
84 |
+
= Amazon SES SMTP =
|
85 |
+
|
86 |
+
Advanced or technical users can harness the power of Amazon AWS (Amazon Web Services) with the Amazon SES mailer. With this integration, you can send a high volume of emails at a very reasonable rate.
|
87 |
+
|
88 |
= Other SMTP =
|
89 |
|
90 |
WP Mail SMTP plugin also works with all major email services such as Gmail, Yahoo, Outlook, Microsoft Live, and any other email sending service that offers SMTP.
|
97 |
* Choose to use SMTP authentication or not.
|
98 |
* Specify an SMTP username and password.
|
99 |
|
|
|
|
|
100 |
To see recommended settings for the popular services as well as troubleshooting tips, check out our <a href="https://wpforms.com/docs/how-to-set-up-smtp-using-the-wp-mail-smtp-plugin/" rel="friend">SMTP documentation</a>.
|
101 |
|
102 |
+
We hope that you find WP Mail SMTP plugin helpful!
|
103 |
+
|
104 |
+
### WP Mail SMTP PRO
|
105 |
+
|
106 |
+
In addition to native Microsoft and Amazon SES integrations, WP Mail SMTP Pro provides access to many other powerful features and services.
|
107 |
+
|
108 |
+
<a href="https://wpmailsmtp.com/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion&utm_content=readme" rel="friend">Click here to purchase WP Mail SMTP Pro now!</a>
|
109 |
+
|
110 |
+
= Email Log =
|
111 |
+
|
112 |
+
Email Logging lets you log and view all emails sent from your site. Email logs are helpful for storing emails for your records, auditing outgoing emails, and debugging during site development.
|
113 |
+
|
114 |
+
= Manage WordPress Emails and Notifications =
|
115 |
|
116 |
+
The Manage Notification feature gives you full control over which email notifications WordPress sends. This means you can disable different WordPress notification emails. Don't want to receive emails when new users are created? No problem, turn it off.
|
117 |
+
|
118 |
+
= Expert Support =
|
119 |
+
|
120 |
+
We provide <a href="https://wordpress.org/support/topic/wp-mail-smtp-support-policy/">limited support</a> for the WP Mail SMTP plugin on the WordPress.org forums. Access to our world class one-on-one email support is available to <a href="https://wpmailsmtp.com/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion&utm_content=readme" rel="friend">WP Mail SMTP Pro</a> users.
|
121 |
+
|
122 |
+
= White Glove Setup =
|
123 |
+
|
124 |
+
Our White Glove Setup service is a great option that anyone can benefit from. Whether you don't have the time or maybe you feel a bit in over your head - we've got you covered.
|
125 |
+
|
126 |
+
You can sit back and relax while we set up everything for you. White glove setup includes WP Mail SMTP plugin installation and setup, configuration adjustments to your DNS for proper email domain name verification, Mailgun setup, and final testing to confirm everything is passing with flying colors.
|
127 |
+
|
128 |
+
### Security
|
129 |
+
|
130 |
+
The WP Mail SMTP team takes security very seriously. Not only does the plugin follow all security best practices, but we have several options available to ensure your site is safe and secure.
|
131 |
+
|
132 |
+
- Direct SMTP mailer integrations (recommended), such as Google and Mailgun, use the official provider APIs. This means you never enter your username or password in the plugin settings and these credentials are not stored in the database. Instead, we use tokens or API keys which are much more secure.
|
133 |
+
|
134 |
+
- When using Other SMTP mailer, we provide the option to insert your password in your `wp-config.php` file, so it's not visible in your WordPress settings or saved in the database.
|
135 |
+
|
136 |
+
### Credits
|
137 |
|
138 |
WP Mail SMTP plugin was originally created by Callum Macdonald. It is now owned and maintained by the team behind <a href="https://wpforms.com/" rel="friend">WPForms</a> - the best drag & drop form builder for WordPress.
|
139 |
|
140 |
You can try the <a href="https://wordpress.org/plugins/wpforms-lite/" rel="friend">free version of WPForms plugin</a> to see why it's the best in the market.
|
141 |
|
142 |
+
### What's Next
|
143 |
|
144 |
+
If you like this plugin, then consider checking out our other projects:
|
145 |
|
146 |
+
* <a href="https://optinmonster.com/" rel="friend" title="OptinMonster">OptinMonster</a> - Get More Email Subscribers with the most popular conversion optimization plugin for WordPress.
|
147 |
+
* <a href="https://www.monsterinsights.com/" rel="friend" title="MonsterInsights">MonsterInsights</a> - See the Stats that Matter and Grow Your Business with Confidence. Best Google Analytics Plugin for WordPress.
|
148 |
+
* <a href="https://www.seedprod.com/" rel="friend" title="SeedProd">SeedProd</a> - Jumpstart your website with the #1 Coming Soon & Maintenance Mode Plugin for WordPress.
|
149 |
|
150 |
Visit <a href="http://www.wpbeginner.com/" rel="friend" title="WPBeginner">WPBeginner</a> to learn from our <a href="http://www.wpbeginner.com/category/wp-tutorials/" rel="friend" title="WordPress Tutorials">WordPress Tutorials</a> and find out about other <a href="http://www.wpbeginner.com/category/plugins/" rel="friend" title="Best WordPress Plugins">best WordPress plugins</a>.
|
151 |
|
155 |
2. Activate WP Mail SMTP by WPForms.
|
156 |
3. Navigate to the Settings area of WP Mail SMTP in the WordPress admin.
|
157 |
4. Choose your SMTP option (Mailgun SMTP, SendGrid SMTP, Gmail SMTP, or Other SMTP) and follow the instructions to set it up.
|
158 |
+
5. Need more help? Get support with <a href="https://wpmailsmtp.com/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion&utm_content=readme" rel="friend" title="WPForms">WP Mail SMTP PRO</a>.
|
159 |
|
160 |
== Frequently Asked Questions ==
|
161 |
|
169 |
|
170 |
Please read <a href="https://wordpress.org/support/topic/wp-mail-smtp-support-policy/">our support policy</a> for more information.
|
171 |
|
172 |
+
Limited support is available for WP Mail SMTP users via WordPress.org support forums.
|
173 |
+
|
174 |
+
Email support and set up assistance is available to WP Mail SMTP Pro users.
|
175 |
+
|
176 |
= I found a bug, now what? =
|
177 |
|
178 |
If you've stumbled upon a bug, the best place to report it is in the <a href="https://github.com/awesomemotive/wp-mail-smtp">WP Mail SMTP GitHub repository</a>. GitHub is where the plugin is actively developed, and posting there will get your issue quickly seen by our developers (myself and Slava). Once posted, we'll review your bug report and triage the bug. When creating an issue, the more details you can add to your report, the faster the bug can be solved.
|
182 |
Short answer: maybe.
|
183 |
|
184 |
By all means please contact us to discuss features or options you'd like to see added to the plugin. We can't guarantee to add all of them, but we will consider all sensible requests. We can be contacted here:
|
185 |
+
<a href="https://wpmailsmtp.com/contact/" rel="friend">https://wpmailsmtp.com/contact/</a>
|
186 |
|
187 |
== Screenshots ==
|
188 |
|
195 |
|
196 |
== Changelog ==
|
197 |
|
198 |
+
= 1.5.0 - 2019-07-09 =
|
199 |
+
* Added: Loсo plugin support.
|
200 |
+
* Added: "About us" admin area page.
|
201 |
+
* Added: Display in debug output a possible conflicting plugin existence.
|
202 |
+
* Added: Lots of actions and filters to improve flexibility of the plugin.
|
203 |
+
* Changed: Plugin menu is now top level.
|
204 |
+
* Changed: Hide secrets/API keys in page DOM in plugin admin area.
|
205 |
+
* Changed: Do not save constant values into the database when plugin settings are saved.
|
206 |
+
* Changed: Lots of i18n improvements to support translation for both free and paid version of the plugin.
|
207 |
+
* Changed: Gmail mailer - allow to change From Name email header.
|
208 |
+
* Changed: Gmail mailer - display email used to create a connection.
|
209 |
+
* Changed: WordPress 4.9 is the minimum WordPress version we support.
|
210 |
+
* Fixed: X-Mailer header should be present in all emails.
|
211 |
+
* Fixed: PHP notices when migrating under certain circumstances from 0.x version of the plugin.
|
212 |
+
* Fixed: Options::get_group() now supports values set via constants.
|
213 |
+
|
214 |
= 1.4.2 - 2019-03-23 =
|
215 |
* Changed: Tested up to WordPress 5.1.x.
|
216 |
* Changed: Removed TGMPA library.
|
src/Admin/Area.php
CHANGED
@@ -13,20 +13,33 @@ use WPMailSMTP\Options;
|
|
13 |
class Area {
|
14 |
|
15 |
/**
|
|
|
|
|
16 |
* @var string Slug of the admin area page.
|
17 |
*/
|
18 |
const SLUG = 'wp-mail-smtp';
|
19 |
|
20 |
/**
|
|
|
|
|
21 |
* @var string Admin page unique hook.
|
22 |
*/
|
23 |
public $hook;
|
24 |
|
25 |
/**
|
|
|
|
|
26 |
* @var PageAbstract[]
|
27 |
*/
|
28 |
private $pages;
|
29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
/**
|
31 |
* Area constructor.
|
32 |
*
|
@@ -81,13 +94,17 @@ class Area {
|
|
81 |
*/
|
82 |
public function display_custom_auth_notices() {
|
83 |
|
84 |
-
$error = isset( $_GET['error'] ) ? $_GET['error'] : '';
|
85 |
-
$success = isset( $_GET['success'] ) ? $_GET['success'] : '';
|
86 |
|
87 |
if ( empty( $error ) && empty( $success ) ) {
|
88 |
return;
|
89 |
}
|
90 |
|
|
|
|
|
|
|
|
|
91 |
switch ( $error ) {
|
92 |
case 'google_access_denied':
|
93 |
WP::add_admin_notice(
|
@@ -98,6 +115,7 @@ class Area {
|
|
98 |
break;
|
99 |
|
100 |
case 'google_no_code_scope':
|
|
|
101 |
WP::add_admin_notice(
|
102 |
esc_html__( 'There was an error while processing the authentication request. Please try again.', 'wp-mail-smtp' ),
|
103 |
WP::ADMIN_NOTICE_ERROR
|
@@ -115,7 +133,13 @@ class Area {
|
|
115 |
switch ( $success ) {
|
116 |
case 'google_site_linked':
|
117 |
WP::add_admin_notice(
|
118 |
-
esc_html__( 'You have successfully linked the current site with your Google API project. Now you can start sending emails through
|
|
|
|
|
|
|
|
|
|
|
|
|
119 |
WP::ADMIN_NOTICE_SUCCESS
|
120 |
);
|
121 |
break;
|
@@ -134,8 +158,8 @@ class Area {
|
|
134 |
return;
|
135 |
}
|
136 |
|
137 |
-
$default_options =
|
138 |
-
$current_options =
|
139 |
|
140 |
// Check if the current settings are the same as the default settings.
|
141 |
if ( $current_options !== $default_options ) {
|
@@ -165,44 +189,154 @@ class Area {
|
|
165 |
* Add admin area menu item.
|
166 |
*
|
167 |
* @since 1.0.0
|
|
|
168 |
*/
|
169 |
public function add_admin_options_page() {
|
170 |
|
171 |
-
$this->hook =
|
172 |
-
esc_html__( 'WP Mail SMTP
|
173 |
-
esc_html__( 'WP Mail SMTP', 'wp-mail-smtp' ),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
174 |
'manage_options',
|
175 |
self::SLUG,
|
176 |
array( $this, 'display' )
|
177 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
}
|
179 |
|
180 |
/**
|
181 |
* Enqueue admin area scripts and styles.
|
182 |
*
|
183 |
* @since 1.0.0
|
|
|
184 |
*
|
185 |
* @param string $hook
|
186 |
*/
|
187 |
public function enqueue_assets( $hook ) {
|
188 |
|
189 |
-
if ( $hook
|
190 |
return;
|
191 |
}
|
192 |
|
193 |
-
|
|
|
194 |
'wp-mail-smtp-admin',
|
195 |
-
wp_mail_smtp()->
|
196 |
false,
|
197 |
WPMS_PLUGIN_VER
|
198 |
);
|
199 |
|
200 |
-
wp_enqueue_script(
|
201 |
'wp-mail-smtp-admin',
|
202 |
-
wp_mail_smtp()->
|
203 |
array( 'jquery' ),
|
204 |
-
WPMS_PLUGIN_VER
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
205 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
206 |
}
|
207 |
|
208 |
/**
|
@@ -220,7 +354,7 @@ class Area {
|
|
220 |
|
221 |
<div id="wp-mail-smtp-header">
|
222 |
<!--suppress HtmlUnknownTarget -->
|
223 |
-
<img class="wp-mail-smtp-header-logo" src="<?php echo wp_mail_smtp()->
|
224 |
</div>
|
225 |
|
226 |
<?php
|
@@ -241,8 +375,18 @@ class Area {
|
|
241 |
$url = 'https://wordpress.org/support/plugin/wp-mail-smtp/reviews/?filter=5#new-post';
|
242 |
|
243 |
$text = sprintf(
|
244 |
-
|
245 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
246 |
$url,
|
247 |
$url
|
248 |
);
|
@@ -255,6 +399,7 @@ class Area {
|
|
255 |
* Display content of the admin area page.
|
256 |
*
|
257 |
* @since 1.0.0
|
|
|
258 |
*/
|
259 |
public function display() {
|
260 |
|
@@ -262,48 +407,106 @@ class Area {
|
|
262 |
if ( ! $this->is_admin_page() ) {
|
263 |
return;
|
264 |
}
|
|
|
|
|
265 |
?>
|
266 |
|
267 |
<div class="wrap" id="wp-mail-smtp">
|
268 |
|
269 |
-
<div class="wp-mail-smtp-page-title">
|
270 |
<?php
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
|
|
|
|
|
|
278 |
|
279 |
-
|
|
|
|
|
|
|
280 |
|
281 |
-
|
282 |
-
|
283 |
|
284 |
-
|
285 |
-
|
|
|
286 |
|
287 |
-
|
288 |
-
|
289 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
290 |
</div>
|
291 |
|
292 |
<?php
|
293 |
}
|
294 |
|
295 |
/**
|
296 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
297 |
*
|
298 |
* @since 1.0.0
|
299 |
*/
|
300 |
public function display_current_tab_content() {
|
301 |
|
302 |
-
|
|
|
|
|
303 |
return;
|
304 |
}
|
305 |
|
306 |
-
$
|
307 |
}
|
308 |
|
309 |
/**
|
@@ -317,15 +520,15 @@ class Area {
|
|
317 |
|
318 |
$current = '';
|
319 |
|
320 |
-
if ( $this->is_admin_page() ) {
|
321 |
-
$current = ! empty( $_GET['tab'] ) ? sanitize_key( $_GET['tab'] ) : 'settings';
|
322 |
}
|
323 |
|
324 |
return $current;
|
325 |
}
|
326 |
|
327 |
/**
|
328 |
-
* Get the array of default registered tabs for
|
329 |
*
|
330 |
* @since 1.0.0
|
331 |
*
|
@@ -354,25 +557,63 @@ class Area {
|
|
354 |
*/
|
355 |
public function get_current_tab_title() {
|
356 |
|
357 |
-
|
|
|
|
|
358 |
return '';
|
359 |
}
|
360 |
|
361 |
-
return $
|
362 |
}
|
363 |
|
364 |
/**
|
365 |
* Check whether we are on an admin page.
|
366 |
*
|
367 |
* @since 1.0.0
|
|
|
|
|
|
|
368 |
*
|
369 |
* @return bool
|
370 |
*/
|
371 |
-
public function is_admin_page() {
|
|
|
|
|
|
|
|
|
372 |
|
373 |
-
|
|
|
374 |
|
375 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
376 |
}
|
377 |
|
378 |
/**
|
@@ -382,13 +623,15 @@ class Area {
|
|
382 |
*/
|
383 |
public function process_actions() {
|
384 |
|
385 |
-
// Bail if we're not on a plugin page.
|
386 |
-
if ( ! $this->is_admin_page() ) {
|
387 |
return;
|
388 |
}
|
389 |
|
|
|
|
|
390 |
// Allow to process only own tabs.
|
391 |
-
if ( ! array_key_exists( $this->get_current_tab(), $
|
392 |
return;
|
393 |
}
|
394 |
|
@@ -400,27 +643,47 @@ class Area {
|
|
400 |
$post = array();
|
401 |
}
|
402 |
|
403 |
-
$
|
404 |
}
|
405 |
|
406 |
// This won't do anything for most pages.
|
407 |
-
|
|
|
408 |
}
|
409 |
|
410 |
/**
|
411 |
* Process all AJAX requests.
|
412 |
*
|
413 |
* @since 1.3.0
|
|
|
414 |
*/
|
415 |
public function process_ajax() {
|
416 |
|
417 |
-
$task = sanitize_key( $_POST['task'] );
|
418 |
$data = array();
|
419 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
420 |
switch ( $task ) {
|
421 |
-
case '
|
422 |
-
update_user_meta( get_current_user_id(), '
|
423 |
-
$data['message'] = esc_html__( '
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
424 |
break;
|
425 |
|
426 |
default:
|
@@ -442,6 +705,7 @@ class Area {
|
|
442 |
* Add a link to Settings page of a plugin on Plugins page.
|
443 |
*
|
444 |
* @since 1.0.0
|
|
|
445 |
*
|
446 |
* @param array $links
|
447 |
* @param string $file
|
@@ -450,13 +714,15 @@ class Area {
|
|
450 |
*/
|
451 |
public function add_plugin_action_link( $links, $file ) {
|
452 |
|
|
|
453 |
if ( strpos( $file, 'wp-mail-smtp' ) === false ) {
|
454 |
return $links;
|
455 |
}
|
456 |
|
457 |
-
$settings_link = '<a href="' . $this->get_admin_page_url() . '">' . esc_html__( 'Settings', 'wp-mail-smtp' ) . '</a>';
|
|
|
458 |
|
459 |
-
array_unshift( $links, $settings_link );
|
460 |
|
461 |
return $links;
|
462 |
}
|
@@ -466,13 +732,20 @@ class Area {
|
|
466 |
*
|
467 |
* @since 1.0.0
|
468 |
*
|
|
|
|
|
469 |
* @return string
|
470 |
*/
|
471 |
-
public function get_admin_page_url() {
|
|
|
|
|
|
|
|
|
|
|
472 |
return add_query_arg(
|
473 |
'page',
|
474 |
-
|
475 |
-
admin_url( '
|
476 |
);
|
477 |
}
|
478 |
|
@@ -483,7 +756,7 @@ class Area {
|
|
483 |
*/
|
484 |
public function hide_unrelated_notices() {
|
485 |
|
486 |
-
// Bail if we're not on
|
487 |
if ( empty( $_REQUEST['page'] ) || strpos( $_REQUEST['page'], self::SLUG ) === false ) {
|
488 |
return;
|
489 |
}
|
13 |
class Area {
|
14 |
|
15 |
/**
|
16 |
+
* @since 1.0.0
|
17 |
+
*
|
18 |
* @var string Slug of the admin area page.
|
19 |
*/
|
20 |
const SLUG = 'wp-mail-smtp';
|
21 |
|
22 |
/**
|
23 |
+
* @since 1.0.0
|
24 |
+
*
|
25 |
* @var string Admin page unique hook.
|
26 |
*/
|
27 |
public $hook;
|
28 |
|
29 |
/**
|
30 |
+
* @since 1.0.0
|
31 |
+
*
|
32 |
* @var PageAbstract[]
|
33 |
*/
|
34 |
private $pages;
|
35 |
|
36 |
+
/**
|
37 |
+
* @since 1.5.0
|
38 |
+
*
|
39 |
+
* @var array List of official registered pages.
|
40 |
+
*/
|
41 |
+
public static $pages_registered = array( 'general', 'logs', 'about' );
|
42 |
+
|
43 |
/**
|
44 |
* Area constructor.
|
45 |
*
|
94 |
*/
|
95 |
public function display_custom_auth_notices() {
|
96 |
|
97 |
+
$error = isset( $_GET['error'] ) ? sanitize_key( $_GET['error'] ) : ''; // phpcs:ignore
|
98 |
+
$success = isset( $_GET['success'] ) ? sanitize_key( $_GET['success'] ) : ''; // phpcs:ignore
|
99 |
|
100 |
if ( empty( $error ) && empty( $success ) ) {
|
101 |
return;
|
102 |
}
|
103 |
|
104 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
105 |
+
return;
|
106 |
+
}
|
107 |
+
|
108 |
switch ( $error ) {
|
109 |
case 'google_access_denied':
|
110 |
WP::add_admin_notice(
|
115 |
break;
|
116 |
|
117 |
case 'google_no_code_scope':
|
118 |
+
case 'microsoft_no_code':
|
119 |
WP::add_admin_notice(
|
120 |
esc_html__( 'There was an error while processing the authentication request. Please try again.', 'wp-mail-smtp' ),
|
121 |
WP::ADMIN_NOTICE_ERROR
|
133 |
switch ( $success ) {
|
134 |
case 'google_site_linked':
|
135 |
WP::add_admin_notice(
|
136 |
+
esc_html__( 'You have successfully linked the current site with your Google API project. Now you can start sending emails through Gmail.', 'wp-mail-smtp' ),
|
137 |
+
WP::ADMIN_NOTICE_SUCCESS
|
138 |
+
);
|
139 |
+
break;
|
140 |
+
case 'microsoft_site_linked':
|
141 |
+
WP::add_admin_notice(
|
142 |
+
esc_html__( 'You have successfully linked the current site with your Microsoft API project. Now you can start sending emails through Outlook.', 'wp-mail-smtp' ),
|
143 |
WP::ADMIN_NOTICE_SUCCESS
|
144 |
);
|
145 |
break;
|
158 |
return;
|
159 |
}
|
160 |
|
161 |
+
$default_options = wp_json_encode( Options::get_defaults() );
|
162 |
+
$current_options = wp_json_encode( Options::init()->get_all() );
|
163 |
|
164 |
// Check if the current settings are the same as the default settings.
|
165 |
if ( $current_options !== $default_options ) {
|
189 |
* Add admin area menu item.
|
190 |
*
|
191 |
* @since 1.0.0
|
192 |
+
* @since 1.5.0 Moved the menu to the top level. Added several more pages.
|
193 |
*/
|
194 |
public function add_admin_options_page() {
|
195 |
|
196 |
+
$this->hook = \add_menu_page(
|
197 |
+
\esc_html__( 'WP Mail SMTP', 'wp-mail-smtp' ),
|
198 |
+
\esc_html__( 'WP Mail SMTP', 'wp-mail-smtp' ),
|
199 |
+
'manage_options',
|
200 |
+
self::SLUG,
|
201 |
+
array( $this, 'display' ),
|
202 |
+
'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9IiM5ZWEzYTgiIHdpZHRoPSI2NCIgaGVpZ2h0PSI2NCIgdmlld0JveD0iMCAwIDQzIDM0Ij48cGF0aCBkPSJNMC4wMDcsMy41ODVWMjAuNDIxcTAsMy41ODYsMy43NTEsMy41ODVMMjAsMjRWMTlIMzBWMTQuMDE0bDAuOTkxLTFMMzQsMTNWMy41ODVRMzQsMCwzMC4yNDksMEgzLjc1OFEwLjAwNywwLC4wMDcsMy41ODVoMFpNMy41MjQsNi4xNTdhMS40OSwxLjQ5LDAsMCwxLS41MDgtMC45MzUsMS41ODEsMS41ODEsMCwwLDEsLjI3NC0xLjIwOCwxLjQ0OSwxLjQ0OSwwLDAsMSwxLjA5NC0uNjYzLDEuNzU2LDEuNzU2LDAsMCwxLDEuMjUuMzEybDExLjQwOSw3LjcxNkwyOC4zNzQsMy42NjNhMS45NiwxLjk2LDAsMCwxLDEuMjg5LS4zMTIsMS41NDYsMS41NDYsMCwwLDEsMS4wOTQuNjYzLDEuNCwxLjQsMCwwLDEsLjI3MywxLjIwOCwxLjY3LDEuNjcsMCwwLDEtLjU0Ny45MzVMMTcuMDQzLDE3LjIyNVoiLz48cGF0aCBkPSJNMjIsMjhIMzJsLTAuMDA5LDQuNjI0YTEuMTI2LDEuMTI2LDAsMCwwLDEuOTIyLjhsOC4yNS04LjIzNmExLjEyNiwxLjEyNiwwLDAsMCwwLTEuNTk0bC04LjI1LTguMjQxYTEuMTI2LDEuMTI2LDAsMCwwLTEuOTIyLjh2NC44NjZMMjIsMjF2N1oiLz48L3N2Zz4=',
|
203 |
+
98
|
204 |
+
);
|
205 |
+
|
206 |
+
\add_submenu_page(
|
207 |
+
self::SLUG,
|
208 |
+
$this->get_current_tab_title() . ' ‹ ' . \esc_html__( 'Settings', 'wp-mail-smtp' ),
|
209 |
+
\esc_html__( 'Settings', 'wp-mail-smtp' ),
|
210 |
'manage_options',
|
211 |
self::SLUG,
|
212 |
array( $this, 'display' )
|
213 |
);
|
214 |
+
\add_submenu_page(
|
215 |
+
self::SLUG,
|
216 |
+
\esc_html__( 'Email Log', 'wp-mail-smtp' ),
|
217 |
+
\esc_html__( 'Email Log', 'wp-mail-smtp' ),
|
218 |
+
'manage_options',
|
219 |
+
self::SLUG . '-logs',
|
220 |
+
array( $this, 'display' )
|
221 |
+
);
|
222 |
+
\add_submenu_page(
|
223 |
+
self::SLUG,
|
224 |
+
\esc_html__( 'About Us', 'wp-mail-smtp' ),
|
225 |
+
\esc_html__( 'About Us', 'wp-mail-smtp' ),
|
226 |
+
'manage_options',
|
227 |
+
self::SLUG . '-about',
|
228 |
+
array( $this, 'display' )
|
229 |
+
);
|
230 |
}
|
231 |
|
232 |
/**
|
233 |
* Enqueue admin area scripts and styles.
|
234 |
*
|
235 |
* @since 1.0.0
|
236 |
+
* @since 1.5.0 Added ajax tasks for plugin installation/activation.
|
237 |
*
|
238 |
* @param string $hook
|
239 |
*/
|
240 |
public function enqueue_assets( $hook ) {
|
241 |
|
242 |
+
if ( strpos( $hook, self::SLUG ) === false ) {
|
243 |
return;
|
244 |
}
|
245 |
|
246 |
+
// General styles and js.
|
247 |
+
\wp_enqueue_style(
|
248 |
'wp-mail-smtp-admin',
|
249 |
+
\wp_mail_smtp()->assets_url . '/css/smtp-admin.min.css',
|
250 |
false,
|
251 |
WPMS_PLUGIN_VER
|
252 |
);
|
253 |
|
254 |
+
\wp_enqueue_script(
|
255 |
'wp-mail-smtp-admin',
|
256 |
+
\wp_mail_smtp()->assets_url . '/js/smtp-admin' . WP::asset_min() . '.js',
|
257 |
array( 'jquery' ),
|
258 |
+
WPMS_PLUGIN_VER,
|
259 |
+
false
|
260 |
+
);
|
261 |
+
|
262 |
+
\wp_localize_script(
|
263 |
+
'wp-mail-smtp-admin',
|
264 |
+
'wp_mail_smtp',
|
265 |
+
array(
|
266 |
+
'text_provider_remove' => esc_html__( 'Are you sure you want to reset the current provider connection? You will need to immediately create a new one to be able to send emails.', 'wp-mail-smtp' ),
|
267 |
+
)
|
268 |
);
|
269 |
+
|
270 |
+
/*
|
271 |
+
* Logs page.
|
272 |
+
*/
|
273 |
+
if ( $this->is_admin_page( 'logs' ) ) {
|
274 |
+
\wp_enqueue_style(
|
275 |
+
'wp-mail-smtp-admin-logs',
|
276 |
+
apply_filters( 'wp_mail_smtp_admin_enqueue_assets_logs_css', \wp_mail_smtp()->assets_url . '/css/smtp-logs.min.css' ),
|
277 |
+
array( 'wp-mail-smtp-admin' ),
|
278 |
+
WPMS_PLUGIN_VER
|
279 |
+
);
|
280 |
+
|
281 |
+
\wp_enqueue_script(
|
282 |
+
'wp-mail-smtp-admin-logs',
|
283 |
+
apply_filters( 'wp_mail_smtp_admin_enqueue_assets_logs_js', '' ),
|
284 |
+
array( 'wp-mail-smtp-admin' ),
|
285 |
+
WPMS_PLUGIN_VER,
|
286 |
+
false
|
287 |
+
);
|
288 |
+
}
|
289 |
+
|
290 |
+
/*
|
291 |
+
* About page.
|
292 |
+
*/
|
293 |
+
if ( $this->is_admin_page( 'about' ) ) {
|
294 |
+
|
295 |
+
\wp_enqueue_style(
|
296 |
+
'wp-mail-smtp-admin-about',
|
297 |
+
\wp_mail_smtp()->assets_url . '/css/smtp-about.min.css',
|
298 |
+
array( 'wp-mail-smtp-admin' ),
|
299 |
+
WPMS_PLUGIN_VER
|
300 |
+
);
|
301 |
+
|
302 |
+
\wp_enqueue_script(
|
303 |
+
'wp-mail-smtp-admin-about',
|
304 |
+
\wp_mail_smtp()->assets_url . '/js/smtp-about' . WP::asset_min() . '.js',
|
305 |
+
array( 'wp-mail-smtp-admin' ),
|
306 |
+
'0.7.2',
|
307 |
+
false
|
308 |
+
);
|
309 |
+
|
310 |
+
$settings = array(
|
311 |
+
'ajax_url' => \admin_url( 'admin-ajax.php' ),
|
312 |
+
'nonce' => \wp_create_nonce( 'wp-mail-smtp-about' ),
|
313 |
+
// Strings.
|
314 |
+
'plugin_activate' => \esc_html__( 'Activate', 'wp-mail-smtp' ),
|
315 |
+
'plugin_activated' => \esc_html__( 'Activated', 'wp-mail-smtp' ),
|
316 |
+
'plugin_active' => \esc_html__( 'Active', 'wp-mail-smtp' ),
|
317 |
+
'plugin_inactive' => \esc_html__( 'Inactive', 'wp-mail-smtp' ),
|
318 |
+
'plugin_processing' => \esc_html__( 'Processing...', 'wp-mail-smtp' ),
|
319 |
+
'plugin_install_error' => \esc_html__( 'Could not install a plugin. Please download from WordPress.org and install manually.', 'wp-mail-smtp' ),
|
320 |
+
'plugin_install_activate_btn' => \esc_html__( 'Install and Activate', 'wp-mail-smtp' ),
|
321 |
+
'plugin_activate_btn' => \esc_html__( 'Activate', 'wp-mail-smtp' ),
|
322 |
+
);
|
323 |
+
|
324 |
+
\wp_localize_script(
|
325 |
+
'wp-mail-smtp-admin-about',
|
326 |
+
'wp_mail_smtp_about',
|
327 |
+
$settings
|
328 |
+
);
|
329 |
+
|
330 |
+
\wp_enqueue_script(
|
331 |
+
'wp-mail-smtp-admin-about-matchheight',
|
332 |
+
\wp_mail_smtp()->assets_url . '/js/jquery.matchHeight.min.js',
|
333 |
+
array( 'wp-mail-smtp-admin' ),
|
334 |
+
'0.7.2',
|
335 |
+
false
|
336 |
+
);
|
337 |
+
}
|
338 |
+
|
339 |
+
do_action( 'wp_mail_smtp_admin_area_enqueue_assets', $hook );
|
340 |
}
|
341 |
|
342 |
/**
|
354 |
|
355 |
<div id="wp-mail-smtp-header">
|
356 |
<!--suppress HtmlUnknownTarget -->
|
357 |
+
<img class="wp-mail-smtp-header-logo" src="<?php echo esc_url( wp_mail_smtp()->assets_url ); ?>/images/logo.svg" alt="WP Mail SMTP"/>
|
358 |
</div>
|
359 |
|
360 |
<?php
|
375 |
$url = 'https://wordpress.org/support/plugin/wp-mail-smtp/reviews/?filter=5#new-post';
|
376 |
|
377 |
$text = sprintf(
|
378 |
+
wp_kses(
|
379 |
+
/* translators: %1$s - WP.org link; %2$s - same WP.org link. */
|
380 |
+
__( 'Please rate <strong>WP Mail SMTP</strong> <a href="%1$s" target="_blank" rel="noopener noreferrer">★★★★★</a> on <a href="%2$s" target="_blank" rel="noopener noreferrer">WordPress.org</a> to help us spread the word. Thank you from the WP Mail SMTP team!', 'wp-mail-smtp' ),
|
381 |
+
array(
|
382 |
+
'strong' => array(),
|
383 |
+
'a' => array(
|
384 |
+
'href' => array(),
|
385 |
+
'target' => array(),
|
386 |
+
'rel' => array(),
|
387 |
+
),
|
388 |
+
)
|
389 |
+
),
|
390 |
$url,
|
391 |
$url
|
392 |
);
|
399 |
* Display content of the admin area page.
|
400 |
*
|
401 |
* @since 1.0.0
|
402 |
+
* @since 1.5.0 Rewrite to distinguish between General tabs and separate pages.
|
403 |
*/
|
404 |
public function display() {
|
405 |
|
407 |
if ( ! $this->is_admin_page() ) {
|
408 |
return;
|
409 |
}
|
410 |
+
|
411 |
+
$page = ! empty( $_GET['page'] ) ? \sanitize_key( $_GET['page'] ) : ''; // phpcs:ignore
|
412 |
?>
|
413 |
|
414 |
<div class="wrap" id="wp-mail-smtp">
|
415 |
|
|
|
416 |
<?php
|
417 |
+
switch ( $page ) {
|
418 |
+
case self::SLUG:
|
419 |
+
?>
|
420 |
+
|
421 |
+
<div class="wp-mail-smtp-page wp-mail-smtp-page-general wp-mail-smtp-tab-<?php echo esc_attr( $this->get_current_tab() ); ?>">
|
422 |
+
<?php $this->display_tabs(); ?>
|
423 |
+
</div>
|
424 |
+
|
425 |
+
<?php
|
426 |
+
break;
|
427 |
|
428 |
+
case self::SLUG . '-logs':
|
429 |
+
$logs_class = apply_filters( 'wp_mail_smtp_admin_display_get_logs_fqcn', '\WPMailSMTP\Admin\Pages\Logs' );
|
430 |
+
/** @var \WPMailSMTP\Admin\PageAbstract $logs */
|
431 |
+
$logs = new $logs_class();
|
432 |
|
433 |
+
$is_archive = wp_mail_smtp()->is_pro() && wp_mail_smtp()->pro->get_logs()->is_archive();
|
434 |
+
?>
|
435 |
|
436 |
+
<div class="wp-mail-smtp-page wp-mail-smtp-page-logs <?php echo $is_archive ? 'wp-mail-smtp-page-logs-archive' : 'wp-mail-smtp-page-logs-single'; ?>">
|
437 |
+
<?php $logs->display(); ?>
|
438 |
+
</div>
|
439 |
|
440 |
+
<?php
|
441 |
+
break;
|
442 |
|
443 |
+
case self::SLUG . '-about':
|
444 |
+
$about = new Pages\About();
|
445 |
+
?>
|
446 |
+
|
447 |
+
<div class="wp-mail-smtp-page wp-mail-smtp-page-about wp-mail-smtp-tab-about-<?php echo \esc_attr( $about->get_current_tab() ); ?>">
|
448 |
+
<?php $about->display(); ?>
|
449 |
+
</div>
|
450 |
+
|
451 |
+
<?php
|
452 |
+
break;
|
453 |
+
}
|
454 |
+
?>
|
455 |
</div>
|
456 |
|
457 |
<?php
|
458 |
}
|
459 |
|
460 |
/**
|
461 |
+
* Display General page tabs.
|
462 |
+
*
|
463 |
+
* @since 1.5.0
|
464 |
+
*/
|
465 |
+
protected function display_tabs() {
|
466 |
+
?>
|
467 |
+
|
468 |
+
<div class="wp-mail-smtp-page-title">
|
469 |
+
<?php
|
470 |
+
foreach ( $this->get_pages() as $page_slug => $page ) :
|
471 |
+
$label = $page->get_label();
|
472 |
+
if ( empty( $label ) ) {
|
473 |
+
continue;
|
474 |
+
}
|
475 |
+
$class = $page_slug === $this->get_current_tab() ? 'active' : '';
|
476 |
+
?>
|
477 |
+
|
478 |
+
<a href="<?php echo esc_url( $page->get_link() ); ?>" class="tab <?php echo esc_attr( $class ); ?>">
|
479 |
+
<?php echo esc_html( $label ); ?>
|
480 |
+
</a>
|
481 |
+
|
482 |
+
<?php endforeach; ?>
|
483 |
+
</div>
|
484 |
+
|
485 |
+
<div class="wp-mail-smtp-page-content">
|
486 |
+
<h1 class="screen-reader-text">
|
487 |
+
<?php echo esc_html( $this->get_current_tab_title() ); ?>
|
488 |
+
</h1>
|
489 |
+
|
490 |
+
<?php $this->display_current_tab_content(); ?>
|
491 |
+
</div>
|
492 |
+
|
493 |
+
<?php
|
494 |
+
}
|
495 |
+
|
496 |
+
/**
|
497 |
+
* Get the current tab content.
|
498 |
*
|
499 |
* @since 1.0.0
|
500 |
*/
|
501 |
public function display_current_tab_content() {
|
502 |
|
503 |
+
$pages = $this->get_pages();
|
504 |
+
|
505 |
+
if ( ! array_key_exists( $this->get_current_tab(), $pages ) ) {
|
506 |
return;
|
507 |
}
|
508 |
|
509 |
+
$pages[ $this->get_current_tab() ]->display();
|
510 |
}
|
511 |
|
512 |
/**
|
520 |
|
521 |
$current = '';
|
522 |
|
523 |
+
if ( $this->is_admin_page( 'general' ) ) {
|
524 |
+
$current = ! empty( $_GET['tab'] ) ? sanitize_key( $_GET['tab'] ) : 'settings'; // phpcs:ignore
|
525 |
}
|
526 |
|
527 |
return $current;
|
528 |
}
|
529 |
|
530 |
/**
|
531 |
+
* Get the array of default registered tabs for General page admin area.
|
532 |
*
|
533 |
* @since 1.0.0
|
534 |
*
|
557 |
*/
|
558 |
public function get_current_tab_title() {
|
559 |
|
560 |
+
$pages = $this->get_pages();
|
561 |
+
|
562 |
+
if ( ! array_key_exists( $this->get_current_tab(), $pages ) ) {
|
563 |
return '';
|
564 |
}
|
565 |
|
566 |
+
return $pages[ $this->get_current_tab() ]->get_title();
|
567 |
}
|
568 |
|
569 |
/**
|
570 |
* Check whether we are on an admin page.
|
571 |
*
|
572 |
* @since 1.0.0
|
573 |
+
* @since 1.5.0 Added support for new pages.
|
574 |
+
*
|
575 |
+
* @param array|string $slug ID(s) of a plugin page. Possible values: 'general', 'logs', 'about' or array of them.
|
576 |
*
|
577 |
* @return bool
|
578 |
*/
|
579 |
+
public function is_admin_page( $slug = array() ) {
|
580 |
+
|
581 |
+
$cur_page = isset( $_GET['page'] ) ? sanitize_key( $_GET['page'] ) : ''; // phpcs:ignore
|
582 |
+
$check = self::SLUG;
|
583 |
+
$pages_equal = false;
|
584 |
|
585 |
+
if ( is_string( $slug ) ) {
|
586 |
+
$slug = sanitize_key( $slug );
|
587 |
|
588 |
+
if (
|
589 |
+
in_array( $slug, self::$pages_registered, true ) &&
|
590 |
+
$slug !== 'general'
|
591 |
+
) {
|
592 |
+
$check = self::SLUG . '-' . $slug;
|
593 |
+
}
|
594 |
+
|
595 |
+
$pages_equal = $cur_page === $check;
|
596 |
+
} elseif ( is_array( $slug ) ) {
|
597 |
+
if ( empty( $slug ) ) {
|
598 |
+
$slug = array_map( function ( $v ) {
|
599 |
+
if ( $v === 'general' ) {
|
600 |
+
return Area::SLUG;
|
601 |
+
}
|
602 |
+
return Area::SLUG . '-' . $v;
|
603 |
+
}, self::$pages_registered );
|
604 |
+
} else {
|
605 |
+
$slug = array_map( function ( $v ) {
|
606 |
+
if ( $v === 'general' ) {
|
607 |
+
return Area::SLUG;
|
608 |
+
}
|
609 |
+
return Area::SLUG . '-' . sanitize_key( $v );
|
610 |
+
}, $slug );
|
611 |
+
}
|
612 |
+
|
613 |
+
$pages_equal = in_array( $cur_page, $slug, true );
|
614 |
+
}
|
615 |
+
|
616 |
+
return is_admin() && $pages_equal;
|
617 |
}
|
618 |
|
619 |
/**
|
623 |
*/
|
624 |
public function process_actions() {
|
625 |
|
626 |
+
// Bail if we're not on a plugin General page.
|
627 |
+
if ( ! $this->is_admin_page( 'general' ) ) {
|
628 |
return;
|
629 |
}
|
630 |
|
631 |
+
$pages = $this->get_pages();
|
632 |
+
|
633 |
// Allow to process only own tabs.
|
634 |
+
if ( ! array_key_exists( $this->get_current_tab(), $pages ) ) {
|
635 |
return;
|
636 |
}
|
637 |
|
643 |
$post = array();
|
644 |
}
|
645 |
|
646 |
+
$pages[ $this->get_current_tab() ]->process_post( $post );
|
647 |
}
|
648 |
|
649 |
// This won't do anything for most pages.
|
650 |
+
// Works for plugin page only, when GET params are allowed.
|
651 |
+
$pages[ $this->get_current_tab() ]->process_auth();
|
652 |
}
|
653 |
|
654 |
/**
|
655 |
* Process all AJAX requests.
|
656 |
*
|
657 |
* @since 1.3.0
|
658 |
+
* @since 1.5.0 Added tasks to process plugins management.
|
659 |
*/
|
660 |
public function process_ajax() {
|
661 |
|
|
|
662 |
$data = array();
|
663 |
|
664 |
+
// Only admins can fire these ajax requests.
|
665 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
666 |
+
wp_send_json_error( $data );
|
667 |
+
}
|
668 |
+
|
669 |
+
if ( empty( $_POST['task'] ) ) { // phpcs:ignore
|
670 |
+
wp_send_json_error( $data );
|
671 |
+
}
|
672 |
+
|
673 |
+
$task = sanitize_key( $_POST['task'] );
|
674 |
+
|
675 |
switch ( $task ) {
|
676 |
+
case 'pro_banner_dismiss':
|
677 |
+
update_user_meta( get_current_user_id(), 'wp_mail_smtp_pro_banner_dismissed', true );
|
678 |
+
$data['message'] = esc_html__( 'WP Mail SMTP Pro related message was successfully dismissed.', 'wp-mail-smtp' );
|
679 |
+
break;
|
680 |
+
|
681 |
+
case 'about_plugin_install':
|
682 |
+
Pages\About::ajax_plugin_install();
|
683 |
+
break;
|
684 |
+
|
685 |
+
case 'about_plugin_activate':
|
686 |
+
Pages\About::ajax_plugin_activate();
|
687 |
break;
|
688 |
|
689 |
default:
|
705 |
* Add a link to Settings page of a plugin on Plugins page.
|
706 |
*
|
707 |
* @since 1.0.0
|
708 |
+
* @since 1.5.0 Added a link to Email Log.
|
709 |
*
|
710 |
* @param array $links
|
711 |
* @param string $file
|
714 |
*/
|
715 |
public function add_plugin_action_link( $links, $file ) {
|
716 |
|
717 |
+
// Will target both pro and lite version of a plugin.
|
718 |
if ( strpos( $file, 'wp-mail-smtp' ) === false ) {
|
719 |
return $links;
|
720 |
}
|
721 |
|
722 |
+
$settings_link = '<a href="' . esc_url( $this->get_admin_page_url() ) . '">' . esc_html__( 'Settings', 'wp-mail-smtp' ) . '</a>';
|
723 |
+
$logs_link = '<a href="' . esc_url( $this->get_admin_page_url( self::SLUG . '-logs' ) ) . '">' . esc_html__( 'Email Log', 'wp-mail-smtp' ) . '</a>';
|
724 |
|
725 |
+
array_unshift( $links, $settings_link, $logs_link );
|
726 |
|
727 |
return $links;
|
728 |
}
|
732 |
*
|
733 |
* @since 1.0.0
|
734 |
*
|
735 |
+
* @param string $page
|
736 |
+
*
|
737 |
* @return string
|
738 |
*/
|
739 |
+
public function get_admin_page_url( $page = '' ) {
|
740 |
+
|
741 |
+
if ( empty( $page ) ) {
|
742 |
+
$page = self::SLUG;
|
743 |
+
}
|
744 |
+
|
745 |
return add_query_arg(
|
746 |
'page',
|
747 |
+
$page,
|
748 |
+
admin_url( 'admin.php' )
|
749 |
);
|
750 |
}
|
751 |
|
756 |
*/
|
757 |
public function hide_unrelated_notices() {
|
758 |
|
759 |
+
// Bail if we're not on our screen or page.
|
760 |
if ( empty( $_REQUEST['page'] ) || strpos( $_REQUEST['page'], self::SLUG ) === false ) {
|
761 |
return;
|
762 |
}
|
src/Admin/PageAbstract.php
CHANGED
@@ -22,7 +22,7 @@ abstract class PageAbstract implements PageInterface {
|
|
22 |
add_query_arg(
|
23 |
'tab',
|
24 |
$this->slug,
|
25 |
-
admin_url( '
|
26 |
)
|
27 |
);
|
28 |
}
|
@@ -63,4 +63,21 @@ abstract class PageAbstract implements PageInterface {
|
|
63 |
public function check_admin_referer() {
|
64 |
check_admin_referer( Area::SLUG . '-' . $this->slug );
|
65 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
}
|
22 |
add_query_arg(
|
23 |
'tab',
|
24 |
$this->slug,
|
25 |
+
admin_url( 'admin.php?page=' . Area::SLUG )
|
26 |
)
|
27 |
);
|
28 |
}
|
63 |
public function check_admin_referer() {
|
64 |
check_admin_referer( Area::SLUG . '-' . $this->slug );
|
65 |
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Save button to be reused on other tabs.
|
69 |
+
*
|
70 |
+
* @since 1.5.0
|
71 |
+
*/
|
72 |
+
public function display_save_btn() {
|
73 |
+
?>
|
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">
|
77 |
+
<?php esc_html_e( 'Save Settings', 'wp-mail-smtp' ); ?>
|
78 |
+
</button>
|
79 |
+
</p>
|
80 |
+
|
81 |
+
<?php
|
82 |
+
}
|
83 |
}
|
src/Admin/Pages/About.php
ADDED
@@ -0,0 +1,705 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WPMailSMTP\Admin\Pages;
|
4 |
+
|
5 |
+
use WPMailSMTP\Admin\Area;
|
6 |
+
use WPMailSMTP\Admin\PageAbstract;
|
7 |
+
use WPMailSMTP\Admin\PluginsInstallSkin;
|
8 |
+
use WPMailSMTP\WP;
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Class About to display a page with About Us and Versus content.
|
12 |
+
*
|
13 |
+
* @since 1.5.0
|
14 |
+
*/
|
15 |
+
class About extends PageAbstract {
|
16 |
+
|
17 |
+
/**
|
18 |
+
* @since 1.5.0
|
19 |
+
*
|
20 |
+
* @var string Slug of a page.
|
21 |
+
*/
|
22 |
+
protected $slug = 'about';
|
23 |
+
|
24 |
+
/**
|
25 |
+
* @since 1.5.0
|
26 |
+
*
|
27 |
+
* @var array List of supported tabs.
|
28 |
+
*/
|
29 |
+
protected $tabs = array( 'about', 'versus' );
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Get the page/tab link.
|
33 |
+
*
|
34 |
+
* @since 1.5.0
|
35 |
+
*
|
36 |
+
* @param string $tab Tab to generate a link to.
|
37 |
+
*
|
38 |
+
* @return string
|
39 |
+
*/
|
40 |
+
public function get_link( $tab = '' ) {
|
41 |
+
|
42 |
+
return add_query_arg(
|
43 |
+
'tab',
|
44 |
+
$this->get_defined_tab( $tab ),
|
45 |
+
admin_url( 'admin.php?page=' . Area::SLUG . '-' . $this->slug )
|
46 |
+
);
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Get the current tab.
|
51 |
+
*
|
52 |
+
* @since 1.5.0
|
53 |
+
*
|
54 |
+
* @return string Current tab.
|
55 |
+
*/
|
56 |
+
public function get_current_tab() {
|
57 |
+
|
58 |
+
if ( empty( $_GET['tab'] ) ) { // phpcs:ignore
|
59 |
+
return $this->slug;
|
60 |
+
}
|
61 |
+
|
62 |
+
return $this->get_defined_tab( $_GET['tab'] ); // phpcs:ignore
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Get the defined or default tab.
|
67 |
+
*
|
68 |
+
* @since 1.5.0
|
69 |
+
*
|
70 |
+
* @param string $tab Tab to check.
|
71 |
+
*
|
72 |
+
* @return string Defined tab. Fallback to default one if it doesn't exist.
|
73 |
+
*/
|
74 |
+
protected function get_defined_tab( $tab ) {
|
75 |
+
|
76 |
+
$tab = \sanitize_key( $tab );
|
77 |
+
|
78 |
+
return \in_array( $tab, $this->tabs, true ) ? $tab : $this->slug;
|
79 |
+
}
|
80 |
+
|
81 |
+
/**
|
82 |
+
* Get label for a tab.
|
83 |
+
* Process only those that exists.
|
84 |
+
* Defaults to "About Us".
|
85 |
+
*
|
86 |
+
* @since 1.5.0
|
87 |
+
*
|
88 |
+
* @param string $tab Tab to get label for.
|
89 |
+
*
|
90 |
+
* @return string
|
91 |
+
*/
|
92 |
+
public function get_label( $tab = '' ) {
|
93 |
+
|
94 |
+
switch ( $this->get_defined_tab( $tab ) ) {
|
95 |
+
case 'versus':
|
96 |
+
$label = \sprintf(
|
97 |
+
/* translators: %s - plugin current license type. */
|
98 |
+
\esc_html__( '%s vs Pro', 'wp-mail-smtp' ),
|
99 |
+
\ucfirst( \wp_mail_smtp()->get_license_type() )
|
100 |
+
);
|
101 |
+
break;
|
102 |
+
|
103 |
+
case 'about':
|
104 |
+
default:
|
105 |
+
$label = \esc_html__( 'About Us', 'wp-mail-smtp' );
|
106 |
+
break;
|
107 |
+
}
|
108 |
+
|
109 |
+
return $label;
|
110 |
+
}
|
111 |
+
|
112 |
+
/**
|
113 |
+
* @inheritdoc
|
114 |
+
*/
|
115 |
+
public function get_title() {
|
116 |
+
return $this->get_label( $this->get_current_tab() );
|
117 |
+
}
|
118 |
+
|
119 |
+
/**
|
120 |
+
* Display About page content based on the current tab.
|
121 |
+
*
|
122 |
+
* @since 1.5.0
|
123 |
+
*/
|
124 |
+
public function display() {
|
125 |
+
?>
|
126 |
+
|
127 |
+
<div class="wp-mail-smtp-page-title">
|
128 |
+
<a href="<?php echo \esc_url( $this->get_link() ); ?>" class="tab <?php echo $this->get_current_tab() === 'about' ? 'active' : ''; ?>">
|
129 |
+
<?php echo \esc_html( $this->get_label( 'about' ) ); ?>
|
130 |
+
</a>
|
131 |
+
|
132 |
+
<?php if ( \wp_mail_smtp()->get_license_type() === 'lite' ) : ?>
|
133 |
+
<a href="<?php echo \esc_url( $this->get_link( 'versus' ) ); ?>" class="tab <?php echo $this->get_current_tab() === 'versus' ? 'active' : ''; ?>">
|
134 |
+
<?php echo \esc_html( $this->get_label( 'versus' ) ); ?>
|
135 |
+
</a>
|
136 |
+
<?php endif; ?>
|
137 |
+
</div>
|
138 |
+
|
139 |
+
<div class="wp-mail-smtp-page-content">
|
140 |
+
<h1 class="screen-reader-text">
|
141 |
+
<?php echo \esc_html( $this->get_label( $this->get_current_tab() ) ); ?>
|
142 |
+
</h1>
|
143 |
+
|
144 |
+
<?php
|
145 |
+
$callback = 'display_' . $this->get_current_tab();
|
146 |
+
|
147 |
+
if ( \method_exists( $this, $callback ) ) {
|
148 |
+
$this->{$callback}();
|
149 |
+
} else {
|
150 |
+
$this->display_about();
|
151 |
+
}
|
152 |
+
?>
|
153 |
+
</div>
|
154 |
+
|
155 |
+
<?php
|
156 |
+
}
|
157 |
+
|
158 |
+
/**
|
159 |
+
* Display an "About Us" tab content.
|
160 |
+
*
|
161 |
+
* @since 1.5.0
|
162 |
+
*/
|
163 |
+
protected function display_about() {
|
164 |
+
?>
|
165 |
+
|
166 |
+
<div class="wp-mail-smtp-admin-about-section wp-mail-smtp-admin-columns">
|
167 |
+
|
168 |
+
<div class="wp-mail-smtp-admin-column-60">
|
169 |
+
<h3>
|
170 |
+
<?php esc_html_e( 'Hello and welcome to WP Mail SMTP, the easiest and most popular WordPress SMTP plugin. We build software that helps your site reliably deliver emails every time.', 'wp-mail-smtp' ); ?>
|
171 |
+
</h3>
|
172 |
+
|
173 |
+
<p>
|
174 |
+
<?php esc_html_e( 'Email deliverability has been a well-documented problem for all WordPress websites. However as WPForms grew, we became more aware of this painful issue that affects our users and the larger WordPress community. So we decided to solve this problem and make a solution that\'s beginner friendly.', 'wp-mail-smtp' ); ?>
|
175 |
+
</p>
|
176 |
+
<p>
|
177 |
+
<?php esc_html_e( 'Our goal is to make reliable email deliverability easy for WordPress.', 'wp-mail-smtp' ); ?>
|
178 |
+
</p>
|
179 |
+
<p>
|
180 |
+
<?php
|
181 |
+
printf(
|
182 |
+
wp_kses(
|
183 |
+
/* translators: %1$s - WPBeginner URL, %2$s - OptinMonster URL, %3$s - MonsterInsights URL. */
|
184 |
+
__( 'WP Mail SMTP is brought to you by the same team that\'s behind the most user friendly WordPress forms, <a href="%1$s" target="_blank" rel="noopener noreferrer">WPForms</a>, the largest WordPress resource site, <a href="%1$s" target="_blank" rel="noopener noreferrer">WPBeginner</a>, the most popular lead-generation software, <a href="%2$s" target="_blank" rel="noopener noreferrer">OptinMonster</a>, and the best WordPress analytics plugin, <a href="%3$s" target="_blank" rel="noopener noreferrer">MonsterInsights</a>.', 'wp-mail-smtp' ),
|
185 |
+
array(
|
186 |
+
'a' => array(
|
187 |
+
'href' => array(),
|
188 |
+
'rel' => array(),
|
189 |
+
'target' => array(),
|
190 |
+
),
|
191 |
+
)
|
192 |
+
),
|
193 |
+
'https://wpforms.com/?utm_source=wpmailsmtpplugin&utm_medium=pluginaboutpage&utm_campaign=aboutwpmailsmtp',
|
194 |
+
'https://www.wpbeginner.com/?utm_source=wpmailsmtpplugin&utm_medium=pluginaboutpage&utm_campaign=aboutwpmailsmtp',
|
195 |
+
'https://optinmonster.com/?utm_source=wpmailsmtpplugin&utm_medium=pluginaboutpage&utm_campaign=aboutwpmailsmtp',
|
196 |
+
'https://www.monsterinsights.com/?utm_source=wpmailsmtpplugin&utm_medium=pluginaboutpage&utm_campaign=aboutwpmailsmtp'
|
197 |
+
);
|
198 |
+
?>
|
199 |
+
</p>
|
200 |
+
<p>
|
201 |
+
<?php esc_html_e( 'Yup, we know a thing or two about building awesome products that customers love.', 'wp-mail-smtp' ); ?>
|
202 |
+
</p>
|
203 |
+
</div>
|
204 |
+
|
205 |
+
<div class="wp-mail-smtp-admin-column-40 wp-mail-smtp-admin-column-last">
|
206 |
+
<figure>
|
207 |
+
<img src="<?php echo esc_url( wp_mail_smtp()->assets_url . '/images/about/team.jpg' ); ?>" alt="<?php esc_attr_e( 'The WPForms Team photo', 'wp-mail-smtp' ); ?>">
|
208 |
+
<figcaption>
|
209 |
+
<?php esc_html_e( 'The WPForms Team', 'wp-mail-smtp' ); ?>
|
210 |
+
</figcaption>
|
211 |
+
</figure>
|
212 |
+
</div>
|
213 |
+
|
214 |
+
</div>
|
215 |
+
|
216 |
+
<div class="wp-mail-smtp-admin-about-plugins">
|
217 |
+
<div class="plugins-container">
|
218 |
+
<?php
|
219 |
+
foreach ( $this->get_am_plugins() as $key => $plugin ) :
|
220 |
+
$is_url_external = false;
|
221 |
+
|
222 |
+
$data = $this->get_about_plugins_data( $plugin );
|
223 |
+
|
224 |
+
if ( isset( $plugin['pro'] ) && \array_key_exists( $plugin['pro']['path'], \get_plugins() ) ) {
|
225 |
+
$is_url_external = true;
|
226 |
+
$plugin = $plugin['pro'];
|
227 |
+
|
228 |
+
$data = array_merge( $data, $this->get_about_plugins_data( $plugin, true ) );
|
229 |
+
}
|
230 |
+
|
231 |
+
?>
|
232 |
+
<div class="plugin-container">
|
233 |
+
<div class="plugin-item">
|
234 |
+
<div class="details wp-mail-smtp-clear">
|
235 |
+
<img src="<?php echo \esc_url( $plugin['icon'] ); ?>">
|
236 |
+
<h5 class="plugin-name">
|
237 |
+
<?php echo $plugin['name']; ?>
|
238 |
+
</h5>
|
239 |
+
<p class="plugin-desc">
|
240 |
+
<?php echo $plugin['desc']; ?>
|
241 |
+
</p>
|
242 |
+
</div>
|
243 |
+
<div class="actions wp-mail-smtp-clear">
|
244 |
+
<div class="status">
|
245 |
+
<strong>
|
246 |
+
<?php
|
247 |
+
\printf(
|
248 |
+
/* translators: %s - status HTML text. */
|
249 |
+
\esc_html__( 'Status: %s', 'wp-mail-smtp' ),
|
250 |
+
'<span class="status-label ' . $data['status_class'] . '">' . $data['status_text'] . '</span>'
|
251 |
+
);
|
252 |
+
?>
|
253 |
+
</strong>
|
254 |
+
</div>
|
255 |
+
<div class="action-button">
|
256 |
+
<?php
|
257 |
+
$go_to_class = '';
|
258 |
+
if ( $is_url_external && $data['status_class'] === 'status-download' ) {
|
259 |
+
$go_to_class = 'go_to';
|
260 |
+
}
|
261 |
+
?>
|
262 |
+
<a href="<?php echo \esc_url( $plugin['url'] ); ?>"
|
263 |
+
class="<?php echo \esc_attr( $data['action_class'] ); ?> <?php echo $go_to_class; ?>"
|
264 |
+
data-plugin="<?php echo $data['plugin_src']; ?>">
|
265 |
+
<?php echo $data['action_text']; ?>
|
266 |
+
</a>
|
267 |
+
</div>
|
268 |
+
</div>
|
269 |
+
</div>
|
270 |
+
</div>
|
271 |
+
<?php endforeach; ?>
|
272 |
+
</div>
|
273 |
+
</div>
|
274 |
+
|
275 |
+
<?php
|
276 |
+
}
|
277 |
+
|
278 |
+
/**
|
279 |
+
* Generate all the required CSS classed and labels to be used in rendering.
|
280 |
+
*
|
281 |
+
* @since 1.5.0
|
282 |
+
*
|
283 |
+
* @param array $plugin
|
284 |
+
* @param bool $is_pro
|
285 |
+
*
|
286 |
+
* @return mixed
|
287 |
+
*/
|
288 |
+
protected function get_about_plugins_data( $plugin, $is_pro = false ) {
|
289 |
+
|
290 |
+
$data = array();
|
291 |
+
|
292 |
+
if ( \array_key_exists( $plugin['path'], \get_plugins() ) ) {
|
293 |
+
if ( \is_plugin_active( $plugin['path'] ) ) {
|
294 |
+
// Status text/status.
|
295 |
+
$data['status_class'] = 'status-active';
|
296 |
+
$data['status_text'] = \esc_html__( 'Active', 'wp-mail-smtp' );
|
297 |
+
// Button text/status.
|
298 |
+
$data['action_class'] = $data['status_class'] . ' button button-secondary disabled';
|
299 |
+
$data['action_text'] = \esc_html__( 'Activated', 'wp-mail-smtp' );
|
300 |
+
$data['plugin_src'] = \esc_attr( $plugin['path'] );
|
301 |
+
} else {
|
302 |
+
// Status text/status.
|
303 |
+
$data['status_class'] = 'status-inactive';
|
304 |
+
$data['status_text'] = \esc_html__( 'Inactive', 'wp-mail-smtp' );
|
305 |
+
// Button text/status.
|
306 |
+
$data['action_class'] = $data['status_class'] . ' button button-secondary';
|
307 |
+
$data['action_text'] = \esc_html__( 'Activate', 'wp-mail-smtp' );
|
308 |
+
$data['plugin_src'] = \esc_attr( $plugin['path'] );
|
309 |
+
}
|
310 |
+
} else {
|
311 |
+
if ( ! $is_pro ) {
|
312 |
+
// Doesn't exist, install.
|
313 |
+
// Status text/status.
|
314 |
+
$data['status_class'] = 'status-download';
|
315 |
+
$data['status_text'] = \esc_html__( 'Not Installed', 'wp-mail-smtp' );
|
316 |
+
// Button text/status.
|
317 |
+
$data['action_class'] = $data['status_class'] . ' button button-primary';
|
318 |
+
$data['action_text'] = \esc_html__( 'Install Plugin', 'wp-mail-smtp' );
|
319 |
+
$data['plugin_src'] = \esc_url( $plugin['url'] );
|
320 |
+
}
|
321 |
+
}
|
322 |
+
|
323 |
+
return $data;
|
324 |
+
}
|
325 |
+
|
326 |
+
/**
|
327 |
+
* List of AM plugins that we propose to install.
|
328 |
+
*
|
329 |
+
* @since 1.5.0
|
330 |
+
*
|
331 |
+
* @return array
|
332 |
+
*/
|
333 |
+
private function get_am_plugins() {
|
334 |
+
|
335 |
+
$data = array(
|
336 |
+
'mi' => array(
|
337 |
+
'path' => 'google-analytics-for-wordpress/googleanalytics.php',
|
338 |
+
'icon' => \wp_mail_smtp()->assets_url . '/images/about/plugin-mi.png',
|
339 |
+
'name' => \esc_html__( 'MonsterInsights', 'wp-mail-smtp' ),
|
340 |
+
'desc' => \esc_html__( 'MonsterInsights makes it “effortless” to properly connect your WordPress site with Google Analytics, so you can start making data-driven decisions to grow your business.', 'wp-mail-smtp' ),
|
341 |
+
'url' => 'https://downloads.wordpress.org/plugin/google-analytics-for-wordpress.zip',
|
342 |
+
'pro' => array(
|
343 |
+
'path' => 'google-analytics-premium/googleanalytics-premium.php',
|
344 |
+
'icon' => \wp_mail_smtp()->assets_url . '/images/about/plugin-mi.png',
|
345 |
+
'name' => \esc_html__( 'MonsterInsights Pro', 'wp-mail-smtp' ),
|
346 |
+
'desc' => \esc_html__( 'MonsterInsights makes it “effortless” to properly connect your WordPress site with Google Analytics, so you can start making data-driven decisions to grow your business.', 'wp-mail-smtp' ),
|
347 |
+
'url' => 'https://www.monsterinsights.com/?utm_source=WordPress&utm_medium=about&utm_campaign=smtp',
|
348 |
+
),
|
349 |
+
),
|
350 |
+
'om' => array(
|
351 |
+
'path' => 'optinmonster/optin-monster-wp-api.php',
|
352 |
+
'icon' => \wp_mail_smtp()->assets_url . '/images/about/plugin-om.png',
|
353 |
+
'name' => \esc_html__( 'OptinMonster', 'wp-mail-smtp' ),
|
354 |
+
'desc' => \esc_html__( 'Our high-converting optin forms like Exit-Intent® popups, Fullscreen Welcome Mats, and Scroll boxes help you dramatically boost conversions and get more email subscribers.', 'wp-mail-smtp' ),
|
355 |
+
'url' => 'https://downloads.wordpress.org/plugin/optinmonster.zip',
|
356 |
+
),
|
357 |
+
'wpforms' => array(
|
358 |
+
'path' => 'wpforms-lite/wpforms.php',
|
359 |
+
'icon' => \wp_mail_smtp()->assets_url . '/images/about/plugin-wpf.png',
|
360 |
+
'name' => \esc_html__( 'Contact Forms by WPForms', 'wp-mail-smtp' ),
|
361 |
+
'desc' => \esc_html__( 'The best WordPress contact form plugin. Drag & Drop online form builder that helps you create beautiful contact forms with just a few clicks.', 'wp-mail-smtp' ),
|
362 |
+
'url' => 'https://downloads.wordpress.org/plugin/wpforms-lite.zip',
|
363 |
+
'pro' => array(
|
364 |
+
'path' => 'wpforms/wpforms.php',
|
365 |
+
'icon' => \wp_mail_smtp()->assets_url . '/images/about/plugin-wpf.png',
|
366 |
+
'name' => \esc_html__( 'WPForms Pro', 'wp-mail-smtp' ),
|
367 |
+
'desc' => \esc_html__( 'The best WordPress contact form plugin. Drag & Drop online form builder that helps you create beautiful contact forms with just a few clicks.', 'wp-mail-smtp' ),
|
368 |
+
'url' => 'https://wpforms.com/?utm_source=WordPress&utm_medium=about&utm_campaign=smtp',
|
369 |
+
),
|
370 |
+
),
|
371 |
+
);
|
372 |
+
|
373 |
+
return $data;
|
374 |
+
}
|
375 |
+
|
376 |
+
/**
|
377 |
+
* Active the given plugin.
|
378 |
+
*
|
379 |
+
* @since 1.5.0
|
380 |
+
*/
|
381 |
+
public static function ajax_plugin_activate() {
|
382 |
+
|
383 |
+
// Run a security check.
|
384 |
+
\check_ajax_referer( 'wp-mail-smtp-about', 'nonce' );
|
385 |
+
|
386 |
+
$error = \esc_html__( 'Could not activate the plugin. Please activate it from the Plugins page.', 'wp-mail-smtp' );
|
387 |
+
|
388 |
+
// Check for permissions.
|
389 |
+
if ( ! \current_user_can( 'activate_plugins' ) ) {
|
390 |
+
\wp_send_json_error( $error );
|
391 |
+
}
|
392 |
+
|
393 |
+
if ( isset( $_POST['plugin'] ) ) {
|
394 |
+
|
395 |
+
$activate = \activate_plugins( $_POST['plugin'] ); // phpcs:ignore
|
396 |
+
|
397 |
+
if ( ! \is_wp_error( $activate ) ) {
|
398 |
+
\wp_send_json_success( esc_html__( 'Plugin activated.', 'wp-mail-smtp' ) );
|
399 |
+
}
|
400 |
+
}
|
401 |
+
|
402 |
+
\wp_send_json_error( $error );
|
403 |
+
}
|
404 |
+
|
405 |
+
/**
|
406 |
+
* Install & activate the given plugin.
|
407 |
+
*
|
408 |
+
* @since 1.5.0
|
409 |
+
*/
|
410 |
+
public static function ajax_plugin_install() {
|
411 |
+
|
412 |
+
// Run a security check.
|
413 |
+
\check_ajax_referer( 'wp-mail-smtp-about', 'nonce' );
|
414 |
+
|
415 |
+
$error = \esc_html__( 'Could not install the plugin.', 'wp-mail-smtp' );
|
416 |
+
|
417 |
+
// Check for permissions.
|
418 |
+
if ( ! \current_user_can( 'activate_plugins' ) ) {
|
419 |
+
\wp_send_json_error( $error );
|
420 |
+
}
|
421 |
+
|
422 |
+
if ( empty( $_POST['plugin'] ) ) {
|
423 |
+
\wp_send_json_error();
|
424 |
+
}
|
425 |
+
|
426 |
+
// Set the current screen to avoid undefined notices.
|
427 |
+
\set_current_screen( 'wp-mail-smtp_page_wp-mail-smtp-about' );
|
428 |
+
|
429 |
+
// Prepare variables.
|
430 |
+
$url = \esc_url_raw(
|
431 |
+
\add_query_arg(
|
432 |
+
array(
|
433 |
+
'page' => 'wp-mail-smtp-about',
|
434 |
+
),
|
435 |
+
\admin_url( 'admin.php' )
|
436 |
+
)
|
437 |
+
);
|
438 |
+
|
439 |
+
$creds = \request_filesystem_credentials( $url, '', false, false, null );
|
440 |
+
|
441 |
+
// Check for file system permissions.
|
442 |
+
if ( false === $creds ) {
|
443 |
+
\wp_send_json_error( $error );
|
444 |
+
}
|
445 |
+
|
446 |
+
if ( ! \WP_Filesystem( $creds ) ) {
|
447 |
+
\wp_send_json_error( $error );
|
448 |
+
}
|
449 |
+
|
450 |
+
// We do not need any extra credentials if we have gotten this far, so let's install the plugin.
|
451 |
+
require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
|
452 |
+
|
453 |
+
// Do not allow WordPress to search/download translations, as this will break JS output.
|
454 |
+
\remove_action( 'upgrader_process_complete', array( 'Language_Pack_Upgrader', 'async_upgrade' ), 20 );
|
455 |
+
|
456 |
+
// Create the plugin upgrader with our custom skin.
|
457 |
+
$installer = new \Plugin_Upgrader( new PluginsInstallSkin() );
|
458 |
+
|
459 |
+
// Error check.
|
460 |
+
if ( ! \method_exists( $installer, 'install' ) || empty( $_POST['plugin'] ) ) {
|
461 |
+
\wp_send_json_error( $error );
|
462 |
+
}
|
463 |
+
|
464 |
+
$installer->install( $_POST['plugin'] ); // phpcs:ignore
|
465 |
+
|
466 |
+
// Flush the cache and return the newly installed plugin basename.
|
467 |
+
\wp_cache_flush();
|
468 |
+
|
469 |
+
if ( $installer->plugin_info() ) {
|
470 |
+
|
471 |
+
$plugin_basename = $installer->plugin_info();
|
472 |
+
|
473 |
+
// Activate the plugin silently.
|
474 |
+
$activated = \activate_plugin( $plugin_basename );
|
475 |
+
|
476 |
+
if ( ! \is_wp_error( $activated ) ) {
|
477 |
+
\wp_send_json_success(
|
478 |
+
array(
|
479 |
+
'msg' => \esc_html__( 'Plugin installed & activated.', 'wp-mail-smtp' ),
|
480 |
+
'is_activated' => true,
|
481 |
+
'basename' => $plugin_basename,
|
482 |
+
)
|
483 |
+
);
|
484 |
+
} else {
|
485 |
+
\wp_send_json_success(
|
486 |
+
array(
|
487 |
+
'msg' => esc_html__( 'Plugin installed.', 'wp-mail-smtp' ),
|
488 |
+
'is_activated' => false,
|
489 |
+
'basename' => $plugin_basename,
|
490 |
+
)
|
491 |
+
);
|
492 |
+
}
|
493 |
+
}
|
494 |
+
|
495 |
+
\wp_send_json_error( $error );
|
496 |
+
}
|
497 |
+
|
498 |
+
/**
|
499 |
+
* Display a "Lite vs Pro" tab content.
|
500 |
+
*
|
501 |
+
* @since 1.5.0
|
502 |
+
*/
|
503 |
+
protected function display_versus() {
|
504 |
+
|
505 |
+
$license = \wp_mail_smtp()->get_license_type();
|
506 |
+
?>
|
507 |
+
|
508 |
+
<div class="wp-mail-smtp-admin-about-section wp-mail-smtp-admin-about-section-squashed">
|
509 |
+
<h1 class="centered">
|
510 |
+
<strong>
|
511 |
+
<?php
|
512 |
+
\printf(
|
513 |
+
/* translators: %s - plugin current license type. */
|
514 |
+
\esc_html__( '%s vs Pro', 'wp-mail-smtp' ),
|
515 |
+
\esc_html( \ucfirst( $license ) )
|
516 |
+
);
|
517 |
+
?>
|
518 |
+
</strong>
|
519 |
+
</h1>
|
520 |
+
|
521 |
+
<p class="centered <?php echo ( $license === 'pro' ? 'hidden' : '' ); ?>">
|
522 |
+
<?php esc_html_e( 'Get the most out of WP Mail SMTP by upgrading to Pro and unlocking all of the powerful features.', 'wp-mail-smtp' ); ?>
|
523 |
+
</p>
|
524 |
+
</div>
|
525 |
+
|
526 |
+
<div class="wp-mail-smtp-admin-about-section wp-mail-smtp-admin-about-section-squashed wp-mail-smtp-admin-about-section-hero wp-mail-smtp-admin-about-section-table">
|
527 |
+
|
528 |
+
<div class="wp-mail-smtp-admin-about-section-hero-main wp-mail-smtp-admin-columns">
|
529 |
+
<div class="wp-mail-smtp-admin-column-33">
|
530 |
+
<h3 class="no-margin">
|
531 |
+
<?php esc_html_e( 'Feature', 'wp-mail-smtp' ); ?>
|
532 |
+
</h3>
|
533 |
+
</div>
|
534 |
+
<div class="wp-mail-smtp-admin-column-33">
|
535 |
+
<h3 class="no-margin">
|
536 |
+
<?php echo esc_html( ucfirst( $license ) ); ?>
|
537 |
+
</h3>
|
538 |
+
</div>
|
539 |
+
<div class="wp-mail-smtp-admin-column-33">
|
540 |
+
<h3 class="no-margin">
|
541 |
+
<?php esc_html_e( 'Pro', 'wp-mail-smtp' ); ?>
|
542 |
+
</h3>
|
543 |
+
</div>
|
544 |
+
</div>
|
545 |
+
<div class="wp-mail-smtp-admin-about-section-hero-extra no-padding wp-mail-smtp-admin-columns">
|
546 |
+
|
547 |
+
<table>
|
548 |
+
<?php
|
549 |
+
foreach ( $this->get_license_features() as $slug => $name ) {
|
550 |
+
$current = $this->get_license_data( $slug, $license );
|
551 |
+
$pro = $this->get_license_data( $slug, 'pro' );
|
552 |
+
?>
|
553 |
+
<tr class="wp-mail-smtp-admin-columns">
|
554 |
+
<td class="wp-mail-smtp-admin-column-33">
|
555 |
+
<p><?php echo $name; ?></p>
|
556 |
+
</td>
|
557 |
+
<td class="wp-mail-smtp-admin-column-33">
|
558 |
+
<p class="features-<?php echo esc_attr( $current['status'] ); ?>">
|
559 |
+
<?php echo \implode( '<br>', $current['text'] ); ?>
|
560 |
+
</p>
|
561 |
+
</td>
|
562 |
+
<td class="wp-mail-smtp-admin-column-33">
|
563 |
+
<p class="features-full">
|
564 |
+
<?php echo \implode( '<br>', $pro['text'] ); ?>
|
565 |
+
</p>
|
566 |
+
</td>
|
567 |
+
</tr>
|
568 |
+
<?php
|
569 |
+
}
|
570 |
+
?>
|
571 |
+
</table>
|
572 |
+
|
573 |
+
</div>
|
574 |
+
|
575 |
+
</div>
|
576 |
+
|
577 |
+
<?php if ( 'lite' === $license ) : ?>
|
578 |
+
<div class="wp-mail-smtp-admin-about-section wp-mail-smtp-admin-about-section-hero">
|
579 |
+
<div class="wp-mail-smtp-admin-about-section-hero-main no-border">
|
580 |
+
<h3 class="call-to-action centered">
|
581 |
+
<a href="https://wpmailsmtp.com/pricing?utm_source=WordPress&utm_medium=about-page&utm_campaign=smtpplugin&discount=LITEUPGRADE" target="_blank" rel="noopener noreferrer">
|
582 |
+
<?php \esc_html_e( 'Get WP Mail SMTP Pro Today and Unlock all of these Powerful Features', 'wp-mail-smtp' ); ?>
|
583 |
+
</a>
|
584 |
+
</h3>
|
585 |
+
|
586 |
+
<p class="centered">
|
587 |
+
<?php
|
588 |
+
echo \wp_kses(
|
589 |
+
\__( 'Bonus: WP Mail SMTP Lite users get <span class="price-off">20% off regular price</span>, automatically applied at checkout.', 'wp-mail-smtp' ),
|
590 |
+
array(
|
591 |
+
'span' => array(
|
592 |
+
'class' => array(),
|
593 |
+
),
|
594 |
+
)
|
595 |
+
);
|
596 |
+
?>
|
597 |
+
</p>
|
598 |
+
</div>
|
599 |
+
</div>
|
600 |
+
<?php endif; ?>
|
601 |
+
|
602 |
+
<?php
|
603 |
+
}
|
604 |
+
|
605 |
+
/**
|
606 |
+
* Get the list of features for all licenses.
|
607 |
+
*
|
608 |
+
* @since 1.5.0
|
609 |
+
*
|
610 |
+
* @return array
|
611 |
+
*/
|
612 |
+
private function get_license_features() {
|
613 |
+
|
614 |
+
return array(
|
615 |
+
'log' => \esc_html__( 'Email Log', 'wp-mail-smtp' ),
|
616 |
+
'control' => \esc_html__( 'Email Controls', 'wp-mail-smtp' ),
|
617 |
+
'mailers' => \esc_html__( 'Additional Mailers', 'wp-mail-smtp' ),
|
618 |
+
'support' => \esc_html__( 'Customer Support', 'wp-mail-smtp' ),
|
619 |
+
);
|
620 |
+
}
|
621 |
+
|
622 |
+
/**
|
623 |
+
* Get the array of data that compared the license data.
|
624 |
+
*
|
625 |
+
* @since 1.5.0
|
626 |
+
*
|
627 |
+
* @param string $feature Feature name.
|
628 |
+
* @param string $license License type to get data for.
|
629 |
+
*
|
630 |
+
* @return array|false
|
631 |
+
*/
|
632 |
+
private function get_license_data( $feature, $license ) {
|
633 |
+
|
634 |
+
$data = array(
|
635 |
+
'log' => array(
|
636 |
+
'lite' => array(
|
637 |
+
'status' => 'none',
|
638 |
+
'text' => array(
|
639 |
+
'<strong>' . esc_html__( 'Emails are not logged', 'wp-mail-smtp' ) . '</strong>',
|
640 |
+
),
|
641 |
+
),
|
642 |
+
'pro' => array(
|
643 |
+
'status' => 'full',
|
644 |
+
'text' => array(
|
645 |
+
'<strong>' . esc_html__( 'Complete Email Log management inside WordPress', 'wp-mail-smtp' ) . '</strong>',
|
646 |
+
),
|
647 |
+
),
|
648 |
+
),
|
649 |
+
'control' => array(
|
650 |
+
'lite' => array(
|
651 |
+
'status' => 'none',
|
652 |
+
'text' => array(
|
653 |
+
'<strong>' . esc_html__( 'No controls over whether default WordPress emails are sent', 'wp-mail-smtp' ) . '</strong>',
|
654 |
+
),
|
655 |
+
),
|
656 |
+
'pro' => array(
|
657 |
+
'status' => 'full',
|
658 |
+
'text' => array(
|
659 |
+
'<strong>' . esc_html__( 'Complete Email Controls management for most default WordPress emails', 'wp-mail-smtp' ) . '</strong>',
|
660 |
+
),
|
661 |
+
),
|
662 |
+
),
|
663 |
+
'mailers' => array(
|
664 |
+
'lite' => array(
|
665 |
+
'status' => 'none',
|
666 |
+
'text' => array(
|
667 |
+
'<strong>' . esc_html__( 'Only default list of mailers', 'wp-mail-smtp' ) . '</strong>',
|
668 |
+
),
|
669 |
+
),
|
670 |
+
'pro' => array(
|
671 |
+
'status' => 'full',
|
672 |
+
'text' => array(
|
673 |
+
'<strong>' . esc_html__( 'Additional mailers: Microsoft Outlook (with Office365 support) and Amazon SES', 'wp-mail-smtp' ) . '</strong>',
|
674 |
+
),
|
675 |
+
),
|
676 |
+
),
|
677 |
+
'support' => array(
|
678 |
+
'lite' => array(
|
679 |
+
'status' => 'none',
|
680 |
+
'text' => array(
|
681 |
+
'<strong>' . esc_html__( 'Limited Support', 'wp-mail-smtp' ) . '</strong>',
|
682 |
+
),
|
683 |
+
),
|
684 |
+
'pro' => array(
|
685 |
+
'status' => 'full',
|
686 |
+
'text' => array(
|
687 |
+
'<strong>' . esc_html__( 'Priority Support', 'wp-mail-smtp' ) . '</strong>',
|
688 |
+
),
|
689 |
+
),
|
690 |
+
),
|
691 |
+
);
|
692 |
+
|
693 |
+
// Wrong feature?
|
694 |
+
if ( ! isset( $data[ $feature ] ) ) {
|
695 |
+
return false;
|
696 |
+
}
|
697 |
+
|
698 |
+
// Wrong license type?
|
699 |
+
if ( ! isset( $data[ $feature ][ $license ] ) ) {
|
700 |
+
return false;
|
701 |
+
}
|
702 |
+
|
703 |
+
return $data[ $feature ][ $license ];
|
704 |
+
}
|
705 |
+
}
|
src/Admin/Pages/Auth.php
CHANGED
@@ -26,7 +26,11 @@ class Auth {
|
|
26 |
|
27 |
$auth = wp_mail_smtp()->get_providers()->get_auth( Options::init()->get( 'mail', 'mailer' ) );
|
28 |
|
29 |
-
if (
|
|
|
|
|
|
|
|
|
30 |
$auth->process();
|
31 |
}
|
32 |
}
|
26 |
|
27 |
$auth = wp_mail_smtp()->get_providers()->get_auth( Options::init()->get( 'mail', 'mailer' ) );
|
28 |
|
29 |
+
if (
|
30 |
+
$auth &&
|
31 |
+
$auth instanceof AuthAbstract &&
|
32 |
+
method_exists( $auth, 'process' )
|
33 |
+
) {
|
34 |
$auth->process();
|
35 |
}
|
36 |
}
|
src/Admin/Pages/Logs.php
ADDED
@@ -0,0 +1,107 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WPMailSMTP\Admin\Pages;
|
4 |
+
|
5 |
+
use WPMailSMTP\Admin\Area;
|
6 |
+
use WPMailSMTP\Admin\PageAbstract;
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Class Logs
|
10 |
+
*/
|
11 |
+
class Logs extends PageAbstract {
|
12 |
+
|
13 |
+
/**
|
14 |
+
* @since 1.5.0
|
15 |
+
*
|
16 |
+
* @var string Slug of a page.
|
17 |
+
*/
|
18 |
+
protected $slug = 'logs';
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Get the page/tab link.
|
22 |
+
*
|
23 |
+
* @since 1.5.0
|
24 |
+
*
|
25 |
+
* @return string
|
26 |
+
*/
|
27 |
+
public function get_link() {
|
28 |
+
|
29 |
+
return add_query_arg(
|
30 |
+
'page',
|
31 |
+
Area::SLUG . '-' . $this->slug,
|
32 |
+
admin_url( 'admin.php' )
|
33 |
+
);
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* @inheritdoc
|
38 |
+
*/
|
39 |
+
public function get_label() {
|
40 |
+
return esc_html__( 'Email Log', 'wp-mail-smtp' );
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* @inheritdoc
|
45 |
+
*/
|
46 |
+
public function get_title() {
|
47 |
+
return $this->get_label();
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* @inheritdoc
|
52 |
+
*/
|
53 |
+
public function display() {
|
54 |
+
?>
|
55 |
+
|
56 |
+
<div class="wp-mail-smtp-page-title">
|
57 |
+
<h1 class="page-title">
|
58 |
+
<?php echo esc_html( $this->get_label() ); ?>
|
59 |
+
</h1>
|
60 |
+
</div>
|
61 |
+
|
62 |
+
<div class="wp-mail-smtp-page wp-mail-smtp-page-<?php echo esc_attr( $this->slug ); ?>">
|
63 |
+
|
64 |
+
<h1 class="screen-reader-text">
|
65 |
+
<?php echo esc_html( $this->get_label() ); ?>
|
66 |
+
</h1>
|
67 |
+
|
68 |
+
<div class="wp-mail-smtp-logs-upsell">
|
69 |
+
<div class="wp-mail-smtp-logs-upsell-content">
|
70 |
+
<h2>
|
71 |
+
<?php esc_html_e( 'View and Manage All Sent Emails inside WordPress', 'wp-mail-smtp' ); ?>
|
72 |
+
</h2>
|
73 |
+
|
74 |
+
<p>
|
75 |
+
<strong><?php esc_html_e( 'Sent emails are not stored in WP Mail SMTP Lite.', 'wp-mail-smtp' ); ?></strong><br>
|
76 |
+
<?php esc_html_e( 'Once you upgrade to WP Mail SMTP Pro, all future sent emails will be stored in your WordPress database and displayed on this Logs screen.', 'wp-mail-smtp' ); ?>
|
77 |
+
</p>
|
78 |
+
|
79 |
+
<div class="wp-mail-smtp-clear">
|
80 |
+
<ul class="left">
|
81 |
+
<li><span class="dashicons dashicons-yes"></span> <?php esc_html_e( 'View Sent Emails in Dashboard', 'wp-mail-smtp' ); ?></li>
|
82 |
+
<li><span class="dashicons dashicons-yes"></span> <?php esc_html_e( 'View Emails Sent Status', 'wp-mail-smtp' ); ?></li>
|
83 |
+
</ul>
|
84 |
+
<ul class="right">
|
85 |
+
<li><span class="dashicons dashicons-yes"></span> <?php esc_html_e( 'Filter All Emails', 'wp-mail-smtp' ); ?></li>
|
86 |
+
<li><span class="dashicons dashicons-yes"></span> <?php esc_html_e( 'Search for Specific Emails', 'wp-mail-smtp' ); ?></li>
|
87 |
+
</ul>
|
88 |
+
<div class="clear"></div>
|
89 |
+
</div>
|
90 |
+
</div>
|
91 |
+
|
92 |
+
<div class="wp-mail-smtp-logs-upsell-button">
|
93 |
+
<a href="https://wpmailsmtp.com/lite-upgrade/?discount=LITEUPGRADE&utm_source=WordPress&utm_medium=logs&utm_campaign=liteplugin" class="wp-mail-smtp-btn wp-mail-smtp-btn-lg wp-mail-smtp-btn-orange wp-mail-smtp-upgrade-modal" target="_blank" rel="noopener noreferrer">
|
94 |
+
<?php esc_html_e( 'Upgrade to WP Mail SMTP Pro Now', 'wp-mail-smtp' ); ?>
|
95 |
+
</a>
|
96 |
+
<br>
|
97 |
+
<p style="margin: 10px 0 0;font-style:italic;font-size: 13px;">
|
98 |
+
<?php esc_html_e( 'and start logging all emails!', 'wp-mail-smtp' ); ?>
|
99 |
+
</p>
|
100 |
+
</div>
|
101 |
+
</div>
|
102 |
+
|
103 |
+
</div>
|
104 |
+
|
105 |
+
<?php
|
106 |
+
}
|
107 |
+
}
|
src/Admin/Pages/Misc.php
CHANGED
@@ -42,7 +42,7 @@ class Misc extends PageAbstract {
|
|
42 |
<form method="POST" action="">
|
43 |
<?php $this->wp_nonce_field(); ?>
|
44 |
|
45 |
-
<!--
|
46 |
<div class="wp-mail-smtp-setting-row wp-mail-smtp-setting-row-content wp-mail-smtp-clear section-heading no-desc" id="wp-mail-smtp-setting-row-email-heading">
|
47 |
<div class="wp-mail-smtp-setting-field">
|
48 |
<h2><?php esc_html_e( 'General', 'wp-mail-smtp' ); ?></h2>
|
@@ -118,9 +118,7 @@ class Misc extends PageAbstract {
|
|
118 |
</div>
|
119 |
</div>
|
120 |
|
121 |
-
|
122 |
-
<button type="submit" class="wp-mail-smtp-btn wp-mail-smtp-btn-md wp-mail-smtp-btn-orange"><?php esc_html_e( 'Save Settings', 'wp-mail-smtp' ); ?></button>
|
123 |
-
</p>
|
124 |
|
125 |
</form>
|
126 |
|
42 |
<form method="POST" action="">
|
43 |
<?php $this->wp_nonce_field(); ?>
|
44 |
|
45 |
+
<!-- Section Title -->
|
46 |
<div class="wp-mail-smtp-setting-row wp-mail-smtp-setting-row-content wp-mail-smtp-clear section-heading no-desc" id="wp-mail-smtp-setting-row-email-heading">
|
47 |
<div class="wp-mail-smtp-setting-field">
|
48 |
<h2><?php esc_html_e( 'General', 'wp-mail-smtp' ); ?></h2>
|
118 |
</div>
|
119 |
</div>
|
120 |
|
121 |
+
<?php $this->display_save_btn(); ?>
|
|
|
|
|
122 |
|
123 |
</form>
|
124 |
|
src/Admin/Pages/Settings.php
CHANGED
@@ -14,6 +14,16 @@ use WPMailSMTP\WP;
|
|
14 |
*/
|
15 |
class Settings extends PageAbstract {
|
16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
/**
|
18 |
* @var string Slug of a tab.
|
19 |
*/
|
@@ -23,7 +33,7 @@ class Settings extends PageAbstract {
|
|
23 |
* @inheritdoc
|
24 |
*/
|
25 |
public function get_label() {
|
26 |
-
return esc_html__( '
|
27 |
}
|
28 |
|
29 |
/**
|
@@ -38,14 +48,37 @@ class Settings extends PageAbstract {
|
|
38 |
*/
|
39 |
public function display() {
|
40 |
|
41 |
-
$options
|
42 |
-
$mailer
|
43 |
-
|
|
|
|
|
44 |
?>
|
45 |
|
46 |
<form method="POST" action="" autocomplete="off">
|
47 |
<?php $this->wp_nonce_field(); ?>
|
48 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
<!-- Mail Section Title -->
|
50 |
<div class="wp-mail-smtp-setting-row wp-mail-smtp-setting-row-content wp-mail-smtp-clear section-heading no-desc" id="wp-mail-smtp-setting-row-email-heading">
|
51 |
<div class="wp-mail-smtp-setting-field">
|
@@ -61,15 +94,11 @@ class Settings extends PageAbstract {
|
|
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( $
|
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 (
|
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' ); ?>
|
@@ -83,16 +112,16 @@ class Settings extends PageAbstract {
|
|
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( $
|
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( $
|
94 |
<p class="desc">
|
95 |
-
<?php esc_html_e( '
|
96 |
</p>
|
97 |
<?php else : ?>
|
98 |
<p class="desc">
|
@@ -111,15 +140,11 @@ class Settings extends PageAbstract {
|
|
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( $
|
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 (
|
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>
|
@@ -129,16 +154,16 @@ class Settings extends PageAbstract {
|
|
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( $
|
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( $
|
140 |
<p class="desc">
|
141 |
-
<?php esc_html_e( '
|
142 |
</p>
|
143 |
<?php else : ?>
|
144 |
<p class="desc">
|
@@ -148,6 +173,28 @@ class Settings extends PageAbstract {
|
|
148 |
</div>
|
149 |
</div>
|
150 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
151 |
<!-- Mailer -->
|
152 |
<div id="wp-mail-smtp-setting-row-mailer" class="wp-mail-smtp-setting-row wp-mail-smtp-setting-row-mailer wp-mail-smtp-clear">
|
153 |
<div class="wp-mail-smtp-setting-label">
|
@@ -158,7 +205,7 @@ class Settings extends PageAbstract {
|
|
158 |
|
159 |
<?php foreach ( wp_mail_smtp()->get_providers()->get_options_all() as $provider ) : ?>
|
160 |
|
161 |
-
<div class="wp-mail-smtp-mailer <?php echo $mailer === $provider->get_slug() ? 'active' : ''; ?>">
|
162 |
<div class="wp-mail-smtp-mailer-image">
|
163 |
<img src="<?php echo esc_url( $provider->get_logo_url() ); ?>"
|
164 |
alt="<?php echo esc_attr( $provider->get_title() ); ?>">
|
@@ -183,34 +230,6 @@ class Settings extends PageAbstract {
|
|
183 |
</div>
|
184 |
</div>
|
185 |
|
186 |
-
<!-- Return Path -->
|
187 |
-
<div id="wp-mail-smtp-setting-row-return_path" class="wp-mail-smtp-setting-row wp-mail-smtp-setting-row-checkbox wp-mail-smtp-clear">
|
188 |
-
<div class="wp-mail-smtp-setting-label">
|
189 |
-
<label for="wp-mail-smtp-setting-return_path"><?php esc_html_e( 'Return Path', 'wp-mail-smtp' ); ?></label>
|
190 |
-
</div>
|
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 |
-
|
214 |
<!-- Mailer Options -->
|
215 |
<div class="wp-mail-smtp-mailer-options">
|
216 |
<?php foreach ( wp_mail_smtp()->get_providers()->get_options_all() as $provider ) : ?>
|
@@ -235,35 +254,95 @@ class Settings extends PageAbstract {
|
|
235 |
|
236 |
</div>
|
237 |
|
238 |
-
|
239 |
-
<button type="submit" class="wp-mail-smtp-btn wp-mail-smtp-btn-md wp-mail-smtp-btn-orange"><?php esc_html_e( 'Save Settings', 'wp-mail-smtp' ); ?></button>
|
240 |
-
</p>
|
241 |
|
242 |
</form>
|
243 |
|
244 |
<?php
|
245 |
$this->display_wpforms();
|
|
|
246 |
}
|
247 |
|
248 |
/**
|
249 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
262 |
-
if (
|
263 |
return;
|
264 |
}
|
265 |
|
266 |
-
$is_dismissed = get_user_meta( get_current_user_id(), '
|
267 |
|
268 |
// Do not display if user dismissed.
|
269 |
if ( (bool) $is_dismissed === true ) {
|
@@ -271,74 +350,52 @@ class Settings extends PageAbstract {
|
|
271 |
}
|
272 |
?>
|
273 |
|
274 |
-
<div id="wp-mail-smtp-
|
275 |
|
276 |
-
<span class="wp-mail-smtp-
|
277 |
-
<button id="wp-mail-smtp-
|
278 |
<span class="dashicons dashicons-dismiss"></span>
|
279 |
</button>
|
280 |
</span>
|
281 |
|
282 |
<h2>
|
283 |
-
<?php esc_html_e( 'Get
|
284 |
</h2>
|
285 |
|
286 |
<p>
|
287 |
-
<?php esc_html_e( 'WP Mail SMTP
|
288 |
</p>
|
289 |
|
290 |
<p>
|
291 |
-
<?php
|
292 |
-
printf(
|
293 |
-
wp_kses(
|
294 |
-
/* translators: %s - WPForms.com URL. */
|
295 |
-
__( '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.', 'wp-mail-smtp' ),
|
296 |
-
array(
|
297 |
-
'a' => array(
|
298 |
-
'href' => array(),
|
299 |
-
'target' => array(),
|
300 |
-
'rel' => array(),
|
301 |
-
),
|
302 |
-
)
|
303 |
-
),
|
304 |
-
'https://wpforms.com/?discount=THANKYOU&utm_source=WordPress&utm_medium=settings-cta&utm_campaign=smtpplugin'
|
305 |
-
);
|
306 |
-
?>
|
307 |
</p>
|
308 |
|
309 |
-
<p>
|
310 |
-
<?php
|
311 |
-
printf(
|
312 |
-
/* translators: %s - link to WP.org repo and 5 HTML encoded stars as a label. */
|
313 |
-
esc_html__( 'We know that you will truly love WPForms. It has over 2000+ five star ratings (%s) and is active on over 1 million websites.', 'wp-mail-smtp' ),
|
314 |
-
'<a href="https://wordpress.org/support/plugin/wpforms-lite/reviews/?filter=5" target="_blank" rel="noopener noreferrer" class="stars"><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span></a>'
|
315 |
-
);
|
316 |
-
?>
|
317 |
-
</p>
|
318 |
-
|
319 |
-
<p><strong><?php esc_html_e( 'Other Benefits:', 'wp-mail-smtp' ); ?></strong></p>
|
320 |
|
321 |
<div class="benefits">
|
322 |
<ul>
|
323 |
-
<li><?php esc_html_e( '
|
324 |
-
<li><?php esc_html_e( '
|
325 |
-
<li><?php esc_html_e( '
|
326 |
-
<li><?php esc_html_e( '
|
|
|
|
|
327 |
</ul>
|
328 |
<ul>
|
329 |
-
<li><?php esc_html_e( '
|
330 |
-
<li><?php esc_html_e( '
|
331 |
-
<li><?php esc_html_e( '
|
332 |
-
<li><?php esc_html_e( '
|
|
|
|
|
333 |
</ul>
|
334 |
</div>
|
335 |
|
336 |
<p>
|
337 |
<?php
|
338 |
printf(
|
339 |
-
wp_kses(
|
340 |
-
|
341 |
-
__( '<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.', 'wp-mail-smtp' ),
|
342 |
array(
|
343 |
'a' => array(
|
344 |
'href' => array(),
|
@@ -348,8 +405,21 @@ class Settings extends PageAbstract {
|
|
348 |
'strong' => array(),
|
349 |
)
|
350 |
),
|
351 |
-
'https://
|
352 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
353 |
);
|
354 |
?>
|
355 |
</p>
|
14 |
*/
|
15 |
class Settings extends PageAbstract {
|
16 |
|
17 |
+
/**
|
18 |
+
* Settings constructor.
|
19 |
+
*
|
20 |
+
* @since 1.5.0
|
21 |
+
*/
|
22 |
+
public function __construct() {
|
23 |
+
|
24 |
+
add_action( 'wp_mail_smtp_admin_pages_settings_license_key', array( __CLASS__, 'display_license_key_field_content' ) );
|
25 |
+
}
|
26 |
+
|
27 |
/**
|
28 |
* @var string Slug of a tab.
|
29 |
*/
|
33 |
* @inheritdoc
|
34 |
*/
|
35 |
public function get_label() {
|
36 |
+
return esc_html__( 'General', 'wp-mail-smtp' );
|
37 |
}
|
38 |
|
39 |
/**
|
48 |
*/
|
49 |
public function display() {
|
50 |
|
51 |
+
$options = new Options();
|
52 |
+
$mailer = $options->get( 'mail', 'mailer' );
|
53 |
+
|
54 |
+
$disabled_email = 'gmail' === $mailer || 'outlook' === $mailer ? 'disabled' : '';
|
55 |
+
$disabled_name = 'outlook' === $mailer ? 'disabled' : '';
|
56 |
?>
|
57 |
|
58 |
<form method="POST" action="" autocomplete="off">
|
59 |
<?php $this->wp_nonce_field(); ?>
|
60 |
|
61 |
+
<!-- License Section Title -->
|
62 |
+
<div class="wp-mail-smtp-setting-row wp-mail-smtp-setting-row-content wp-mail-smtp-clear section-heading" id="wp-mail-smtp-setting-row-license-heading">
|
63 |
+
<div class="wp-mail-smtp-setting-field">
|
64 |
+
<h2><?php esc_html_e( 'License', 'wp-mail-smtp' ); ?></h2>
|
65 |
+
|
66 |
+
<p class="desc">
|
67 |
+
<?php esc_html_e( 'Your license key provides access to updates and support.', 'wp-mail-smtp' ); ?>
|
68 |
+
</p>
|
69 |
+
</div>
|
70 |
+
</div>
|
71 |
+
|
72 |
+
<!-- License Key -->
|
73 |
+
<div id="wp-mail-smtp-setting-row-license_key" class="wp-mail-smtp-setting-row wp-mail-smtp-setting-row-license_key wp-mail-smtp-clear">
|
74 |
+
<div class="wp-mail-smtp-setting-label">
|
75 |
+
<label for="wp-mail-smtp-setting-license_key"><?php esc_html_e( 'License Key', 'wp-mail-smtp' ); ?></label>
|
76 |
+
</div>
|
77 |
+
<div class="wp-mail-smtp-setting-field">
|
78 |
+
<?php do_action( 'wp_mail_smtp_admin_pages_settings_license_key', $options ); ?>
|
79 |
+
</div>
|
80 |
+
</div>
|
81 |
+
|
82 |
<!-- Mail Section Title -->
|
83 |
<div class="wp-mail-smtp-setting-row wp-mail-smtp-setting-row-content wp-mail-smtp-clear section-heading no-desc" id="wp-mail-smtp-setting-row-email-heading">
|
84 |
<div class="wp-mail-smtp-setting-field">
|
94 |
<div class="wp-mail-smtp-setting-field">
|
95 |
<input name="wp-mail-smtp[mail][from_email]" type="email"
|
96 |
value="<?php echo esc_attr( $options->get( 'mail', 'from_email' ) ); ?>"
|
97 |
+
<?php echo $options->is_const_defined( 'mail', 'from_email' ) || ! empty( $disabled_email ) ? 'disabled' : ''; ?>
|
98 |
id="wp-mail-smtp-setting-from_email" spellcheck="false"
|
99 |
placeholder="<?php echo esc_attr( wp_mail_smtp()->get_processor()->get_default_email() ); ?>">
|
100 |
|
101 |
+
<?php if ( empty( $disabled_email ) ) : ?>
|
|
|
|
|
|
|
|
|
102 |
<p class="desc">
|
103 |
<?php esc_html_e( 'The email address which emails are sent from.', 'wp-mail-smtp' ); ?><br/>
|
104 |
<?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' ); ?>
|
112 |
|
113 |
<input name="wp-mail-smtp[mail][from_email_force]" type="checkbox"
|
114 |
value="true" <?php checked( true, (bool) $options->get( 'mail', 'from_email_force' ) ); ?>
|
115 |
+
<?php echo $options->is_const_defined( 'mail', 'from_email_force' ) || ! empty( $disabled_email ) ? 'disabled' : ''; ?>
|
116 |
id="wp-mail-smtp-setting-from_email_force">
|
117 |
|
118 |
<label for="wp-mail-smtp-setting-from_email_force">
|
119 |
<?php esc_html_e( 'Force From Email', 'wp-mail-smtp' ); ?>
|
120 |
</label>
|
121 |
|
122 |
+
<?php if ( ! empty( $disabled_email ) ) : ?>
|
123 |
<p class="desc">
|
124 |
+
<?php esc_html_e( 'Current provider will automatically force From Email to be the email address that you use to set up the connection below.', 'wp-mail-smtp' ); ?>
|
125 |
</p>
|
126 |
<?php else : ?>
|
127 |
<p class="desc">
|
140 |
<div class="wp-mail-smtp-setting-field">
|
141 |
<input name="wp-mail-smtp[mail][from_name]" type="text"
|
142 |
value="<?php echo esc_attr( $options->get( 'mail', 'from_name' ) ); ?>"
|
143 |
+
<?php echo $options->is_const_defined( 'mail', 'from_name' ) || ! empty( $disabled_name ) ? 'disabled' : ''; ?>
|
144 |
id="wp-mail-smtp-setting-from_name" spellcheck="false"
|
145 |
placeholder="<?php echo esc_attr( wp_mail_smtp()->get_processor()->get_default_name() ); ?>">
|
146 |
|
147 |
+
<?php if ( empty( $disabled_name ) ) : ?>
|
|
|
|
|
|
|
|
|
148 |
<p class="desc">
|
149 |
<?php esc_html_e( 'The name which emails are sent from.', 'wp-mail-smtp' ); ?>
|
150 |
</p>
|
154 |
|
155 |
<input name="wp-mail-smtp[mail][from_name_force]" type="checkbox"
|
156 |
value="true" <?php checked( true, (bool) $options->get( 'mail', 'from_name_force' ) ); ?>
|
157 |
+
<?php echo $options->is_const_defined( 'mail', 'from_name_force' ) || ! empty( $disabled_name ) ? 'disabled' : ''; ?>
|
158 |
id="wp-mail-smtp-setting-from_name_force">
|
159 |
|
160 |
<label for="wp-mail-smtp-setting-from_name_force">
|
161 |
<?php esc_html_e( 'Force From Name', 'wp-mail-smtp' ); ?>
|
162 |
</label>
|
163 |
|
164 |
+
<?php if ( ! empty( $disabled_name ) ) : ?>
|
165 |
<p class="desc">
|
166 |
+
<?php esc_html_e( 'Current provider doesn\'t support setting and forcing From Name. Emails will be sent on behalf of the account name used to setup the connection below.', 'wp-mail-smtp' ); ?>
|
167 |
</p>
|
168 |
<?php else : ?>
|
169 |
<p class="desc">
|
173 |
</div>
|
174 |
</div>
|
175 |
|
176 |
+
<!-- Return Path -->
|
177 |
+
<div id="wp-mail-smtp-setting-row-return_path" class="wp-mail-smtp-setting-row wp-mail-smtp-setting-row-checkbox wp-mail-smtp-clear">
|
178 |
+
<div class="wp-mail-smtp-setting-label">
|
179 |
+
<label for="wp-mail-smtp-setting-return_path"><?php esc_html_e( 'Return Path', 'wp-mail-smtp' ); ?></label>
|
180 |
+
</div>
|
181 |
+
<div class="wp-mail-smtp-setting-field">
|
182 |
+
<input name="wp-mail-smtp[mail][return_path]" type="checkbox"
|
183 |
+
value="true" <?php checked( true, (bool) $options->get( 'mail', 'return_path' ) ); ?>
|
184 |
+
<?php echo $options->is_const_defined( 'mail', 'return_path' ) ? 'disabled' : ''; ?>
|
185 |
+
id="wp-mail-smtp-setting-return_path">
|
186 |
+
|
187 |
+
<label for="wp-mail-smtp-setting-return_path">
|
188 |
+
<?php esc_html_e( 'Set the return-path to match the From Email', 'wp-mail-smtp' ); ?>
|
189 |
+
</label>
|
190 |
+
|
191 |
+
<p class="desc">
|
192 |
+
<?php esc_html_e( 'Return Path indicates where non-delivery receipts - or bounce messages - are to be sent.', 'wp-mail-smtp' ); ?><br/>
|
193 |
+
<?php esc_html_e( 'If unchecked, bounce messages may be lost. Some providers may ignore this option.', 'wp-mail-smtp' ); ?>
|
194 |
+
</p>
|
195 |
+
</div>
|
196 |
+
</div>
|
197 |
+
|
198 |
<!-- Mailer -->
|
199 |
<div id="wp-mail-smtp-setting-row-mailer" class="wp-mail-smtp-setting-row wp-mail-smtp-setting-row-mailer wp-mail-smtp-clear">
|
200 |
<div class="wp-mail-smtp-setting-label">
|
205 |
|
206 |
<?php foreach ( wp_mail_smtp()->get_providers()->get_options_all() as $provider ) : ?>
|
207 |
|
208 |
+
<div class="wp-mail-smtp-mailer wp-mail-smtp-mailer-<?php echo esc_attr( $provider->get_slug() ); ?> <?php echo $mailer === $provider->get_slug() ? 'active' : ''; ?>">
|
209 |
<div class="wp-mail-smtp-mailer-image">
|
210 |
<img src="<?php echo esc_url( $provider->get_logo_url() ); ?>"
|
211 |
alt="<?php echo esc_attr( $provider->get_title() ); ?>">
|
230 |
</div>
|
231 |
</div>
|
232 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
233 |
<!-- Mailer Options -->
|
234 |
<div class="wp-mail-smtp-mailer-options">
|
235 |
<?php foreach ( wp_mail_smtp()->get_providers()->get_options_all() as $provider ) : ?>
|
254 |
|
255 |
</div>
|
256 |
|
257 |
+
<?php $this->display_save_btn(); ?>
|
|
|
|
|
258 |
|
259 |
</form>
|
260 |
|
261 |
<?php
|
262 |
$this->display_wpforms();
|
263 |
+
$this->display_pro_banner();
|
264 |
}
|
265 |
|
266 |
/**
|
267 |
+
* License key text for a Lite version of the plugin.
|
268 |
+
*
|
269 |
+
* @since 1.5.0
|
270 |
+
*
|
271 |
+
* @param Options $options
|
272 |
+
*/
|
273 |
+
public static function display_license_key_field_content( $options ) {
|
274 |
+
?>
|
275 |
+
|
276 |
+
<p><?php esc_html_e( 'You\'re using WP Mail SMTP Lite - no license needed. Enjoy!', 'wp-mail-smtp' ); ?> 🙂</p>
|
277 |
+
|
278 |
+
<p>
|
279 |
+
<?php
|
280 |
+
printf(
|
281 |
+
wp_kses( /* translators: %s - WPMailSMTP.com upgrade URL. */
|
282 |
+
__( 'To unlock more features consider <strong><a href="%s" target="_blank" rel="noopener noreferrer" class="wp-mail-smtp-upgrade-modal">upgrading to PRO</a></strong>.', 'wp-mail-smtp' ),
|
283 |
+
array(
|
284 |
+
'a' => array(
|
285 |
+
'href' => array(),
|
286 |
+
'class' => array(),
|
287 |
+
'target' => array(),
|
288 |
+
'rel' => array(),
|
289 |
+
),
|
290 |
+
'strong' => array(),
|
291 |
+
)
|
292 |
+
),
|
293 |
+
esc_url( wp_mail_smtp()->get_upgrade_link( 'settings-license' ) )
|
294 |
+
);
|
295 |
+
?>
|
296 |
+
</p>
|
297 |
+
|
298 |
+
<p class="desc">
|
299 |
+
<?php
|
300 |
+
echo wp_kses(
|
301 |
+
__( 'As a valued WP Mail SMTP Lite user you receive <strong>20% off</strong>, automatically applied at checkout!', 'wp-mail-smtp' ),
|
302 |
+
array(
|
303 |
+
'strong' => array(),
|
304 |
+
'br' => array(),
|
305 |
+
)
|
306 |
+
);
|
307 |
+
?>
|
308 |
+
</p>
|
309 |
+
|
310 |
+
<?php
|
311 |
+
}
|
312 |
+
|
313 |
+
/**
|
314 |
+
* Display a WPForms related message.
|
315 |
*
|
316 |
* @since 1.3.0
|
317 |
* @since 1.4.0 Display only to site admins.
|
318 |
+
* @since 1.5.0 Do nothing.
|
319 |
*/
|
320 |
protected function display_wpforms() {
|
321 |
+
/*
|
322 |
+
* Used to have this check:
|
323 |
+
*
|
324 |
+
* $is_dismissed = get_user_meta( get_current_user_id(), 'wp_mail_smtp_wpforms_dismissed', true );
|
325 |
+
*/
|
326 |
+
}
|
327 |
+
|
328 |
+
/**
|
329 |
+
* Display WP Mail SMTP Pro upgrade banner.
|
330 |
+
*
|
331 |
+
* @since 1.5.0
|
332 |
+
*/
|
333 |
+
protected function display_pro_banner() {
|
334 |
|
335 |
// Display only to site admins. Only site admins can install plugins.
|
336 |
if ( ! is_super_admin() ) {
|
337 |
return;
|
338 |
}
|
339 |
|
340 |
+
// Do not display if WP Mail SMTP Pro already installed.
|
341 |
+
if ( wp_mail_smtp()->is_pro() ) {
|
342 |
return;
|
343 |
}
|
344 |
|
345 |
+
$is_dismissed = get_user_meta( get_current_user_id(), 'wp_mail_smtp_pro_banner_dismissed', true );
|
346 |
|
347 |
// Do not display if user dismissed.
|
348 |
if ( (bool) $is_dismissed === true ) {
|
350 |
}
|
351 |
?>
|
352 |
|
353 |
+
<div id="wp-mail-smtp-pro-banner">
|
354 |
|
355 |
+
<span class="wp-mail-smtp-pro-banner-dismiss">
|
356 |
+
<button id="wp-mail-smtp-pro-banner-dismiss">
|
357 |
<span class="dashicons dashicons-dismiss"></span>
|
358 |
</button>
|
359 |
</span>
|
360 |
|
361 |
<h2>
|
362 |
+
<?php esc_html_e( 'Get WP Mail SMTP Pro and Unlock all the Powerful Features', 'wp-mail-smtp' ); ?>
|
363 |
</h2>
|
364 |
|
365 |
<p>
|
366 |
+
<?php esc_html_e( 'Thanks for being a loyal WP Mail SMTP user. Upgrade to WP Mail SMTP Pro to unlock more awesome features and experience why WP Mail SMTP is the most popular SMTP plugin.', 'wp-mail-smtp' ); ?>
|
367 |
</p>
|
368 |
|
369 |
<p>
|
370 |
+
<?php esc_html_e( 'We know that you will truly love WP Mail SMTP. It\'s used by over 1,000,000 websites.', 'wp-mail-smtp' ); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
371 |
</p>
|
372 |
|
373 |
+
<p><strong><?php esc_html_e( 'Pro Features:', 'wp-mail-smtp' ); ?></strong></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
374 |
|
375 |
<div class="benefits">
|
376 |
<ul>
|
377 |
+
<li><?php esc_html_e( 'Manage Notifications - control which emails your site sends', 'wp-mail-smtp' ); ?></li>
|
378 |
+
<li><?php esc_html_e( 'Email Logging - keep track of every email sent from your site', 'wp-mail-smtp' ); ?></li>
|
379 |
+
<li><?php esc_html_e( 'Office 365 - send emails using your Office 365 account', 'wp-mail-smtp' ); ?></li>
|
380 |
+
<li><?php esc_html_e( 'Amazon SES - harness the power of AWS', 'wp-mail-smtp' ); ?></li>
|
381 |
+
<li><?php esc_html_e( 'Outlook.com - send emails using your Outlook.com account', 'wp-mail-smtp' ); ?></li>
|
382 |
+
<li><?php esc_html_e( 'Access to our world class support team', 'wp-mail-smtp' ); ?></li>
|
383 |
</ul>
|
384 |
<ul>
|
385 |
+
<li><?php esc_html_e( 'White Glove Setup - sit back and relax while we handle everything for you', 'wp-mail-smtp' ); ?></li>
|
386 |
+
<li class="arrow-right"><?php esc_html_e( 'Install WP Mail SMTP Pro plugin', 'wp-mail-smtp' ); ?></li>
|
387 |
+
<li class="arrow-right"><?php esc_html_e( 'Set up domain name verification (DNS)', 'wp-mail-smtp' ); ?></li>
|
388 |
+
<li class="arrow-right"><?php esc_html_e( 'Configure Mailgun service', 'wp-mail-smtp' ); ?></li>
|
389 |
+
<li class="arrow-right"><?php esc_html_e( 'Set up WP Mail SMTP Pro plugin', 'wp-mail-smtp' ); ?></li>
|
390 |
+
<li class="arrow-right"><?php esc_html_e( 'Test and verify email delivery', 'wp-mail-smtp' ); ?></li>
|
391 |
</ul>
|
392 |
</div>
|
393 |
|
394 |
<p>
|
395 |
<?php
|
396 |
printf(
|
397 |
+
wp_kses( /* translators: %s - WPMailSMTP.com URL. */
|
398 |
+
__( '<a href="%s" target="_blank" rel="noopener noreferrer">Get WP Mail SMTP Pro Today and Unlock all the Powerful Features »</a>', 'wp-mail-smtp' ),
|
|
|
399 |
array(
|
400 |
'a' => array(
|
401 |
'href' => array(),
|
405 |
'strong' => array(),
|
406 |
)
|
407 |
),
|
408 |
+
'https://wpmailsmtp.com/pricing-lite/?utm_source=WordPress&utm_medium=settings-cta&utm_campaign=plugin'
|
409 |
+
);
|
410 |
+
?>
|
411 |
+
</p>
|
412 |
+
|
413 |
+
<p>
|
414 |
+
<?php
|
415 |
+
echo wp_kses(
|
416 |
+
__( '<strong>Bonus:</strong> WP Mail SMTP users get <span class="price-off">20% off regular price</span>, automatically applied at checkout.', 'wp-mail-smtp' ),
|
417 |
+
array(
|
418 |
+
'strong' => array(),
|
419 |
+
'span' => array(
|
420 |
+
'class' => array(),
|
421 |
+
),
|
422 |
+
)
|
423 |
);
|
424 |
?>
|
425 |
</p>
|
src/Admin/Pages/Test.php
CHANGED
@@ -2,6 +2,7 @@
|
|
2 |
|
3 |
namespace WPMailSMTP\Admin\Pages;
|
4 |
|
|
|
5 |
use WPMailSMTP\Debug;
|
6 |
use WPMailSMTP\MailCatcher;
|
7 |
use WPMailSMTP\Options;
|
@@ -68,7 +69,7 @@ class Test extends PageAbstract {
|
|
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( '
|
72 |
</p>
|
73 |
</div>
|
74 |
</div>
|
@@ -144,8 +145,14 @@ class Test extends PageAbstract {
|
|
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.
|
@@ -154,10 +161,11 @@ class Test extends PageAbstract {
|
|
154 |
// Send the test mail.
|
155 |
$result = wp_mail(
|
156 |
$data['test']['email'],
|
157 |
-
|
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 |
-
|
|
|
|
|
161 |
);
|
162 |
|
163 |
$smtp_debug = ob_get_clean();
|
@@ -276,9 +284,9 @@ class Test extends PageAbstract {
|
|
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 ( !
|
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
|
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;">
|
@@ -291,27 +299,19 @@ class Test extends PageAbstract {
|
|
291 |
</td>
|
292 |
</tr>
|
293 |
<!-- Aside -->
|
294 |
-
<?php if ( !
|
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 |
-
<
|
298 |
-
|
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 & 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 |
-
|
|
|
|
|
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:
|
314 |
-
|
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;">
|
@@ -320,12 +320,8 @@ class Test extends PageAbstract {
|
|
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://
|
324 |
-
|
325 |
-
Upgrade to WPForms Pro Today
|
326 |
-
<?php else : ?>
|
327 |
-
Get WPForms Today
|
328 |
-
<?php endif; ?>
|
329 |
</a>
|
330 |
</td>
|
331 |
</tr>
|
@@ -354,55 +350,38 @@ class Test extends PageAbstract {
|
|
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 (
|
371 |
-
// WPForms
|
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 |
-
}
|
386 |
-
//
|
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
|
393 |
-
|
394 |
-
https://wpforms.com/lite-upgrade/
|
395 |
|
396 |
-
|
397 |
|
398 |
-
|
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 |
-
|
|
|
|
|
406 |
|
407 |
- Jared Atchison
|
408 |
Lead Developer, WP Mail SMTP';
|
@@ -436,7 +415,8 @@ Lead Developer, WP Mail SMTP';
|
|
436 |
*/
|
437 |
protected function get_debug_messages( $phpmailer, $smtp_debug ) {
|
438 |
|
439 |
-
$options
|
|
|
440 |
|
441 |
$this->debug['mailer'] = $options->get( 'mail', 'mailer' );
|
442 |
|
@@ -459,6 +439,9 @@ Lead Developer, WP Mail SMTP';
|
|
459 |
|
460 |
$mailer_text .= '<strong>Mailer:</strong> ' . $this->debug['mailer'] . '<br>';
|
461 |
$mailer_text .= '<strong>Constants:</strong> ' . ( $options->is_const_enabled() ? 'Yes' : 'No' ) . '<br>';
|
|
|
|
|
|
|
462 |
|
463 |
// Display different debug info based on the mailer.
|
464 |
$mailer = wp_mail_smtp()->get_providers()->get_mailer( $this->debug['mailer'], $phpmailer );
|
@@ -682,6 +665,21 @@ Lead Developer, WP Mail SMTP';
|
|
682 |
esc_html__( 'Verify with your SMTP host that your account has permissions to send emails using outside connections.', 'wp-mail-smtp' ),
|
683 |
),
|
684 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
685 |
// [mailgun] - Forbidden.
|
686 |
array(
|
687 |
'mailer' => 'mailgun',
|
@@ -707,7 +705,7 @@ Lead Developer, WP Mail SMTP';
|
|
707 |
'description' => array(
|
708 |
'<strong>' . esc_html__( 'Mailgun failed.', 'wp-mail-smtp' ) . '</strong>',
|
709 |
esc_html__( 'Your Mailgun account does not have access to send emails.', 'wp-mail-smtp' ),
|
710 |
-
esc_html__( 'Typically this error is because you have not
|
711 |
),
|
712 |
'steps' => array(
|
713 |
sprintf(
|
@@ -1029,93 +1027,86 @@ Lead Developer, WP Mail SMTP';
|
|
1029 |
|
1030 |
<h2><?php esc_html_e( 'Need support?', 'wp-mail-smtp' ); ?></h2>
|
1031 |
|
1032 |
-
<?php if (
|
1033 |
|
1034 |
-
|
1035 |
-
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
1039 |
-
|
1040 |
-
|
1041 |
-
|
1042 |
-
|
1043 |
-
|
1044 |
-
|
1045 |
-
)
|
1046 |
-
)
|
1047 |
-
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
</p>
|
1052 |
|
1053 |
<?php else : ?>
|
1054 |
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
1058 |
|
1059 |
-
|
1060 |
-
|
1061 |
-
|
1062 |
-
|
1063 |
-
|
1064 |
-
|
1065 |
-
|
1066 |
-
|
1067 |
-
|
1068 |
-
|
1069 |
-
|
1070 |
-
)
|
1071 |
-
)
|
1072 |
-
|
1073 |
-
|
1074 |
-
|
1075 |
-
|
1076 |
-
</p>
|
1077 |
|
1078 |
-
|
1079 |
-
|
1080 |
-
|
1081 |
-
|
1082 |
-
|
1083 |
-
|
|
|
|
|
1084 |
array(
|
1085 |
'span' => array(
|
1086 |
'class' => array(),
|
1087 |
),
|
1088 |
)
|
1089 |
-
)
|
1090 |
-
|
1091 |
-
|
1092 |
-
|
1093 |
-
|
1094 |
-
|
1095 |
-
|
1096 |
-
|
1097 |
-
|
1098 |
-
|
1099 |
-
|
1100 |
-
|
1101 |
-
|
1102 |
-
|
1103 |
-
|
1104 |
-
|
1105 |
-
|
1106 |
-
|
1107 |
-
|
1108 |
-
|
1109 |
-
|
1110 |
-
|
1111 |
-
|
1112 |
-
),
|
1113 |
-
'https://wordpress.org/support/topic/wp-mail-smtp-support-policy/',
|
1114 |
-
'https://wordpress.org/support/plugin/wp-mail-smtp/',
|
1115 |
-
'https://wpforms.com/?discount=THANKYOU&utm_source=WordPress&utm_medium=debug-cta&utm_campaign=smtpplugin'
|
1116 |
-
);
|
1117 |
-
?>
|
1118 |
-
</p>
|
1119 |
|
1120 |
<?php endif; ?>
|
1121 |
|
2 |
|
3 |
namespace WPMailSMTP\Admin\Pages;
|
4 |
|
5 |
+
use WPMailSMTP\Conflicts;
|
6 |
use WPMailSMTP\Debug;
|
7 |
use WPMailSMTP\MailCatcher;
|
8 |
use WPMailSMTP\Options;
|
69 |
<input name="wp-mail-smtp[test][email]" value="<?php echo esc_attr( wp_get_current_user()->user_email ); ?>"
|
70 |
type="email" id="wp-mail-smtp-setting-test_email" spellcheck="false" required>
|
71 |
<p class="desc">
|
72 |
+
<?php esc_html_e( 'Enter email address where test email will be sent.', 'wp-mail-smtp' ); ?>
|
73 |
</p>
|
74 |
</div>
|
75 |
</div>
|
145 |
// Set SMTPDebug level, default is 3 (commands + data + connection status).
|
146 |
$phpmailer->SMTPDebug = apply_filters( 'wp_mail_smtp_admin_test_email_smtp_debug', 3 );
|
147 |
|
148 |
+
/* translators: %s - email address a test email will be sent to. */
|
149 |
+
$subject = 'WP Mail SMTP: ' . sprintf( esc_html__( 'Test email to %s', 'wp-mail-smtp' ), $data['test']['email'] );
|
150 |
+
|
151 |
if ( $is_html ) {
|
152 |
add_filter( 'wp_mail_content_type', array( __CLASS__, 'set_test_html_content_type' ) );
|
153 |
+
|
154 |
+
/* translators: %s - email address a test email will be sent to. */
|
155 |
+
$subject = 'WP Mail SMTP: HTML ' . sprintf( esc_html__( 'Test email to %s', 'wp-mail-smtp' ), $data['test']['email'] );
|
156 |
}
|
157 |
|
158 |
// Start output buffering to grab smtp debugging output.
|
161 |
// Send the test mail.
|
162 |
$result = wp_mail(
|
163 |
$data['test']['email'],
|
164 |
+
$subject,
|
|
|
165 |
$this->get_email_message( $is_html ),
|
166 |
+
array(
|
167 |
+
'X-Mailer-Type:WPMailSMTP/Admin/Test',
|
168 |
+
)
|
169 |
);
|
170 |
|
171 |
$smtp_debug = ob_get_clean();
|
284 |
<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;">
|
285 |
Thank you for trying out WP Mail SMTP. We're on a mission to make sure that your emails actually get delivered.
|
286 |
</p>
|
287 |
+
<?php if ( ! wp_mail_smtp()->is_pro() ) : ?>
|
288 |
<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;">
|
289 |
+
If you find this free plugin useful, please consider giving WP Mail SMTP Pro a try!
|
290 |
</p>
|
291 |
<?php endif; ?>
|
292 |
<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;">
|
299 |
</td>
|
300 |
</tr>
|
301 |
<!-- Aside -->
|
302 |
+
<?php if ( ! wp_mail_smtp()->is_pro() ) : ?>
|
303 |
<tr style="padding: 0; vertical-align: top; text-align: left;">
|
304 |
<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;">
|
305 |
+
<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 15px 0; Margin: 0 0 15px 0;">
|
306 |
+
Unlock More Features with WP Mail SMTP Pro
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
307 |
</h6>
|
|
|
|
|
|
|
308 |
<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;">
|
309 |
+
Email Logs and Notification Controls<br>
|
310 |
+
Amazon SES / Outlook.com / Office 365 integrations<br>
|
311 |
+
Access to our world class support team
|
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: 13px; text-align: center; margin: 0 0 0 0; Margin: 0 0 0 0;">
|
314 |
+
WP Mail SMTP users get <span style="font-weight:700;color:#218900;">20% off</span>, automatically applied at checkout
|
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;">
|
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://wpmailsmtp.com/pricing-lite/?utm_source=WordPress&utm_medium=email-cta&utm_campaign=plugin" 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 |
+
Upgrade to WP Mail SMTP Pro Today
|
|
|
|
|
|
|
|
|
325 |
</a>
|
326 |
</td>
|
327 |
</tr>
|
350 |
* Get the plain text prepared message for test email.
|
351 |
*
|
352 |
* @since 1.4.0
|
353 |
+
* @since 1.5.0 Display an upsell to WP Mail SMTP Pro if free version installed.
|
354 |
*
|
355 |
* @return string
|
356 |
*/
|
357 |
private function get_email_message_text() {
|
358 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
359 |
// phpcs:disable
|
360 |
+
if ( wp_mail_smtp()->is_pro() ) {
|
361 |
+
// WP Mail SMTP Pro & WPForms paid installed.
|
362 |
$message =
|
363 |
'Congrats, test email was sent successfully!
|
364 |
|
365 |
Thank you for trying out WP Mail SMTP. We are on a mission to make sure your emails actually get delivered.
|
366 |
|
|
|
|
|
|
|
|
|
|
|
|
|
367 |
- Jared Atchison
|
368 |
Lead Developer, WP Mail SMTP';
|
369 |
+
} else {
|
370 |
+
// Free WP Mail SMTP is installed.
|
371 |
$message =
|
372 |
'Congrats, test email was sent successfully!
|
373 |
|
374 |
Thank you for trying out WP Mail SMTP. We are on a mission to make sure your emails actually get delivered.
|
375 |
|
376 |
+
If you find this free plugin useful, please consider giving WP Mail SMTP Pro a try!
|
|
|
|
|
377 |
|
378 |
+
https://wpmailsmtp.com/lite-upgrade/
|
379 |
|
380 |
+
Unlock More Features with WP Mail SMTP Pro:
|
|
|
|
|
|
|
|
|
|
|
381 |
|
382 |
+
+ Email Logs and Notification Controls
|
383 |
+
+ Amazon SES / Outlook.com / Office 365 integrations
|
384 |
+
+ Access to our world class support team
|
385 |
|
386 |
- Jared Atchison
|
387 |
Lead Developer, WP Mail SMTP';
|
415 |
*/
|
416 |
protected function get_debug_messages( $phpmailer, $smtp_debug ) {
|
417 |
|
418 |
+
$options = new Options();
|
419 |
+
$conflicts = new Conflicts();
|
420 |
|
421 |
$this->debug['mailer'] = $options->get( 'mail', 'mailer' );
|
422 |
|
439 |
|
440 |
$mailer_text .= '<strong>Mailer:</strong> ' . $this->debug['mailer'] . '<br>';
|
441 |
$mailer_text .= '<strong>Constants:</strong> ' . ( $options->is_const_enabled() ? 'Yes' : 'No' ) . '<br>';
|
442 |
+
if ( $conflicts->is_detected() ) {
|
443 |
+
$mailer_text .= '<strong>Conflicts:</strong> ' . esc_html( $conflicts->get_conflict_name() ) . '<br>';
|
444 |
+
}
|
445 |
|
446 |
// Display different debug info based on the mailer.
|
447 |
$mailer = wp_mail_smtp()->get_providers()->get_mailer( $this->debug['mailer'], $phpmailer );
|
665 |
esc_html__( 'Verify with your SMTP host that your account has permissions to send emails using outside connections.', 'wp-mail-smtp' ),
|
666 |
),
|
667 |
),
|
668 |
+
// [mailgun] - Please activate your Mailgun account.
|
669 |
+
array(
|
670 |
+
'mailer' => 'mailgun',
|
671 |
+
'errors' => array(
|
672 |
+
array( 'Please activate your Mailgun account' ),
|
673 |
+
),
|
674 |
+
'description' => array(
|
675 |
+
'<strong>' . esc_html__( 'Mailgun failed.', 'wp-mail-smtp' ) . '</strong>',
|
676 |
+
esc_html__( 'It seems that you forgot to activate your Mailgun account.', 'wp-mail-smtp' ),
|
677 |
+
),
|
678 |
+
'steps' => array(
|
679 |
+
esc_html__( 'Check your inbox you used to create a Mailgun account. Click the activation link in an email from Mailgun.', 'wp-mail-smtp' ),
|
680 |
+
esc_html__( 'If you do not see activation email, go to your Mailgun control panel and resend the activation email.', 'wp-mail-smtp' ),
|
681 |
+
),
|
682 |
+
),
|
683 |
// [mailgun] - Forbidden.
|
684 |
array(
|
685 |
'mailer' => 'mailgun',
|
705 |
'description' => array(
|
706 |
'<strong>' . esc_html__( 'Mailgun failed.', 'wp-mail-smtp' ) . '</strong>',
|
707 |
esc_html__( 'Your Mailgun account does not have access to send emails.', 'wp-mail-smtp' ),
|
708 |
+
esc_html__( 'Typically this error is because you have not set up and/or complete domain name verification for your Mailgun account.', 'wp-mail-smtp' ),
|
709 |
),
|
710 |
'steps' => array(
|
711 |
sprintf(
|
1027 |
|
1028 |
<h2><?php esc_html_e( 'Need support?', 'wp-mail-smtp' ); ?></h2>
|
1029 |
|
1030 |
+
<?php if ( wp_mail_smtp()->is_pro() ) : ?>
|
1031 |
|
1032 |
+
<p>
|
1033 |
+
<?php
|
1034 |
+
printf(
|
1035 |
+
wp_kses( /* translators: %s - WPMailSMTP.com account area link. */
|
1036 |
+
__( 'As a WP Mail SMTP Pro user you have access to WP Mail SMTP priority support. Please log in to your WPMailSMTP.com account and <a href="%s" target="_blank" rel="noopener noreferrer">submit a support ticket</a>.', 'wp-mail-smtp' ),
|
1037 |
+
array(
|
1038 |
+
'a' => array(
|
1039 |
+
'href' => array(),
|
1040 |
+
'rel' => array(),
|
1041 |
+
'target' => array(),
|
1042 |
+
),
|
1043 |
+
)
|
1044 |
+
),
|
1045 |
+
'https://wpmailsmtp.com/account/support/'
|
1046 |
+
);
|
1047 |
+
?>
|
1048 |
+
</p>
|
|
|
1049 |
|
1050 |
<?php else : ?>
|
1051 |
|
1052 |
+
<p>
|
1053 |
+
<?php esc_html_e( 'WP Mail SMTP is a free plugin, and the team behind WPForms maintains it to give back to the WordPress community.', 'wp-mail-smtp' ); ?>
|
1054 |
+
</p>
|
1055 |
|
1056 |
+
<p>
|
1057 |
+
<?php
|
1058 |
+
printf(
|
1059 |
+
wp_kses( /* translators: %s - WPMailSMTP.com URL. */
|
1060 |
+
__( 'To access our world class support, please <a href="%s" target="_blank" rel="noopener noreferrer">upgrade to WP Mail SMTP Pro</a>. Along with getting expert support, you will also get Notification controls, Email Logging, and integrations for Amazon SES, Office 365, and Outlook.com.', 'wp-mail-smtp' ),
|
1061 |
+
array(
|
1062 |
+
'a' => array(
|
1063 |
+
'href' => array(),
|
1064 |
+
'target' => array(),
|
1065 |
+
'rel' => array(),
|
1066 |
+
),
|
1067 |
+
)
|
1068 |
+
),
|
1069 |
+
'https://wpmailsmtp.com/pricing-lite/?utm_source=WordPress&utm_medium=debug-cta&utm_campaign=plugin'
|
1070 |
+
)
|
1071 |
+
?>
|
1072 |
+
</p>
|
|
|
1073 |
|
1074 |
+
<p>
|
1075 |
+
<?php esc_html_e( 'Additionally, you can take advantage of our White Glove Setup. Sit back and relax while we handle everything for you! If you simply don\'t have time or maybe you feel a bit in over your head - we got you covered.', 'wp-mail-smtp' ); ?>
|
1076 |
+
</p>
|
1077 |
+
|
1078 |
+
<p>
|
1079 |
+
<?php
|
1080 |
+
echo wp_kses(
|
1081 |
+
__( 'As a valued WP Mail SMTP user, you will get <span class="price-off">20% off regular pricing</span>, automatically applied at checkout!', 'wp-mail-smtp' ),
|
1082 |
array(
|
1083 |
'span' => array(
|
1084 |
'class' => array(),
|
1085 |
),
|
1086 |
)
|
1087 |
+
);
|
1088 |
+
?>
|
1089 |
+
</p>
|
1090 |
+
|
1091 |
+
<p>
|
1092 |
+
<?php
|
1093 |
+
printf(
|
1094 |
+
wp_kses( /* translators: %1$s - WP Mail SMTP support policy URL, %2$s - WP Mail SMTP support forum URL, %3$s - WPMailSMTP.com URL. */
|
1095 |
+
__( '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">upgrading to WP Mail SMTP Pro</a> to access our priority support ticket system.', 'wp-mail-smtp' ),
|
1096 |
+
array(
|
1097 |
+
'a' => array(
|
1098 |
+
'href' => array(),
|
1099 |
+
'rel' => array(),
|
1100 |
+
'target' => array(),
|
1101 |
+
),
|
1102 |
+
)
|
1103 |
+
),
|
1104 |
+
'https://wordpress.org/support/topic/wp-mail-smtp-support-policy/',
|
1105 |
+
'https://wordpress.org/support/plugin/wp-mail-smtp/',
|
1106 |
+
'https://wpmailsmtp.com/pricing-lite/?utm_source=WordPress&utm_medium=debug-cta&utm_campaign=plugin'
|
1107 |
+
);
|
1108 |
+
?>
|
1109 |
+
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1110 |
|
1111 |
<?php endif; ?>
|
1112 |
|
src/Admin/PluginsInstallSkin.php
ADDED
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace WPMailSMTP\Admin;
|
3 |
+
|
4 |
+
/**
|
5 |
+
* WordPress class extended for on-the-fly plugin installations.
|
6 |
+
*
|
7 |
+
* @since 1.5.0
|
8 |
+
*/
|
9 |
+
class PluginsInstallSkin extends \WP_Upgrader_Skin {
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Set the upgrader object and store it as a property in the parent class.
|
13 |
+
*
|
14 |
+
* @since 1.5.0
|
15 |
+
*
|
16 |
+
* @param object $upgrader The upgrader object (passed by reference).
|
17 |
+
*/
|
18 |
+
public function set_upgrader( &$upgrader ) {
|
19 |
+
|
20 |
+
if ( is_object( $upgrader ) ) {
|
21 |
+
$this->upgrader =& $upgrader;
|
22 |
+
}
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Empty out the header of its HTML content and only check to see if it has
|
27 |
+
* been performed or not.
|
28 |
+
*
|
29 |
+
* @since 1.5.0
|
30 |
+
*/
|
31 |
+
public function header() {
|
32 |
+
}
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Empty out the footer of its HTML contents.
|
36 |
+
*
|
37 |
+
* @since 1.5.0
|
38 |
+
*/
|
39 |
+
public function footer() {
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Instead of outputting HTML for errors, json_encode the errors and send them
|
44 |
+
* back to the Ajax script for processing.
|
45 |
+
*
|
46 |
+
* @since 1.5.0
|
47 |
+
*
|
48 |
+
* @param array $errors Array of errors with the install process.
|
49 |
+
*/
|
50 |
+
public function error( $errors ) {
|
51 |
+
|
52 |
+
if ( ! empty( $errors ) ) {
|
53 |
+
wp_send_json_error( $errors );
|
54 |
+
}
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Empty out the feedback method to prevent outputting HTML strings as the install
|
59 |
+
* is progressing.
|
60 |
+
*
|
61 |
+
* @since 1.5.0
|
62 |
+
*
|
63 |
+
* @param string $string The feedback string.
|
64 |
+
*/
|
65 |
+
public function feedback( $string ) {
|
66 |
+
}
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Empty out JavaScript output that calls function to decrement the update counts.
|
70 |
+
*
|
71 |
+
* @since 1.5.0
|
72 |
+
*
|
73 |
+
* @param string $type Type of update count to decrement.
|
74 |
+
*/
|
75 |
+
public function decrement_update_count( $type ) {
|
76 |
+
}
|
77 |
+
}
|
78 |
+
|
src/Conflicts.php
ADDED
@@ -0,0 +1,185 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WPMailSMTP;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Class Conflicts
|
7 |
+
*
|
8 |
+
* @since 1.5.0
|
9 |
+
*/
|
10 |
+
class Conflicts {
|
11 |
+
|
12 |
+
/**
|
13 |
+
* @since 1.5.0
|
14 |
+
*
|
15 |
+
* @var array List of plugins WP Mail SMTP may be conflicting with.
|
16 |
+
*/
|
17 |
+
public static $plugins = array(
|
18 |
+
'swpsmtp_init_smtp' => array(
|
19 |
+
'name' => 'Easy WP SMTP',
|
20 |
+
),
|
21 |
+
'postman_start' => array(
|
22 |
+
'name' => 'Postman SMTP',
|
23 |
+
),
|
24 |
+
'post_start' => array(
|
25 |
+
'name' => 'Post SMTP Mailer/Email Log',
|
26 |
+
),
|
27 |
+
'mail_bank' => array(
|
28 |
+
'name' => 'WP Mail Bank',
|
29 |
+
),
|
30 |
+
'SMTP_MAILER' => array(
|
31 |
+
'name' => 'SMTP Mailer',
|
32 |
+
'class' => true,
|
33 |
+
),
|
34 |
+
'GMAIL_SMTP' => array(
|
35 |
+
'name' => 'Gmail SMTP',
|
36 |
+
'class' => true,
|
37 |
+
),
|
38 |
+
'WP_Email_Smtp' => array(
|
39 |
+
'name' => 'WP Email SMTP',
|
40 |
+
'class' => true,
|
41 |
+
),
|
42 |
+
'smtpmail_include' => array(
|
43 |
+
'name' => 'SMTP Mail',
|
44 |
+
),
|
45 |
+
'bwssmtp_init' => array(
|
46 |
+
'name' => 'SMTP by BestWebSoft',
|
47 |
+
),
|
48 |
+
'WPSendGrid_SMTP' => array(
|
49 |
+
'name' => 'WP SendGrid SMTP',
|
50 |
+
'class' => true,
|
51 |
+
),
|
52 |
+
'sar_friendly_smtp' => array(
|
53 |
+
'name' => 'SAR Friendly SMTP',
|
54 |
+
),
|
55 |
+
'WPGmail_SMTP' => array(
|
56 |
+
'name' => 'WP Gmail SMTP',
|
57 |
+
'class' => true,
|
58 |
+
),
|
59 |
+
'st_smtp_check_config' => array(
|
60 |
+
'name' => 'Cimy Swift SMTP',
|
61 |
+
),
|
62 |
+
'WP_Easy_SMTP' => array(
|
63 |
+
'name' => 'WP Easy SMTP',
|
64 |
+
'class' => true,
|
65 |
+
),
|
66 |
+
'WPMailgun_SMTP' => array(
|
67 |
+
'name' => 'WP Mailgun SMTP',
|
68 |
+
'class' => true,
|
69 |
+
),
|
70 |
+
'my_smtp_wp' => array(
|
71 |
+
'name' => 'MY SMTP WP',
|
72 |
+
),
|
73 |
+
'mail_booster' => array(
|
74 |
+
'name' => 'WP Mail Booster',
|
75 |
+
),
|
76 |
+
'Sendgrid_Settings' => array(
|
77 |
+
'name' => 'SendGrid',
|
78 |
+
'class' => true,
|
79 |
+
),
|
80 |
+
'WPMS_php_mailer' => array(
|
81 |
+
'name' => 'WP Mail Smtp Mailer',
|
82 |
+
),
|
83 |
+
'WPAmazonSES_SMTP' => array(
|
84 |
+
'name' => 'WP Amazon SES SMTP',
|
85 |
+
'class' => true,
|
86 |
+
),
|
87 |
+
'Postmark_Mail' => array(
|
88 |
+
'name' => 'Postmark for WordPress',
|
89 |
+
'class' => true,
|
90 |
+
),
|
91 |
+
'Mailgun' => array(
|
92 |
+
'name' => 'Mailgun',
|
93 |
+
'class' => true,
|
94 |
+
),
|
95 |
+
'SparkPost' => array(
|
96 |
+
'name' => 'SparkPost',
|
97 |
+
'class' => true,
|
98 |
+
),
|
99 |
+
'WPYahoo_SMTP' => array(
|
100 |
+
'name' => 'WP Yahoo SMTP',
|
101 |
+
'class' => true,
|
102 |
+
),
|
103 |
+
'wpses_init' => array(
|
104 |
+
'name' => 'WP SES',
|
105 |
+
'class' => true,
|
106 |
+
),
|
107 |
+
'TSPHPMailer' => array(
|
108 |
+
'name' => 'turboSMTP',
|
109 |
+
),
|
110 |
+
'WP_SMTP' => array(
|
111 |
+
'name' => 'WP SMTP',
|
112 |
+
'class' => true,
|
113 |
+
),
|
114 |
+
);
|
115 |
+
|
116 |
+
/**
|
117 |
+
* @var array Conflict information.
|
118 |
+
*/
|
119 |
+
protected $conflict = array();
|
120 |
+
|
121 |
+
/**
|
122 |
+
* Whether we have a conflict with predefined list of plugins.
|
123 |
+
*
|
124 |
+
* @since 1.5.0
|
125 |
+
*
|
126 |
+
* @return bool
|
127 |
+
*/
|
128 |
+
public function is_detected() {
|
129 |
+
|
130 |
+
foreach ( self::$plugins as $callback => $plugin ) {
|
131 |
+
if ( ! empty( $plugin['class'] ) ) {
|
132 |
+
$detected = \class_exists( $callback, false );
|
133 |
+
} else {
|
134 |
+
$detected = \function_exists( $callback );
|
135 |
+
}
|
136 |
+
|
137 |
+
if ( $detected ) {
|
138 |
+
$this->conflict = $plugin;
|
139 |
+
break;
|
140 |
+
}
|
141 |
+
}
|
142 |
+
|
143 |
+
return ! empty( $this->conflict );
|
144 |
+
}
|
145 |
+
|
146 |
+
/**
|
147 |
+
* Add a warning admin message to a user about the conflicting plugin.
|
148 |
+
*
|
149 |
+
* @since 1.5.0
|
150 |
+
*/
|
151 |
+
public function notify() {
|
152 |
+
|
153 |
+
if ( empty( $this->conflict ) ) {
|
154 |
+
return;
|
155 |
+
}
|
156 |
+
|
157 |
+
WP::add_admin_notice(
|
158 |
+
\sprintf(
|
159 |
+
/* translators: %1$s - Plugin name causing conflict; %2$s - Plugin name causing conflict. */
|
160 |
+
\esc_html__( 'Heads up! WP Mail SMTP has detected %1$s is activated. Please deactivate %2$s to prevent conflicts.', 'wp-mail-smtp' ),
|
161 |
+
$this->get_conflict_name(),
|
162 |
+
$this->get_conflict_name()
|
163 |
+
),
|
164 |
+
WP::ADMIN_NOTICE_WARNING
|
165 |
+
);
|
166 |
+
}
|
167 |
+
|
168 |
+
/**
|
169 |
+
* Get the conflicting plugin name is any.
|
170 |
+
*
|
171 |
+
* @since 1.5.0
|
172 |
+
*
|
173 |
+
* @return null|string
|
174 |
+
*/
|
175 |
+
public function get_conflict_name() {
|
176 |
+
|
177 |
+
$name = null;
|
178 |
+
|
179 |
+
if ( ! empty( $this->conflict['name'] ) ) {
|
180 |
+
$name = $this->conflict['name'];
|
181 |
+
}
|
182 |
+
|
183 |
+
return $name;
|
184 |
+
}
|
185 |
+
}
|
src/Core.php
CHANGED
@@ -10,18 +10,41 @@ namespace WPMailSMTP;
|
|
10 |
class Core {
|
11 |
|
12 |
/**
|
13 |
-
*
|
14 |
*
|
15 |
-
* @
|
|
|
|
|
16 |
*/
|
17 |
public $plugin_url;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
/**
|
19 |
-
*
|
|
|
|
|
20 |
*
|
21 |
-
* @var string
|
22 |
*/
|
23 |
public $plugin_path;
|
24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
/**
|
26 |
* Core constructor.
|
27 |
*
|
@@ -30,9 +53,96 @@ class Core {
|
|
30 |
public function __construct() {
|
31 |
|
32 |
$this->plugin_url = rtrim( plugin_dir_url( __DIR__ ), '/\\' );
|
|
|
33 |
$this->plugin_path = rtrim( plugin_dir_path( __DIR__ ), '/\\' );
|
34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
$this->hooks();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
}
|
37 |
|
38 |
/**
|
@@ -43,14 +153,14 @@ class Core {
|
|
43 |
public function hooks() {
|
44 |
|
45 |
// Activation hook.
|
46 |
-
add_action( '
|
47 |
|
48 |
// Redefine PHPMailer.
|
49 |
add_action( 'plugins_loaded', array( $this, 'get_processor' ) );
|
50 |
add_action( 'plugins_loaded', array( $this, 'replace_phpmailer' ) );
|
51 |
|
52 |
-
//
|
53 |
-
add_action( '
|
54 |
|
55 |
add_action( 'init', array( $this, 'init' ) );
|
56 |
}
|
@@ -59,11 +169,12 @@ class Core {
|
|
59 |
* Initial plugin actions.
|
60 |
*
|
61 |
* @since 1.0.0
|
|
|
62 |
*/
|
63 |
public function init() {
|
64 |
|
65 |
// Load translations just in case.
|
66 |
-
load_plugin_textdomain( 'wp-mail-smtp', false, plugin_basename( wp_mail_smtp()->plugin_path ) . '/languages' );
|
67 |
|
68 |
/*
|
69 |
* Constantly check in admin area, that we don't need to upgrade DB.
|
@@ -87,6 +198,59 @@ class Core {
|
|
87 |
add_action( 'admin_notices', array( '\WPMailSMTP\WP', 'display_admin_notices' ) );
|
88 |
add_action( 'admin_notices', array( $this, 'display_general_notices' ) );
|
89 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
}
|
91 |
|
92 |
/**
|
@@ -180,12 +344,51 @@ class Core {
|
|
180 |
}
|
181 |
|
182 |
/**
|
183 |
-
*
|
184 |
*
|
185 |
* @since 1.0.0
|
186 |
*/
|
187 |
public function init_notifications() {
|
188 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
189 |
if ( Options::init()->get( 'general', 'am_notifications_hidden' ) ) {
|
190 |
return;
|
191 |
}
|
@@ -207,12 +410,11 @@ class Core {
|
|
207 |
if ( Options::init()->get( 'general', 'do_not_send' ) ) {
|
208 |
?>
|
209 |
|
210 |
-
<div
|
211 |
<p>
|
212 |
<?php
|
213 |
printf(
|
214 |
-
wp_kses(
|
215 |
-
/* translators: %1$s - plugin name and its version, %2$s - plugin Misc settings page. */
|
216 |
__( '<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' ),
|
217 |
array(
|
218 |
'strong' => array(),
|
@@ -237,12 +439,11 @@ class Core {
|
|
237 |
if ( ! empty( $notice ) ) {
|
238 |
?>
|
239 |
|
240 |
-
<div
|
241 |
<p>
|
242 |
<?php
|
243 |
printf(
|
244 |
-
wp_kses(
|
245 |
-
/* translators: %s - plugin name and its version. */
|
246 |
__( '<strong>EMAIL DELIVERY ERROR:</strong> the plugin %s logged this error during the last time it tried to send an email:', 'wp-mail-smtp' ),
|
247 |
array(
|
248 |
'strong' => array(),
|
@@ -261,8 +462,7 @@ class Core {
|
|
261 |
<?php
|
262 |
if ( ! wp_mail_smtp()->get_admin()->is_admin_page() ) {
|
263 |
printf(
|
264 |
-
wp_kses(
|
265 |
-
/* translators: %s - plugin admin page URL. */
|
266 |
__( 'Please review your WP Mail SMTP settings in <a href="%s">plugin admin area</a>.' ) . ' ',
|
267 |
array(
|
268 |
'a' => array(
|
@@ -295,6 +495,7 @@ class Core {
|
|
295 |
* @return bool
|
296 |
*/
|
297 |
protected function is_new_install() {
|
|
|
298 |
/*
|
299 |
* No previously installed 0.*.
|
300 |
* 'wp_mail_smtp_initial_version' option appeared in 1.3.0. So we make sure it exists.
|
@@ -315,6 +516,7 @@ class Core {
|
|
315 |
* Detect if there are plugins activated that will cause a conflict.
|
316 |
*
|
317 |
* @since 1.3.0
|
|
|
318 |
*/
|
319 |
public function detect_conflicts() {
|
320 |
|
@@ -323,120 +525,10 @@ class Core {
|
|
323 |
return;
|
324 |
}
|
325 |
|
326 |
-
$conflicts =
|
327 |
-
'swpsmtp_init_smtp' => array(
|
328 |
-
'name' => 'Easy WP SMTP',
|
329 |
-
),
|
330 |
-
'postman_start' => array(
|
331 |
-
'name' => 'Postman SMTP',
|
332 |
-
),
|
333 |
-
'post_start' => array(
|
334 |
-
'name' => 'Post SMTP Mailer/Email Log',
|
335 |
-
),
|
336 |
-
'mail_bank' => array(
|
337 |
-
'name' => 'WP Mail Bank',
|
338 |
-
),
|
339 |
-
'SMTP_MAILER' => array(
|
340 |
-
'name' => 'SMTP Mailer',
|
341 |
-
'class' => true,
|
342 |
-
),
|
343 |
-
'GMAIL_SMTP' => array(
|
344 |
-
'name' => 'Gmail SMTP',
|
345 |
-
'class' => true,
|
346 |
-
),
|
347 |
-
'WP_Email_Smtp' => array(
|
348 |
-
'name' => 'WP Email SMTP',
|
349 |
-
'class' => true,
|
350 |
-
),
|
351 |
-
'smtpmail_include' => array(
|
352 |
-
'name' => 'SMTP Mail',
|
353 |
-
),
|
354 |
-
'bwssmtp_init' => array(
|
355 |
-
'name' => 'SMTP by BestWebSoft',
|
356 |
-
),
|
357 |
-
'WPSendGrid_SMTP' => array(
|
358 |
-
'name' => 'WP SendGrid SMTP',
|
359 |
-
'class' => true,
|
360 |
-
),
|
361 |
-
'sar_friendly_smtp' => array(
|
362 |
-
'name' => 'SAR Friendly SMTP',
|
363 |
-
),
|
364 |
-
'WPGmail_SMTP' => array(
|
365 |
-
'name' => 'WP Gmail SMTP',
|
366 |
-
'class' => true,
|
367 |
-
),
|
368 |
-
'st_smtp_check_config' => array(
|
369 |
-
'name' => 'Cimy Swift SMTP',
|
370 |
-
),
|
371 |
-
'WP_Easy_SMTP' => array(
|
372 |
-
'name' => 'WP Easy SMTP',
|
373 |
-
'class' => true,
|
374 |
-
),
|
375 |
-
'WPMailgun_SMTP' => array(
|
376 |
-
'name' => 'WP Mailgun SMTP',
|
377 |
-
'class' => true,
|
378 |
-
),
|
379 |
-
'my_smtp_wp' => array(
|
380 |
-
'name' => 'MY SMTP WP',
|
381 |
-
),
|
382 |
-
'mail_booster' => array(
|
383 |
-
'name' => 'WP Mail Booster',
|
384 |
-
),
|
385 |
-
'Sendgrid_Settings' => array(
|
386 |
-
'name' => 'SendGrid',
|
387 |
-
'class' => true,
|
388 |
-
),
|
389 |
-
'WPMS_php_mailer' => array(
|
390 |
-
'name' => 'WP Mail Smtp Mailer',
|
391 |
-
),
|
392 |
-
'WPAmazonSES_SMTP' => array(
|
393 |
-
'name' => 'WP Amazon SES SMTP',
|
394 |
-
'class' => true,
|
395 |
-
),
|
396 |
-
'Postmark_Mail' => array(
|
397 |
-
'name' => 'Postmark for WordPress',
|
398 |
-
'class' => true,
|
399 |
-
),
|
400 |
-
'Mailgun' => array(
|
401 |
-
'name' => 'Mailgun',
|
402 |
-
'class' => true,
|
403 |
-
),
|
404 |
-
'SparkPost' => array(
|
405 |
-
'name' => 'SparkPost',
|
406 |
-
'class' => true,
|
407 |
-
),
|
408 |
-
'WPYahoo_SMTP' => array(
|
409 |
-
'name' => 'WP Yahoo SMTP',
|
410 |
-
'class' => true,
|
411 |
-
),
|
412 |
-
'wpses_init' => array(
|
413 |
-
'name' => 'WP SES',
|
414 |
-
'class' => true,
|
415 |
-
),
|
416 |
-
'TSPHPMailer' => array(
|
417 |
-
'name' => 'turboSMTP',
|
418 |
-
),
|
419 |
-
);
|
420 |
-
|
421 |
-
foreach ( $conflicts as $id => $conflict ) {
|
422 |
-
if ( ! empty( $conflict['class'] ) ) {
|
423 |
-
$detected = class_exists( $id, false );
|
424 |
-
} else {
|
425 |
-
$detected = function_exists( $id );
|
426 |
-
}
|
427 |
|
428 |
-
|
429 |
-
|
430 |
-
sprintf(
|
431 |
-
/* translators: %1$s - Plugin name causing conflict; %2$s - Plugin name causing conflict. */
|
432 |
-
esc_html__( 'Heads up! WP Mail SMTP has detected %1$s is activated. Please deactivate %2$s to prevent conflicts.', 'wp-mail-smtp' ),
|
433 |
-
$conflict['name'],
|
434 |
-
$conflict['name']
|
435 |
-
),
|
436 |
-
WP::ADMIN_NOTICE_WARNING
|
437 |
-
);
|
438 |
-
return;
|
439 |
-
}
|
440 |
}
|
441 |
}
|
442 |
|
@@ -448,6 +540,7 @@ class Core {
|
|
448 |
* @return \WPMailSMTP\MailCatcher
|
449 |
*/
|
450 |
public function replace_phpmailer() {
|
|
|
451 |
global $phpmailer;
|
452 |
|
453 |
return $this->replace_w_fake_phpmailer( $phpmailer );
|
@@ -458,13 +551,13 @@ class Core {
|
|
458 |
*
|
459 |
* @since 1.0.0
|
460 |
*
|
461 |
-
* @param null $obj
|
462 |
*
|
463 |
* @return \WPMailSMTP\MailCatcher
|
464 |
*/
|
465 |
protected function replace_w_fake_phpmailer( &$obj = null ) {
|
466 |
|
467 |
-
$obj = new MailCatcher();
|
468 |
|
469 |
return $obj;
|
470 |
}
|
@@ -473,8 +566,12 @@ class Core {
|
|
473 |
* What to do on plugin activation.
|
474 |
*
|
475 |
* @since 1.0.0
|
|
|
|
|
|
|
|
|
476 |
*/
|
477 |
-
public function activate() {
|
478 |
|
479 |
// Store the plugin version when initial install occurred.
|
480 |
add_option( 'wp_mail_smtp_initial_version', WPMS_PLUGIN_VER, '', false );
|
@@ -485,4 +582,66 @@ class Core {
|
|
485 |
// Save default options, only once.
|
486 |
Options::init()->set( Options::get_defaults(), true );
|
487 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
488 |
}
|
10 |
class Core {
|
11 |
|
12 |
/**
|
13 |
+
* URL to plugin directory.
|
14 |
*
|
15 |
+
* @since 1.0.0
|
16 |
+
*
|
17 |
+
* @var string Without trailing slash.
|
18 |
*/
|
19 |
public $plugin_url;
|
20 |
+
|
21 |
+
/**
|
22 |
+
* URL to Lite plugin assets directory.
|
23 |
+
*
|
24 |
+
* @since 1.5.0
|
25 |
+
*
|
26 |
+
* @var string Without trailing slash.
|
27 |
+
*/
|
28 |
+
public $assets_url;
|
29 |
+
|
30 |
/**
|
31 |
+
* Path to plugin directory.
|
32 |
+
*
|
33 |
+
* @since 1.0.0
|
34 |
*
|
35 |
+
* @var string Without trailing slash.
|
36 |
*/
|
37 |
public $plugin_path;
|
38 |
|
39 |
+
/**
|
40 |
+
* Shortcut to get access to Pro functionality using wp_mail_smtp()->pro->example().
|
41 |
+
*
|
42 |
+
* @since 1.5.0
|
43 |
+
*
|
44 |
+
* @var \WPMailSMTP\Pro\Pro
|
45 |
+
*/
|
46 |
+
public $pro;
|
47 |
+
|
48 |
/**
|
49 |
* Core constructor.
|
50 |
*
|
53 |
public function __construct() {
|
54 |
|
55 |
$this->plugin_url = rtrim( plugin_dir_url( __DIR__ ), '/\\' );
|
56 |
+
$this->assets_url = $this->plugin_url . '/assets';
|
57 |
$this->plugin_path = rtrim( plugin_dir_path( __DIR__ ), '/\\' );
|
58 |
|
59 |
+
if ( $this->is_not_loadable() ) {
|
60 |
+
$this->do_not_load();
|
61 |
+
|
62 |
+
return;
|
63 |
+
}
|
64 |
+
|
65 |
+
// Finally, load all the plugin.
|
66 |
$this->hooks();
|
67 |
+
$this->init_early();
|
68 |
+
}
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Currently used for Pro version only.
|
72 |
+
*
|
73 |
+
* @since 1.5.0
|
74 |
+
*
|
75 |
+
* @return bool
|
76 |
+
*/
|
77 |
+
protected function is_not_loadable() {
|
78 |
+
|
79 |
+
// Check the Pro.
|
80 |
+
if (
|
81 |
+
is_readable( $this->plugin_path . '/src/Pro/Pro.php' ) &&
|
82 |
+
! $this->is_pro_allowed()
|
83 |
+
) {
|
84 |
+
// So there is a Pro version, but its PHP version check failed.
|
85 |
+
return true;
|
86 |
+
}
|
87 |
+
|
88 |
+
return false;
|
89 |
+
}
|
90 |
+
|
91 |
+
/**
|
92 |
+
* What to do if plugin is not loaded.
|
93 |
+
*
|
94 |
+
* @since 1.5.0
|
95 |
+
*/
|
96 |
+
protected function do_not_load() {
|
97 |
+
|
98 |
+
add_action( 'admin_notices', function () {
|
99 |
+
|
100 |
+
?>
|
101 |
+
<div class="notice notice-error">
|
102 |
+
<p>
|
103 |
+
<?php
|
104 |
+
printf(
|
105 |
+
wp_kses( /* translators: %1$s - WPBeginner URL for recommended WordPress hosting. */
|
106 |
+
__( 'Your site is running an <strong>insecure version</strong> of PHP that is no longer supported. Please contact your web hosting provider to update your PHP version or switch to a <a href="%1$s" target="_blank" rel="noopener noreferrer">recommended WordPress hosting company</a>.', 'wp-mail-smtp' ),
|
107 |
+
array(
|
108 |
+
'a' => array(
|
109 |
+
'href' => array(),
|
110 |
+
'target' => array(),
|
111 |
+
'rel' => array(),
|
112 |
+
),
|
113 |
+
'strong' => array(),
|
114 |
+
)
|
115 |
+
),
|
116 |
+
'https://www.wpbeginner.com/wordpress-hosting/'
|
117 |
+
);
|
118 |
+
?>
|
119 |
+
<br><br>
|
120 |
+
<?php
|
121 |
+
printf(
|
122 |
+
wp_kses( /* translators: %s - WPForms.com URL for documentation with more details. */
|
123 |
+
__( '<strong>Note:</strong> WP Mail SMTP plugin is disabled on your site until you fix the issue. <a href="%s" target="_blank" rel="noopener noreferrer">Read more for additional information.</a>', 'wp-mail-smtp' ),
|
124 |
+
array(
|
125 |
+
'a' => array(
|
126 |
+
'href' => array(),
|
127 |
+
'target' => array(),
|
128 |
+
'rel' => array(),
|
129 |
+
),
|
130 |
+
'strong' => array(),
|
131 |
+
)
|
132 |
+
),
|
133 |
+
'https://wpforms.com/docs/supported-php-version/'
|
134 |
+
);
|
135 |
+
?>
|
136 |
+
</p>
|
137 |
+
</div>
|
138 |
+
|
139 |
+
<?php
|
140 |
+
|
141 |
+
// In case this is on plugin activation.
|
142 |
+
if ( isset( $_GET['activate'] ) ) { //phpcs:ignore
|
143 |
+
unset( $_GET['activate'] ); //phpcs:ignore
|
144 |
+
}
|
145 |
+
} );
|
146 |
}
|
147 |
|
148 |
/**
|
153 |
public function hooks() {
|
154 |
|
155 |
// Activation hook.
|
156 |
+
add_action( 'activate_plugin', array( $this, 'activate' ), 10, 2 );
|
157 |
|
158 |
// Redefine PHPMailer.
|
159 |
add_action( 'plugins_loaded', array( $this, 'get_processor' ) );
|
160 |
add_action( 'plugins_loaded', array( $this, 'replace_phpmailer' ) );
|
161 |
|
162 |
+
// Various notifications.
|
163 |
+
add_action( 'admin_init', array( $this, 'init_notifications' ) );
|
164 |
|
165 |
add_action( 'init', array( $this, 'init' ) );
|
166 |
}
|
169 |
* Initial plugin actions.
|
170 |
*
|
171 |
* @since 1.0.0
|
172 |
+
* @since 1.5.0 Added Pro version initialization.
|
173 |
*/
|
174 |
public function init() {
|
175 |
|
176 |
// Load translations just in case.
|
177 |
+
load_plugin_textdomain( 'wp-mail-smtp', false, plugin_basename( wp_mail_smtp()->plugin_path ) . '/assets/languages' );
|
178 |
|
179 |
/*
|
180 |
* Constantly check in admin area, that we don't need to upgrade DB.
|
198 |
add_action( 'admin_notices', array( '\WPMailSMTP\WP', 'display_admin_notices' ) );
|
199 |
add_action( 'admin_notices', array( $this, 'display_general_notices' ) );
|
200 |
}
|
201 |
+
|
202 |
+
/*
|
203 |
+
* Should be the last thing here to be able to overwrite anything from the above.
|
204 |
+
*/
|
205 |
+
if ( $this->is_pro_allowed() ) {
|
206 |
+
$this->pro = new \WPMailSMTP\Pro\Pro();
|
207 |
+
}
|
208 |
+
}
|
209 |
+
|
210 |
+
/**
|
211 |
+
* Whether the Pro part of the plugin is allowed to be loaded.
|
212 |
+
*
|
213 |
+
* @since 1.5.0
|
214 |
+
*
|
215 |
+
* @return bool
|
216 |
+
*/
|
217 |
+
protected function is_pro_allowed() {
|
218 |
+
|
219 |
+
$is_allowed = true;
|
220 |
+
|
221 |
+
if ( ! is_readable( $this->plugin_path . '/src/Pro/Pro.php' ) ) {
|
222 |
+
$is_allowed = false;
|
223 |
+
}
|
224 |
+
|
225 |
+
if ( version_compare( phpversion(), '5.6', '<' ) ) {
|
226 |
+
$is_allowed = false;
|
227 |
+
}
|
228 |
+
|
229 |
+
return $is_allowed;
|
230 |
+
}
|
231 |
+
|
232 |
+
/**
|
233 |
+
* This method allows to overwrite certain core WP functions, because it's fired:
|
234 |
+
* - after `muplugins_loaded` hook,
|
235 |
+
* - before WordPress own `wp-includes/pluggable.php` file include,
|
236 |
+
* - before `plugin_loaded` and `plugins_loaded` hooks.
|
237 |
+
*
|
238 |
+
* @since 1.5.0
|
239 |
+
*/
|
240 |
+
protected function init_early() {
|
241 |
+
|
242 |
+
$pro_files = $this->is_pro_allowed() ? \WPMailSMTP\Pro\Pro::PLUGGABLE_FILES : array();
|
243 |
+
|
244 |
+
$files = (array) apply_filters( 'wp_mail_smtp_core_init_early_include_files', $pro_files );
|
245 |
+
|
246 |
+
foreach ( $files as $file ) {
|
247 |
+
$path = $this->plugin_path . '/' . $file;
|
248 |
+
|
249 |
+
if ( is_readable( $path ) ) {
|
250 |
+
/** @noinspection PhpIncludeInspection */
|
251 |
+
include_once $path;
|
252 |
+
}
|
253 |
+
}
|
254 |
}
|
255 |
|
256 |
/**
|
344 |
}
|
345 |
|
346 |
/**
|
347 |
+
* Display various notifications to a user
|
348 |
*
|
349 |
* @since 1.0.0
|
350 |
*/
|
351 |
public function init_notifications() {
|
352 |
|
353 |
+
// Old PHP version notification.
|
354 |
+
if (
|
355 |
+
version_compare( phpversion(), '5.6', '<' ) &&
|
356 |
+
is_super_admin() &&
|
357 |
+
(
|
358 |
+
isset( $GLOBALS['pagenow'] ) &&
|
359 |
+
$GLOBALS['pagenow'] === 'index.php'
|
360 |
+
)
|
361 |
+
) {
|
362 |
+
WP::add_admin_notice(
|
363 |
+
sprintf(
|
364 |
+
wp_kses( /* translators: %1$s - WP Mail SMTP plugin name; %2$s - WPForms.com URL to a related doc. */
|
365 |
+
__( 'Your site is running an outdated version of PHP that is no longer supported and may cause issues with %1$s. <a href="%2$s" target="_blank" rel="noopener noreferrer">Read more</a> for additional information.', 'wp-mail-smtp' ),
|
366 |
+
array(
|
367 |
+
'a' => array(
|
368 |
+
'href' => array(),
|
369 |
+
'target' => array(),
|
370 |
+
'rel' => array(),
|
371 |
+
),
|
372 |
+
)
|
373 |
+
),
|
374 |
+
'<strong>WP Mail SMTP</strong>',
|
375 |
+
'https://wpforms.com/docs/supported-php-version/'
|
376 |
+
) .
|
377 |
+
'<br><br><em>' .
|
378 |
+
wp_kses(
|
379 |
+
__( '<strong>Please Note:</strong> Support for PHP 5.3-5.5 will be discontinued in 2019. After this, if no further action is taken, WP Mail SMTP functionality will be disabled.', 'wp-mail-smtp' ),
|
380 |
+
array(
|
381 |
+
'strong' => array(),
|
382 |
+
'em' => array(),
|
383 |
+
)
|
384 |
+
) .
|
385 |
+
'</em>',
|
386 |
+
WP::ADMIN_NOTICE_ERROR,
|
387 |
+
false
|
388 |
+
);
|
389 |
+
}
|
390 |
+
|
391 |
+
// Awesome Motive Notifications.
|
392 |
if ( Options::init()->get( 'general', 'am_notifications_hidden' ) ) {
|
393 |
return;
|
394 |
}
|
410 |
if ( Options::init()->get( 'general', 'do_not_send' ) ) {
|
411 |
?>
|
412 |
|
413 |
+
<div class="notice <?php echo esc_attr( WP::ADMIN_NOTICE_ERROR ); ?>">
|
414 |
<p>
|
415 |
<?php
|
416 |
printf(
|
417 |
+
wp_kses( /* translators: %1$s - plugin name and its version, %2$s - plugin Misc settings page. */
|
|
|
418 |
__( '<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' ),
|
419 |
array(
|
420 |
'strong' => array(),
|
439 |
if ( ! empty( $notice ) ) {
|
440 |
?>
|
441 |
|
442 |
+
<div class="notice <?php echo esc_attr( WP::ADMIN_NOTICE_ERROR ); ?>">
|
443 |
<p>
|
444 |
<?php
|
445 |
printf(
|
446 |
+
wp_kses( /* translators: %s - plugin name and its version. */
|
|
|
447 |
__( '<strong>EMAIL DELIVERY ERROR:</strong> the plugin %s logged this error during the last time it tried to send an email:', 'wp-mail-smtp' ),
|
448 |
array(
|
449 |
'strong' => array(),
|
462 |
<?php
|
463 |
if ( ! wp_mail_smtp()->get_admin()->is_admin_page() ) {
|
464 |
printf(
|
465 |
+
wp_kses( /* translators: %s - plugin admin page URL. */
|
|
|
466 |
__( 'Please review your WP Mail SMTP settings in <a href="%s">plugin admin area</a>.' ) . ' ',
|
467 |
array(
|
468 |
'a' => array(
|
495 |
* @return bool
|
496 |
*/
|
497 |
protected function is_new_install() {
|
498 |
+
|
499 |
/*
|
500 |
* No previously installed 0.*.
|
501 |
* 'wp_mail_smtp_initial_version' option appeared in 1.3.0. So we make sure it exists.
|
516 |
* Detect if there are plugins activated that will cause a conflict.
|
517 |
*
|
518 |
* @since 1.3.0
|
519 |
+
* @since 1.5.0 Moved the logic to Conflicts class.
|
520 |
*/
|
521 |
public function detect_conflicts() {
|
522 |
|
525 |
return;
|
526 |
}
|
527 |
|
528 |
+
$conflicts = new Conflicts();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
529 |
|
530 |
+
if ( $conflicts->is_detected() ) {
|
531 |
+
$conflicts->notify();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
532 |
}
|
533 |
}
|
534 |
|
540 |
* @return \WPMailSMTP\MailCatcher
|
541 |
*/
|
542 |
public function replace_phpmailer() {
|
543 |
+
|
544 |
global $phpmailer;
|
545 |
|
546 |
return $this->replace_w_fake_phpmailer( $phpmailer );
|
551 |
*
|
552 |
* @since 1.0.0
|
553 |
*
|
554 |
+
* @param null $obj PhpMailer object to override with own implementation.
|
555 |
*
|
556 |
* @return \WPMailSMTP\MailCatcher
|
557 |
*/
|
558 |
protected function replace_w_fake_phpmailer( &$obj = null ) {
|
559 |
|
560 |
+
$obj = new MailCatcher( true );
|
561 |
|
562 |
return $obj;
|
563 |
}
|
566 |
* What to do on plugin activation.
|
567 |
*
|
568 |
* @since 1.0.0
|
569 |
+
*
|
570 |
+
* @param string $plugin Path to the plugin file relative to the plugins directory.
|
571 |
+
* @param bool $network_wide Whether to enable the plugin for all sites in the network
|
572 |
+
* or just the current site. Multisite only. Default is false.
|
573 |
*/
|
574 |
+
public function activate( $plugin, $network_wide ) {
|
575 |
|
576 |
// Store the plugin version when initial install occurred.
|
577 |
add_option( 'wp_mail_smtp_initial_version', WPMS_PLUGIN_VER, '', false );
|
582 |
// Save default options, only once.
|
583 |
Options::init()->set( Options::get_defaults(), true );
|
584 |
}
|
585 |
+
|
586 |
+
/**
|
587 |
+
* Whether this is a Pro version of a plugin.
|
588 |
+
*
|
589 |
+
* @since 1.5.0
|
590 |
+
*
|
591 |
+
* @return bool
|
592 |
+
*/
|
593 |
+
public function is_pro() {
|
594 |
+
|
595 |
+
return apply_filters( 'wp_mail_smtp_core_is_pro', ! empty( $this->pro ) );
|
596 |
+
}
|
597 |
+
|
598 |
+
/**
|
599 |
+
* Get the current license type.
|
600 |
+
*
|
601 |
+
* @since 1.5.0
|
602 |
+
*
|
603 |
+
* @return string Default value: lite.
|
604 |
+
*/
|
605 |
+
public function get_license_type() {
|
606 |
+
|
607 |
+
$type = Options::init()->get( 'license', 'type' );
|
608 |
+
|
609 |
+
if ( empty( $type ) ) {
|
610 |
+
$type = 'lite';
|
611 |
+
}
|
612 |
+
|
613 |
+
return strtolower( $type );
|
614 |
+
}
|
615 |
+
|
616 |
+
/**
|
617 |
+
* Get the current license key.
|
618 |
+
*
|
619 |
+
* @since 1.5.0
|
620 |
+
*
|
621 |
+
* @return string
|
622 |
+
*/
|
623 |
+
public function get_license_key() {
|
624 |
+
|
625 |
+
$key = Options::init()->get( 'license', 'key' );
|
626 |
+
|
627 |
+
if ( empty( $key ) ) {
|
628 |
+
$key = '';
|
629 |
+
}
|
630 |
+
|
631 |
+
return $key;
|
632 |
+
}
|
633 |
+
|
634 |
+
/**
|
635 |
+
* Upgrade link used within the various admin pages.
|
636 |
+
*
|
637 |
+
* @since 1.5.0
|
638 |
+
*
|
639 |
+
* @param string $medium utm_medium URL parameter.
|
640 |
+
*
|
641 |
+
* @return string.
|
642 |
+
*/
|
643 |
+
public function get_upgrade_link( $medium = 'link' ) {
|
644 |
+
|
645 |
+
return apply_filters( 'wp_mail_smtp_core_get_upgrade_link', 'https://wpmailsmtp.com/lite-upgrade/?discount=LITEUPGRADE&utm_source=WordPress&utm_medium=' . sanitize_key( apply_filters( 'wp_mail_smtp_core_get_upgrade_link_medium', $medium ) ) . '&utm_campaign=liteplugin' );
|
646 |
+
}
|
647 |
}
|
src/Geo.php
ADDED
@@ -0,0 +1,143 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WPMailSMTP;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Class Geo to work with location, domain, IPs etc.
|
7 |
+
*
|
8 |
+
* @since 1.5.0
|
9 |
+
*/
|
10 |
+
class Geo {
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Get the current site hostname.
|
14 |
+
* Examples: example.com, localhost.
|
15 |
+
*
|
16 |
+
* @since 1.5.0
|
17 |
+
*
|
18 |
+
* @return string
|
19 |
+
*/
|
20 |
+
public static function get_site_domain() {
|
21 |
+
|
22 |
+
return ! empty( $_SERVER['SERVER_NAME'] ) ? $_SERVER['SERVER_NAME'] : wp_parse_url( get_home_url( get_current_blog_id() ), PHP_URL_HOST );
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Get the domain IP address.
|
27 |
+
* Uses gethostbyname() which is quite slow, but this is done only one time.
|
28 |
+
*
|
29 |
+
* @since 1.5.0
|
30 |
+
*
|
31 |
+
* @param string $domain
|
32 |
+
*
|
33 |
+
* @return string
|
34 |
+
*/
|
35 |
+
public static function get_ip_by_domain( $domain ) {
|
36 |
+
|
37 |
+
if ( $domain === 'localhost' ) {
|
38 |
+
return '127.0.0.1';
|
39 |
+
}
|
40 |
+
|
41 |
+
return gethostbyname( $domain );
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Get the location coordinates by IP address.
|
46 |
+
* We make a request to 3rd party services.
|
47 |
+
*
|
48 |
+
* @since 1.5.0
|
49 |
+
*
|
50 |
+
* @param string $ip
|
51 |
+
*
|
52 |
+
* @return array Empty array for localhost.
|
53 |
+
*/
|
54 |
+
public static function get_location_by_ip( $ip ) {
|
55 |
+
|
56 |
+
// Check for a non-local IP.
|
57 |
+
if ( empty( $ip ) || in_array( $ip, array( '127.0.0.1', '::1' ), true ) ) {
|
58 |
+
return array();
|
59 |
+
}
|
60 |
+
|
61 |
+
$request = wp_remote_get( 'https://ipapi.co/' . $ip . '/json' );
|
62 |
+
|
63 |
+
if ( ! is_wp_error( $request ) ) {
|
64 |
+
|
65 |
+
$request = json_decode( wp_remote_retrieve_body( $request ), true );
|
66 |
+
|
67 |
+
if ( ! empty( $request['latitude'] ) && ! empty( $request['longitude'] ) ) {
|
68 |
+
|
69 |
+
$data = array(
|
70 |
+
'latitude' => sanitize_text_field( $request['latitude'] ),
|
71 |
+
'longitude' => sanitize_text_field( $request['longitude'] ),
|
72 |
+
'city' => sanitize_text_field( $request['city'] ),
|
73 |
+
'region' => sanitize_text_field( $request['region'] ),
|
74 |
+
'country' => sanitize_text_field( $request['country'] ),
|
75 |
+
'postal' => sanitize_text_field( $request['postal'] ),
|
76 |
+
);
|
77 |
+
|
78 |
+
return $data;
|
79 |
+
}
|
80 |
+
}
|
81 |
+
|
82 |
+
$request = wp_remote_get( 'https://tools.keycdn.com/geo.json?host=' . $ip );
|
83 |
+
|
84 |
+
if ( ! is_wp_error( $request ) ) {
|
85 |
+
|
86 |
+
$request = json_decode( wp_remote_retrieve_body( $request ), true );
|
87 |
+
|
88 |
+
if ( ! empty( $request['data']['geo']['latitude'] ) && ! empty( $request['data']['geo']['longitude'] ) ) {
|
89 |
+
|
90 |
+
$data = array(
|
91 |
+
'latitude' => sanitize_text_field( $request['data']['geo']['latitude'] ),
|
92 |
+
'longitude' => sanitize_text_field( $request['data']['geo']['longitude'] ),
|
93 |
+
'city' => sanitize_text_field( $request['data']['geo']['city'] ),
|
94 |
+
'region' => sanitize_text_field( $request['data']['geo']['region_name'] ),
|
95 |
+
'country' => sanitize_text_field( $request['data']['geo']['country_code'] ),
|
96 |
+
'postal' => sanitize_text_field( $request['data']['geo']['postal_code'] ),
|
97 |
+
);
|
98 |
+
|
99 |
+
return $data;
|
100 |
+
}
|
101 |
+
}
|
102 |
+
|
103 |
+
return array();
|
104 |
+
}
|
105 |
+
|
106 |
+
/**
|
107 |
+
* This routine calculates the distance between two points (given the latitude/longitude of those points).
|
108 |
+
* Definitions: South latitudes are negative, east longitudes are positive.
|
109 |
+
*
|
110 |
+
* @see https://www.geodatasource.com/developers/php
|
111 |
+
*
|
112 |
+
* @since 1.5.0
|
113 |
+
*
|
114 |
+
* @param float $lat1 Latitude of point 1 (in decimal degrees).
|
115 |
+
* @param float $lon1 Longitude of point 1 (in decimal degrees).
|
116 |
+
* @param float $lat2 Latitude of point 2 (in decimal degrees).
|
117 |
+
* @param float $lon2 Longitude of point 2 (in decimal degrees).
|
118 |
+
* @param string $unit Supported values: M, K, N. Miles by default.
|
119 |
+
*
|
120 |
+
* @return float|int
|
121 |
+
*/
|
122 |
+
public static function get_distance_between( $lat1, $lon1, $lat2, $lon2, $unit = 'M' ) {
|
123 |
+
|
124 |
+
if ( ( $lat1 === $lat2 ) && ( $lon1 === $lon2 ) ) {
|
125 |
+
return 0;
|
126 |
+
}
|
127 |
+
|
128 |
+
$theta = $lon1 - $lon2;
|
129 |
+
$dist = sin( deg2rad( $lat1 ) ) * sin( deg2rad( $lat2 ) ) + cos( deg2rad( $lat1 ) ) * cos( deg2rad( $lat2 ) ) * cos( deg2rad( $theta ) );
|
130 |
+
$dist = acos( $dist );
|
131 |
+
$dist = rad2deg( $dist );
|
132 |
+
$miles = $dist * 60 * 1.1515;
|
133 |
+
$unit = strtoupper( $unit );
|
134 |
+
|
135 |
+
if ( $unit === 'K' ) {
|
136 |
+
return ( $miles * 1.609344 );
|
137 |
+
} elseif ( $unit === 'N' ) {
|
138 |
+
return ( $miles * 0.8684 );
|
139 |
+
}
|
140 |
+
|
141 |
+
return $miles;
|
142 |
+
}
|
143 |
+
}
|
src/MailCatcher.php
CHANGED
@@ -41,7 +41,8 @@ class MailCatcher extends \PHPMailer {
|
|
41 |
*/
|
42 |
public function send() {
|
43 |
|
44 |
-
$options
|
|
|
45 |
|
46 |
$is_emailing_blocked = false;
|
47 |
|
@@ -55,7 +56,7 @@ class MailCatcher extends \PHPMailer {
|
|
55 |
! empty( $header[0] ) &&
|
56 |
! empty( $header[1] ) &&
|
57 |
$header[0] === 'X-Mailer-Type' &&
|
58 |
-
trim( $header[1] ) === 'WPMailSMTP
|
59 |
) {
|
60 |
$is_emailing_blocked = false;
|
61 |
}
|
@@ -66,10 +67,8 @@ class MailCatcher extends \PHPMailer {
|
|
66 |
return false;
|
67 |
}
|
68 |
|
69 |
-
|
70 |
-
|
71 |
-
// Define a custom header, that will be used in Gmail/SMTP mailers.
|
72 |
-
$this->XMailer = 'WPMailSMTP/Mailer/' . sanitize_key( $mail_mailer ) . ' ' . WPMS_PLUGIN_VER;
|
73 |
|
74 |
// Use the default PHPMailer, as we inject our settings there for certain providers.
|
75 |
if (
|
@@ -77,7 +76,25 @@ class MailCatcher extends \PHPMailer {
|
|
77 |
$mail_mailer === 'smtp' ||
|
78 |
$mail_mailer === 'pepipost'
|
79 |
) {
|
80 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
}
|
82 |
|
83 |
// We need this so that the \PHPMailer class will correctly prepare all the headers.
|
@@ -104,6 +121,25 @@ class MailCatcher extends \PHPMailer {
|
|
104 |
*/
|
105 |
$mailer->send();
|
106 |
|
107 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
}
|
109 |
}
|
41 |
*/
|
42 |
public function send() {
|
43 |
|
44 |
+
$options = new Options();
|
45 |
+
$mail_mailer = sanitize_key( $options->get( 'mail', 'mailer' ) );
|
46 |
|
47 |
$is_emailing_blocked = false;
|
48 |
|
56 |
! empty( $header[0] ) &&
|
57 |
! empty( $header[1] ) &&
|
58 |
$header[0] === 'X-Mailer-Type' &&
|
59 |
+
trim( $header[1] ) === 'WPMailSMTP/Admin/Test'
|
60 |
) {
|
61 |
$is_emailing_blocked = false;
|
62 |
}
|
67 |
return false;
|
68 |
}
|
69 |
|
70 |
+
// Define a custom header, that will be used to identify the plugin and the mailer.
|
71 |
+
$this->XMailer = 'WPMailSMTP/Mailer/' . $mail_mailer . ' ' . WPMS_PLUGIN_VER;
|
|
|
|
|
72 |
|
73 |
// Use the default PHPMailer, as we inject our settings there for certain providers.
|
74 |
if (
|
76 |
$mail_mailer === 'smtp' ||
|
77 |
$mail_mailer === 'pepipost'
|
78 |
) {
|
79 |
+
try {
|
80 |
+
// Prepare all the headers.
|
81 |
+
if ( ! $this->preSend() ) {
|
82 |
+
return false;
|
83 |
+
}
|
84 |
+
|
85 |
+
// Allow to hook after all the preparation before the actual sending.
|
86 |
+
do_action( 'wp_mail_smtp_mailcatcher_smtp_send_before', $this );
|
87 |
+
|
88 |
+
return $this->postSend();
|
89 |
+
} catch ( \phpmailerException $e ) {
|
90 |
+
$this->mailHeader = '';
|
91 |
+
$this->setError( $e->getMessage() );
|
92 |
+
if ( $this->exceptions ) {
|
93 |
+
throw $e;
|
94 |
+
}
|
95 |
+
|
96 |
+
return false;
|
97 |
+
}
|
98 |
}
|
99 |
|
100 |
// We need this so that the \PHPMailer class will correctly prepare all the headers.
|
121 |
*/
|
122 |
$mailer->send();
|
123 |
|
124 |
+
$is_sent = $mailer->is_email_sent();
|
125 |
+
|
126 |
+
// Allow to perform any actions with the data.
|
127 |
+
do_action( 'wp_mail_smtp_mailcatcher_send_after', $mailer, $this );
|
128 |
+
|
129 |
+
return $is_sent;
|
130 |
+
}
|
131 |
+
|
132 |
+
/**
|
133 |
+
* Returns all custom headers.
|
134 |
+
* In older versions of \PHPMailer class this method didn't exist.
|
135 |
+
* As we support WordPress 3.6+ - we need to make sure this method is always present.
|
136 |
+
*
|
137 |
+
* @since 1.5.0
|
138 |
+
*
|
139 |
+
* @return array
|
140 |
+
*/
|
141 |
+
public function getCustomHeaders() {
|
142 |
+
|
143 |
+
return $this->CustomHeader;
|
144 |
}
|
145 |
}
|
src/Migration.php
CHANGED
@@ -124,19 +124,21 @@ class Migration {
|
|
124 |
|
125 |
foreach ( $this->old_keys as $old_key ) {
|
126 |
|
|
|
|
|
127 |
switch ( $old_key ) {
|
128 |
case 'pepipost_user':
|
129 |
case 'pepipost_pass':
|
130 |
case 'pepipost_port':
|
131 |
case 'pepipost_ssl':
|
132 |
// Do not migrate pepipost options if it's not activated at the moment.
|
133 |
-
if ( '
|
134 |
$shortcut = explode( '_', $old_key );
|
135 |
|
136 |
if ( $old_key === 'pepipost_ssl' ) {
|
137 |
-
$converted[ $shortcut[0] ]['encryption'] = $
|
138 |
} else {
|
139 |
-
$converted[ $shortcut[0] ][ $shortcut[1] ] = $
|
140 |
}
|
141 |
}
|
142 |
break;
|
@@ -150,29 +152,29 @@ class Migration {
|
|
150 |
$shortcut = explode( '_', $old_key );
|
151 |
|
152 |
if ( $old_key === 'smtp_ssl' ) {
|
153 |
-
$converted[ $shortcut[0] ]['encryption'] = $
|
154 |
} elseif ( $old_key === 'smtp_auth' ) {
|
155 |
-
$converted[ $shortcut[0] ][ $shortcut[1] ] = ( $
|
156 |
} else {
|
157 |
-
$converted[ $shortcut[0] ][ $shortcut[1] ] = $
|
158 |
}
|
159 |
|
160 |
break;
|
161 |
|
162 |
case 'mail_from':
|
163 |
-
$converted['mail']['from_email'] = $
|
164 |
break;
|
165 |
case 'mail_from_name':
|
166 |
-
$converted['mail']['from_name'] = $
|
167 |
break;
|
168 |
case 'mail_set_return_path':
|
169 |
-
$converted['mail']['return_path'] = ( $
|
170 |
break;
|
171 |
case 'mailer':
|
172 |
-
$converted['mail']['mailer'] = $
|
173 |
break;
|
174 |
case 'wp_mail_smtp_am_notifications_hidden':
|
175 |
-
$converted['general']['am_notifications_hidden'] = ( isset( $
|
176 |
break;
|
177 |
}
|
178 |
}
|
124 |
|
125 |
foreach ( $this->old_keys as $old_key ) {
|
126 |
|
127 |
+
$old_value = isset( $this->old_values[ $old_key ] ) ? $this->old_values[ $old_key ] : '';
|
128 |
+
|
129 |
switch ( $old_key ) {
|
130 |
case 'pepipost_user':
|
131 |
case 'pepipost_pass':
|
132 |
case 'pepipost_port':
|
133 |
case 'pepipost_ssl':
|
134 |
// Do not migrate pepipost options if it's not activated at the moment.
|
135 |
+
if ( isset( $this->old_values['mailer'] ) && $this->old_values['mailer'] === 'pepipost' ) {
|
136 |
$shortcut = explode( '_', $old_key );
|
137 |
|
138 |
if ( $old_key === 'pepipost_ssl' ) {
|
139 |
+
$converted[ $shortcut[0] ]['encryption'] = $old_value;
|
140 |
} else {
|
141 |
+
$converted[ $shortcut[0] ][ $shortcut[1] ] = $old_value;
|
142 |
}
|
143 |
}
|
144 |
break;
|
152 |
$shortcut = explode( '_', $old_key );
|
153 |
|
154 |
if ( $old_key === 'smtp_ssl' ) {
|
155 |
+
$converted[ $shortcut[0] ]['encryption'] = $old_value;
|
156 |
} elseif ( $old_key === 'smtp_auth' ) {
|
157 |
+
$converted[ $shortcut[0] ][ $shortcut[1] ] = ( $old_value === 'true' ? 'yes' : 'no' );
|
158 |
} else {
|
159 |
+
$converted[ $shortcut[0] ][ $shortcut[1] ] = $old_value;
|
160 |
}
|
161 |
|
162 |
break;
|
163 |
|
164 |
case 'mail_from':
|
165 |
+
$converted['mail']['from_email'] = $old_value;
|
166 |
break;
|
167 |
case 'mail_from_name':
|
168 |
+
$converted['mail']['from_name'] = $old_value;
|
169 |
break;
|
170 |
case 'mail_set_return_path':
|
171 |
+
$converted['mail']['return_path'] = ( $old_value === 'true' );
|
172 |
break;
|
173 |
case 'mailer':
|
174 |
+
$converted['mail']['mailer'] = $old_value;
|
175 |
break;
|
176 |
case 'wp_mail_smtp_am_notifications_hidden':
|
177 |
+
$converted['general']['am_notifications_hidden'] = ( isset( $old_value ) && $old_value === 'true' );
|
178 |
break;
|
179 |
}
|
180 |
}
|
src/Options.php
CHANGED
@@ -17,13 +17,14 @@ class Options {
|
|
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(
|
26 |
-
'mail'
|
27 |
'from_name',
|
28 |
'from_email',
|
29 |
'mailer',
|
@@ -31,7 +32,7 @@ class Options {
|
|
31 |
'from_name_force',
|
32 |
'from_email_force',
|
33 |
),
|
34 |
-
'smtp'
|
35 |
'host',
|
36 |
'port',
|
37 |
'encryption',
|
@@ -40,19 +41,29 @@ class Options {
|
|
40 |
'user',
|
41 |
'pass',
|
42 |
),
|
43 |
-
'gmail'
|
44 |
'client_id',
|
45 |
'client_secret',
|
46 |
),
|
47 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
'api_key',
|
49 |
'domain',
|
50 |
'region',
|
51 |
),
|
52 |
-
'sendgrid'
|
53 |
'api_key',
|
54 |
),
|
55 |
-
'pepipost'
|
56 |
'host',
|
57 |
'port',
|
58 |
'encryption',
|
@@ -60,6 +71,9 @@ class Options {
|
|
60 |
'user',
|
61 |
'pass',
|
62 |
),
|
|
|
|
|
|
|
63 |
);
|
64 |
|
65 |
/**
|
@@ -170,29 +184,34 @@ class Options {
|
|
170 |
/**
|
171 |
* Get all the options for a group.
|
172 |
*
|
173 |
-
* Options::init()->get_group('smtp') - will return
|
174 |
*
|
175 |
* @since 1.0.0
|
|
|
176 |
*
|
177 |
* @param string $group
|
178 |
*
|
179 |
-
* @return
|
180 |
*/
|
181 |
public function get_group( $group ) {
|
182 |
|
183 |
// Just to feel safe.
|
184 |
$group = sanitize_key( $group );
|
185 |
|
186 |
-
|
|
|
|
|
|
|
|
|
187 |
|
188 |
-
|
189 |
-
|
|
|
|
|
190 |
}
|
191 |
-
|
192 |
-
return apply_filters( 'wp_mail_smtp_options_get_group', $this->_options[ $group ], $group );
|
193 |
}
|
194 |
|
195 |
-
return
|
196 |
}
|
197 |
|
198 |
/**
|
@@ -230,7 +249,7 @@ class Options {
|
|
230 |
} else {
|
231 |
/*
|
232 |
* Fallback to default if it doesn't exist in a map.
|
233 |
-
* Allow to
|
234 |
*/
|
235 |
if (
|
236 |
isset( self::$map[ $group ] ) &&
|
@@ -241,7 +260,7 @@ class Options {
|
|
241 |
}
|
242 |
}
|
243 |
|
244 |
-
// Strip slashes only from values saved in DB.
|
245 |
if ( is_string( $value ) && ! $this->is_const_defined( $group, $key ) ) {
|
246 |
$value = stripslashes( $value );
|
247 |
}
|
@@ -254,7 +273,8 @@ class Options {
|
|
254 |
* so we need to postprocess them to convert.
|
255 |
*
|
256 |
* @since 1.0.0
|
257 |
-
* @since 1.4.0 Added Mailgun:region
|
|
|
258 |
*
|
259 |
* @param string $group
|
260 |
* @param string $key
|
@@ -284,6 +304,10 @@ class Options {
|
|
284 |
$value = $group === 'mailgun' ? 'US' : $value;
|
285 |
break;
|
286 |
|
|
|
|
|
|
|
|
|
287 |
case 'auth':
|
288 |
case 'autotls':
|
289 |
$value = in_array( $group, array( 'smtp', 'pepipost' ), true ) ? false : true;
|
@@ -292,6 +316,10 @@ class Options {
|
|
292 |
case 'pass':
|
293 |
$value = $this->get_const_value( $group, $key, $value );
|
294 |
break;
|
|
|
|
|
|
|
|
|
295 |
}
|
296 |
|
297 |
return apply_filters( 'wp_mail_smtp_options_postprocess_key_defaults', $value, $group, $key );
|
@@ -304,7 +332,8 @@ class Options {
|
|
304 |
* General section of options won't have constants, so we are omitting those checks and just return default value.
|
305 |
*
|
306 |
* @since 1.0.0
|
307 |
-
* @since 1.4.0 Added WPMS_MAILGUN_REGION
|
|
|
308 |
*
|
309 |
* @param string $group
|
310 |
* @param string $key
|
@@ -318,27 +347,35 @@ class Options {
|
|
318 |
return $value;
|
319 |
}
|
320 |
|
|
|
|
|
321 |
switch ( $group ) {
|
322 |
case 'mail':
|
323 |
switch ( $key ) {
|
324 |
case 'from_name':
|
325 |
/** @noinspection PhpUndefinedConstantInspection */
|
326 |
-
return $this->is_const_defined( $group, $key ) ? WPMS_MAIL_FROM_NAME : $value;
|
|
|
327 |
case 'from_email':
|
328 |
/** @noinspection PhpUndefinedConstantInspection */
|
329 |
-
return $this->is_const_defined( $group, $key ) ? WPMS_MAIL_FROM : $value;
|
|
|
330 |
case 'mailer':
|
331 |
/** @noinspection PhpUndefinedConstantInspection */
|
332 |
-
return $this->is_const_defined( $group, $key ) ? WPMS_MAILER : $value;
|
|
|
333 |
case 'return_path':
|
334 |
/** @noinspection PhpUndefinedConstantInspection */
|
335 |
-
return $this->is_const_defined( $group, $key ) ? WPMS_SET_RETURN_PATH : $value;
|
|
|
336 |
case 'from_name_force':
|
337 |
/** @noinspection PhpUndefinedConstantInspection */
|
338 |
-
return $this->is_const_defined( $group, $key ) ? WPMS_MAIL_FROM_NAME_FORCE : $value;
|
|
|
339 |
case 'from_email_force':
|
340 |
/** @noinspection PhpUndefinedConstantInspection */
|
341 |
-
return $this->is_const_defined( $group, $key ) ? WPMS_MAIL_FROM_FORCE : $value;
|
|
|
342 |
}
|
343 |
|
344 |
break;
|
@@ -347,25 +384,32 @@ class Options {
|
|
347 |
switch ( $key ) {
|
348 |
case 'host':
|
349 |
/** @noinspection PhpUndefinedConstantInspection */
|
350 |
-
return $this->is_const_defined( $group, $key ) ? WPMS_SMTP_HOST : $value;
|
|
|
351 |
case 'port':
|
352 |
/** @noinspection PhpUndefinedConstantInspection */
|
353 |
-
return $this->is_const_defined( $group, $key ) ? WPMS_SMTP_PORT : $value;
|
|
|
354 |
case 'encryption':
|
355 |
/** @noinspection PhpUndefinedConstantInspection */
|
356 |
-
return $this->is_const_defined( $group, $key ) ? ( WPMS_SSL === '' ? 'none' : WPMS_SSL ) : $value;
|
|
|
357 |
case 'auth':
|
358 |
/** @noinspection PhpUndefinedConstantInspection */
|
359 |
-
return $this->is_const_defined( $group, $key ) ? WPMS_SMTP_AUTH : $value;
|
|
|
360 |
case 'autotls':
|
361 |
/** @noinspection PhpUndefinedConstantInspection */
|
362 |
-
return $this->is_const_defined( $group, $key ) ? WPMS_SMTP_AUTOTLS : $value;
|
|
|
363 |
case 'user':
|
364 |
/** @noinspection PhpUndefinedConstantInspection */
|
365 |
-
return $this->is_const_defined( $group, $key ) ? WPMS_SMTP_USER : $value;
|
|
|
366 |
case 'pass':
|
367 |
/** @noinspection PhpUndefinedConstantInspection */
|
368 |
-
return $this->is_const_defined( $group, $key ) ? WPMS_SMTP_PASS : $value;
|
|
|
369 |
}
|
370 |
|
371 |
break;
|
@@ -374,10 +418,44 @@ class Options {
|
|
374 |
switch ( $key ) {
|
375 |
case 'client_id':
|
376 |
/** @noinspection PhpUndefinedConstantInspection */
|
377 |
-
return $this->is_const_defined( $group, $key ) ? WPMS_GMAIL_CLIENT_ID : $value;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
378 |
case 'client_secret':
|
379 |
/** @noinspection PhpUndefinedConstantInspection */
|
380 |
-
return $this->is_const_defined( $group, $key ) ?
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
381 |
}
|
382 |
|
383 |
break;
|
@@ -386,13 +464,16 @@ class Options {
|
|
386 |
switch ( $key ) {
|
387 |
case 'api_key':
|
388 |
/** @noinspection PhpUndefinedConstantInspection */
|
389 |
-
return $this->is_const_defined( $group, $key ) ? WPMS_MAILGUN_API_KEY : $value;
|
|
|
390 |
case 'domain':
|
391 |
/** @noinspection PhpUndefinedConstantInspection */
|
392 |
-
return $this->is_const_defined( $group, $key ) ? WPMS_MAILGUN_DOMAIN : $value;
|
|
|
393 |
case 'region':
|
394 |
/** @noinspection PhpUndefinedConstantInspection */
|
395 |
-
return $this->is_const_defined( $group, $key ) ? WPMS_MAILGUN_REGION : $value;
|
|
|
396 |
}
|
397 |
|
398 |
break;
|
@@ -401,25 +482,43 @@ class Options {
|
|
401 |
switch ( $key ) {
|
402 |
case 'api_key':
|
403 |
/** @noinspection PhpUndefinedConstantInspection */
|
404 |
-
return $this->is_const_defined( $group, $key ) ? WPMS_SENDGRID_API_KEY : $value;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
405 |
}
|
406 |
|
407 |
break;
|
|
|
|
|
|
|
|
|
408 |
}
|
409 |
|
410 |
-
|
411 |
-
return $value;
|
412 |
}
|
413 |
|
414 |
/**
|
415 |
* Whether constants redefinition is enabled or not.
|
416 |
*
|
417 |
* @since 1.0.0
|
|
|
418 |
*
|
419 |
* @return bool
|
420 |
*/
|
421 |
public function is_const_enabled() {
|
422 |
-
|
|
|
|
|
|
|
423 |
}
|
424 |
|
425 |
/**
|
@@ -428,6 +527,7 @@ class Options {
|
|
428 |
* and display them differently.
|
429 |
*
|
430 |
* @since 1.0.0
|
|
|
431 |
*
|
432 |
* @param string $group
|
433 |
* @param string $key
|
@@ -441,24 +541,31 @@ class Options {
|
|
441 |
}
|
442 |
|
443 |
// Just to feel safe.
|
444 |
-
$group
|
445 |
-
$key
|
|
|
446 |
|
447 |
switch ( $group ) {
|
448 |
case 'mail':
|
449 |
switch ( $key ) {
|
450 |
case 'from_name':
|
451 |
-
return defined( 'WPMS_MAIL_FROM_NAME' ) && WPMS_MAIL_FROM_NAME;
|
|
|
452 |
case 'from_email':
|
453 |
-
return defined( 'WPMS_MAIL_FROM' ) && WPMS_MAIL_FROM;
|
|
|
454 |
case 'mailer':
|
455 |
-
return defined( 'WPMS_MAILER' ) && WPMS_MAILER;
|
|
|
456 |
case 'return_path':
|
457 |
-
return defined( 'WPMS_SET_RETURN_PATH' ) && ( WPMS_SET_RETURN_PATH === 'true' || WPMS_SET_RETURN_PATH === true );
|
|
|
458 |
case 'from_name_force':
|
459 |
-
return defined( 'WPMS_MAIL_FROM_NAME_FORCE' ) && ( WPMS_MAIL_FROM_NAME_FORCE === 'true' || WPMS_MAIL_FROM_NAME_FORCE === true );
|
|
|
460 |
case 'from_email_force':
|
461 |
-
return defined( 'WPMS_MAIL_FROM_FORCE' ) && ( WPMS_MAIL_FROM_FORCE === 'true' || WPMS_MAIL_FROM_FORCE === true );
|
|
|
462 |
}
|
463 |
|
464 |
break;
|
@@ -466,19 +573,26 @@ class Options {
|
|
466 |
case 'smtp':
|
467 |
switch ( $key ) {
|
468 |
case 'host':
|
469 |
-
return defined( 'WPMS_SMTP_HOST' ) && WPMS_SMTP_HOST;
|
|
|
470 |
case 'port':
|
471 |
-
return defined( 'WPMS_SMTP_PORT' ) && WPMS_SMTP_PORT;
|
|
|
472 |
case 'encryption':
|
473 |
-
return defined( 'WPMS_SSL' );
|
|
|
474 |
case 'auth':
|
475 |
-
return defined( 'WPMS_SMTP_AUTH' ) && WPMS_SMTP_AUTH;
|
|
|
476 |
case 'autotls':
|
477 |
-
return defined( 'WPMS_SMTP_AUTOTLS' ) && WPMS_SMTP_AUTOTLS;
|
|
|
478 |
case 'user':
|
479 |
-
return defined( 'WPMS_SMTP_USER' ) && WPMS_SMTP_USER;
|
|
|
480 |
case 'pass':
|
481 |
-
return defined( 'WPMS_SMTP_PASS' ) && WPMS_SMTP_PASS;
|
|
|
482 |
}
|
483 |
|
484 |
break;
|
@@ -486,9 +600,38 @@ class Options {
|
|
486 |
case 'gmail':
|
487 |
switch ( $key ) {
|
488 |
case 'client_id':
|
489 |
-
return defined( 'WPMS_GMAIL_CLIENT_ID' ) && WPMS_GMAIL_CLIENT_ID;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
490 |
case 'client_secret':
|
491 |
-
return defined( '
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
492 |
}
|
493 |
|
494 |
break;
|
@@ -496,11 +639,14 @@ class Options {
|
|
496 |
case 'mailgun':
|
497 |
switch ( $key ) {
|
498 |
case 'api_key':
|
499 |
-
return defined( 'WPMS_MAILGUN_API_KEY' ) && WPMS_MAILGUN_API_KEY;
|
|
|
500 |
case 'domain':
|
501 |
-
return defined( 'WPMS_MAILGUN_DOMAIN' ) && WPMS_MAILGUN_DOMAIN;
|
|
|
502 |
case 'region':
|
503 |
-
return defined( 'WPMS_MAILGUN_REGION' ) && WPMS_MAILGUN_REGION;
|
|
|
504 |
}
|
505 |
|
506 |
break;
|
@@ -508,28 +654,39 @@ class Options {
|
|
508 |
case 'sendgrid':
|
509 |
switch ( $key ) {
|
510 |
case 'api_key':
|
511 |
-
return defined( 'WPMS_SENDGRID_API_KEY' ) && WPMS_SENDGRID_API_KEY;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
512 |
}
|
513 |
|
514 |
break;
|
515 |
}
|
516 |
|
517 |
-
return
|
518 |
}
|
519 |
|
520 |
/**
|
521 |
* Set plugin options, all at once.
|
522 |
*
|
523 |
* @since 1.0.0
|
524 |
-
* @since 1.3.0 Added $once argument to save
|
525 |
-
* @since 1.4.0 Added Mailgun:region
|
|
|
526 |
*
|
527 |
* @param array $options Plugin options to save.
|
528 |
* @param bool $once Whether to update existing options or to add these options only once.
|
529 |
*/
|
530 |
public function set( $options, $once = false ) {
|
531 |
/*
|
532 |
-
* Process
|
533 |
*/
|
534 |
foreach ( (array) $options as $group => $keys ) {
|
535 |
foreach ( $keys as $option_name => $option_value ) {
|
@@ -538,17 +695,17 @@ class Options {
|
|
538 |
switch ( $option_name ) {
|
539 |
case 'from_name':
|
540 |
case 'mailer':
|
541 |
-
$options[ $group ][ $option_name ] =
|
542 |
break;
|
543 |
case 'from_email':
|
544 |
if ( filter_var( $option_value, FILTER_VALIDATE_EMAIL ) ) {
|
545 |
-
$options[ $group ][ $option_name ] =
|
546 |
}
|
547 |
break;
|
548 |
case 'return_path':
|
549 |
case 'from_name_force':
|
550 |
case 'from_email_force':
|
551 |
-
$options[ $group ][ $option_name ] =
|
552 |
break;
|
553 |
}
|
554 |
break;
|
@@ -571,7 +728,7 @@ class Options {
|
|
571 |
if (
|
572 |
! empty( $options['mail']['mailer'] ) &&
|
573 |
isset( $options[ $options['mail']['mailer'] ] ) &&
|
574 |
-
in_array( $options['mail']['mailer'], array( 'pepipost', 'smtp', 'sendgrid', 'mailgun', 'gmail' ), true )
|
575 |
) {
|
576 |
|
577 |
$mailer = $options['mail']['mailer'];
|
@@ -581,35 +738,37 @@ class Options {
|
|
581 |
case 'host': // smtp.
|
582 |
case 'user': // smtp.
|
583 |
case 'encryption': // smtp.
|
584 |
-
case 'region': // mailgun.
|
585 |
-
$options[ $mailer ][ $option_name ] = $this->
|
586 |
break; // smtp.
|
587 |
case 'port':
|
588 |
-
$options[ $mailer ][ $option_name ] = $this->
|
589 |
break;
|
590 |
case 'auth': // smtp.
|
591 |
case 'autotls': // smtp.
|
592 |
-
$option_value =
|
593 |
|
594 |
-
$options[ $mailer ][ $option_name ] = $this->
|
595 |
break;
|
596 |
|
597 |
case 'pass': // smtp.
|
598 |
-
$option_value = is_string( $option_value ) ? trim( $option_value ) : $option_value;
|
599 |
-
|
600 |
// Do not process as they may contain certain special characters, but allow to be overwritten using constants.
|
601 |
-
$options[ $mailer ][ $option_name ] = $this->
|
602 |
break;
|
603 |
|
604 |
case 'api_key': // mailgun/sendgrid.
|
605 |
case 'domain': // mailgun.
|
606 |
-
case 'client_id': // gmail.
|
607 |
-
case 'client_secret': // gmail.
|
608 |
-
case 'auth_code': // gmail.
|
609 |
-
|
610 |
-
|
611 |
|
612 |
-
|
|
|
|
|
|
|
|
|
613 |
break;
|
614 |
}
|
615 |
}
|
17 |
*
|
18 |
* @since 1.3.0
|
19 |
* @since 1.4.0 Added Mailgun:region.
|
20 |
+
* @since 1.5.0 Added Outlook/AmazonSES.
|
21 |
*
|
22 |
* @since
|
23 |
*
|
24 |
* @var array Map of all the default options of the plugin.
|
25 |
*/
|
26 |
private static $map = array(
|
27 |
+
'mail' => array(
|
28 |
'from_name',
|
29 |
'from_email',
|
30 |
'mailer',
|
32 |
'from_name_force',
|
33 |
'from_email_force',
|
34 |
),
|
35 |
+
'smtp' => array(
|
36 |
'host',
|
37 |
'port',
|
38 |
'encryption',
|
41 |
'user',
|
42 |
'pass',
|
43 |
),
|
44 |
+
'gmail' => array(
|
45 |
'client_id',
|
46 |
'client_secret',
|
47 |
),
|
48 |
+
'outlook' => array(
|
49 |
+
'client_id',
|
50 |
+
'client_secret',
|
51 |
+
),
|
52 |
+
'amazonses' => array(
|
53 |
+
'client_id',
|
54 |
+
'client_secret',
|
55 |
+
'region',
|
56 |
+
'emails_pending',
|
57 |
+
),
|
58 |
+
'mailgun' => array(
|
59 |
'api_key',
|
60 |
'domain',
|
61 |
'region',
|
62 |
),
|
63 |
+
'sendgrid' => array(
|
64 |
'api_key',
|
65 |
),
|
66 |
+
'pepipost' => array(
|
67 |
'host',
|
68 |
'port',
|
69 |
'encryption',
|
71 |
'user',
|
72 |
'pass',
|
73 |
),
|
74 |
+
'license' => array(
|
75 |
+
'key',
|
76 |
+
),
|
77 |
);
|
78 |
|
79 |
/**
|
184 |
/**
|
185 |
* Get all the options for a group.
|
186 |
*
|
187 |
+
* Options::init()->get_group('smtp') - will return the array of options for the group, including defaults and constants.
|
188 |
*
|
189 |
* @since 1.0.0
|
190 |
+
* @since 1.5.0 Process values through the get() method which is aware of constants.
|
191 |
*
|
192 |
* @param string $group
|
193 |
*
|
194 |
+
* @return array
|
195 |
*/
|
196 |
public function get_group( $group ) {
|
197 |
|
198 |
// Just to feel safe.
|
199 |
$group = sanitize_key( $group );
|
200 |
|
201 |
+
/*
|
202 |
+
* Get the values saved in DB.
|
203 |
+
* If plugin is configured with constants right from the start - this will not have all the values.
|
204 |
+
*/
|
205 |
+
$options = isset( $this->_options[ $group ] ) ? $this->_options[ $group ] : array();
|
206 |
|
207 |
+
// We need to process certain constants-aware options through actual constants.
|
208 |
+
if ( isset( self::$map[ $group ] ) ) {
|
209 |
+
foreach ( self::$map[ $group ] as $key ) {
|
210 |
+
$options[ $key ] = $this->get( $group, $key );
|
211 |
}
|
|
|
|
|
212 |
}
|
213 |
|
214 |
+
return apply_filters( 'wp_mail_smtp_options_get_group', $options, $group );
|
215 |
}
|
216 |
|
217 |
/**
|
249 |
} else {
|
250 |
/*
|
251 |
* Fallback to default if it doesn't exist in a map.
|
252 |
+
* Allow to retrieve only values from a map.
|
253 |
*/
|
254 |
if (
|
255 |
isset( self::$map[ $group ] ) &&
|
260 |
}
|
261 |
}
|
262 |
|
263 |
+
// Strip slashes only from values saved in DB. Constants should be processed as is.
|
264 |
if ( is_string( $value ) && ! $this->is_const_defined( $group, $key ) ) {
|
265 |
$value = stripslashes( $value );
|
266 |
}
|
273 |
* so we need to postprocess them to convert.
|
274 |
*
|
275 |
* @since 1.0.0
|
276 |
+
* @since 1.4.0 Added Mailgun:region.
|
277 |
+
* @since 1.5.0 Added Outlook/AmazonSES, license key support.
|
278 |
*
|
279 |
* @param string $group
|
280 |
* @param string $key
|
304 |
$value = $group === 'mailgun' ? 'US' : $value;
|
305 |
break;
|
306 |
|
307 |
+
case 'emails_pending':
|
308 |
+
$value = array();
|
309 |
+
break;
|
310 |
+
|
311 |
case 'auth':
|
312 |
case 'autotls':
|
313 |
$value = in_array( $group, array( 'smtp', 'pepipost' ), true ) ? false : true;
|
316 |
case 'pass':
|
317 |
$value = $this->get_const_value( $group, $key, $value );
|
318 |
break;
|
319 |
+
|
320 |
+
case 'type':
|
321 |
+
$value = $group === 'license' ? 'lite' : '';
|
322 |
+
break;
|
323 |
}
|
324 |
|
325 |
return apply_filters( 'wp_mail_smtp_options_postprocess_key_defaults', $value, $group, $key );
|
332 |
* General section of options won't have constants, so we are omitting those checks and just return default value.
|
333 |
*
|
334 |
* @since 1.0.0
|
335 |
+
* @since 1.4.0 Added WPMS_MAILGUN_REGION.
|
336 |
+
* @since 1.5.0 Added Outlook/AmazonSES, license key support.
|
337 |
*
|
338 |
* @param string $group
|
339 |
* @param string $key
|
347 |
return $value;
|
348 |
}
|
349 |
|
350 |
+
$return = null;
|
351 |
+
|
352 |
switch ( $group ) {
|
353 |
case 'mail':
|
354 |
switch ( $key ) {
|
355 |
case 'from_name':
|
356 |
/** @noinspection PhpUndefinedConstantInspection */
|
357 |
+
$return = $this->is_const_defined( $group, $key ) ? WPMS_MAIL_FROM_NAME : $value;
|
358 |
+
break;
|
359 |
case 'from_email':
|
360 |
/** @noinspection PhpUndefinedConstantInspection */
|
361 |
+
$return = $this->is_const_defined( $group, $key ) ? WPMS_MAIL_FROM : $value;
|
362 |
+
break;
|
363 |
case 'mailer':
|
364 |
/** @noinspection PhpUndefinedConstantInspection */
|
365 |
+
$return = $this->is_const_defined( $group, $key ) ? WPMS_MAILER : $value;
|
366 |
+
break;
|
367 |
case 'return_path':
|
368 |
/** @noinspection PhpUndefinedConstantInspection */
|
369 |
+
$return = $this->is_const_defined( $group, $key ) ? WPMS_SET_RETURN_PATH : $value;
|
370 |
+
break;
|
371 |
case 'from_name_force':
|
372 |
/** @noinspection PhpUndefinedConstantInspection */
|
373 |
+
$return = $this->is_const_defined( $group, $key ) ? WPMS_MAIL_FROM_NAME_FORCE : $value;
|
374 |
+
break;
|
375 |
case 'from_email_force':
|
376 |
/** @noinspection PhpUndefinedConstantInspection */
|
377 |
+
$return = $this->is_const_defined( $group, $key ) ? WPMS_MAIL_FROM_FORCE : $value;
|
378 |
+
break;
|
379 |
}
|
380 |
|
381 |
break;
|
384 |
switch ( $key ) {
|
385 |
case 'host':
|
386 |
/** @noinspection PhpUndefinedConstantInspection */
|
387 |
+
$return = $this->is_const_defined( $group, $key ) ? WPMS_SMTP_HOST : $value;
|
388 |
+
break;
|
389 |
case 'port':
|
390 |
/** @noinspection PhpUndefinedConstantInspection */
|
391 |
+
$return = $this->is_const_defined( $group, $key ) ? WPMS_SMTP_PORT : $value;
|
392 |
+
break;
|
393 |
case 'encryption':
|
394 |
/** @noinspection PhpUndefinedConstantInspection */
|
395 |
+
$return = $this->is_const_defined( $group, $key ) ? ( WPMS_SSL === '' ? 'none' : WPMS_SSL ) : $value;
|
396 |
+
break;
|
397 |
case 'auth':
|
398 |
/** @noinspection PhpUndefinedConstantInspection */
|
399 |
+
$return = $this->is_const_defined( $group, $key ) ? WPMS_SMTP_AUTH : $value;
|
400 |
+
break;
|
401 |
case 'autotls':
|
402 |
/** @noinspection PhpUndefinedConstantInspection */
|
403 |
+
$return = $this->is_const_defined( $group, $key ) ? WPMS_SMTP_AUTOTLS : $value;
|
404 |
+
break;
|
405 |
case 'user':
|
406 |
/** @noinspection PhpUndefinedConstantInspection */
|
407 |
+
$return = $this->is_const_defined( $group, $key ) ? WPMS_SMTP_USER : $value;
|
408 |
+
break;
|
409 |
case 'pass':
|
410 |
/** @noinspection PhpUndefinedConstantInspection */
|
411 |
+
$return = $this->is_const_defined( $group, $key ) ? WPMS_SMTP_PASS : $value;
|
412 |
+
break;
|
413 |
}
|
414 |
|
415 |
break;
|
418 |
switch ( $key ) {
|
419 |
case 'client_id':
|
420 |
/** @noinspection PhpUndefinedConstantInspection */
|
421 |
+
$return = $this->is_const_defined( $group, $key ) ? WPMS_GMAIL_CLIENT_ID : $value;
|
422 |
+
break;
|
423 |
+
case 'client_secret':
|
424 |
+
/** @noinspection PhpUndefinedConstantInspection */
|
425 |
+
$return = $this->is_const_defined( $group, $key ) ? WPMS_GMAIL_CLIENT_SECRET : $value;
|
426 |
+
break;
|
427 |
+
}
|
428 |
+
|
429 |
+
break;
|
430 |
+
|
431 |
+
case 'outlook':
|
432 |
+
switch ( $key ) {
|
433 |
+
case 'client_id':
|
434 |
+
/** @noinspection PhpUndefinedConstantInspection */
|
435 |
+
$return = $this->is_const_defined( $group, $key ) ? WPMS_OUTLOOK_CLIENT_ID : $value;
|
436 |
+
break;
|
437 |
case 'client_secret':
|
438 |
/** @noinspection PhpUndefinedConstantInspection */
|
439 |
+
$return = $this->is_const_defined( $group, $key ) ? WPMS_OUTLOOK_CLIENT_SECRET : $value;
|
440 |
+
break;
|
441 |
+
}
|
442 |
+
|
443 |
+
break;
|
444 |
+
|
445 |
+
case 'amazonses':
|
446 |
+
switch ( $key ) {
|
447 |
+
case 'client_id':
|
448 |
+
/** @noinspection PhpUndefinedConstantInspection */
|
449 |
+
$return = $this->is_const_defined( $group, $key ) ? WPMS_AMAZONSES_CLIENT_ID : $value;
|
450 |
+
break;
|
451 |
+
case 'client_secret':
|
452 |
+
/** @noinspection PhpUndefinedConstantInspection */
|
453 |
+
$return = $this->is_const_defined( $group, $key ) ? WPMS_AMAZONSES_CLIENT_SECRET : $value;
|
454 |
+
break;
|
455 |
+
case 'region':
|
456 |
+
/** @noinspection PhpUndefinedConstantInspection */
|
457 |
+
$return = $this->is_const_defined( $group, $key ) ? WPMS_AMAZONSES_REGION : $value;
|
458 |
+
break;
|
459 |
}
|
460 |
|
461 |
break;
|
464 |
switch ( $key ) {
|
465 |
case 'api_key':
|
466 |
/** @noinspection PhpUndefinedConstantInspection */
|
467 |
+
$return = $this->is_const_defined( $group, $key ) ? WPMS_MAILGUN_API_KEY : $value;
|
468 |
+
break;
|
469 |
case 'domain':
|
470 |
/** @noinspection PhpUndefinedConstantInspection */
|
471 |
+
$return = $this->is_const_defined( $group, $key ) ? WPMS_MAILGUN_DOMAIN : $value;
|
472 |
+
break;
|
473 |
case 'region':
|
474 |
/** @noinspection PhpUndefinedConstantInspection */
|
475 |
+
$return = $this->is_const_defined( $group, $key ) ? WPMS_MAILGUN_REGION : $value;
|
476 |
+
break;
|
477 |
}
|
478 |
|
479 |
break;
|
482 |
switch ( $key ) {
|
483 |
case 'api_key':
|
484 |
/** @noinspection PhpUndefinedConstantInspection */
|
485 |
+
$return = $this->is_const_defined( $group, $key ) ? WPMS_SENDGRID_API_KEY : $value;
|
486 |
+
break;
|
487 |
+
}
|
488 |
+
|
489 |
+
break;
|
490 |
+
|
491 |
+
case 'license':
|
492 |
+
switch ( $key ) {
|
493 |
+
case 'key':
|
494 |
+
/** @noinspection PhpUndefinedConstantInspection */
|
495 |
+
$return = $this->is_const_defined( $group, $key ) ? WPMS_LICENSE_KEY : $value;
|
496 |
+
break;
|
497 |
}
|
498 |
|
499 |
break;
|
500 |
+
|
501 |
+
default:
|
502 |
+
// Always return the default value if nothing from above matches the request.
|
503 |
+
$return = $value;
|
504 |
}
|
505 |
|
506 |
+
return apply_filters( 'wp_mail_smtp_options_get_const_value', $return, $group, $key, $value );
|
|
|
507 |
}
|
508 |
|
509 |
/**
|
510 |
* Whether constants redefinition is enabled or not.
|
511 |
*
|
512 |
* @since 1.0.0
|
513 |
+
* @since 1.5.0 Added filter to redefine the value.
|
514 |
*
|
515 |
* @return bool
|
516 |
*/
|
517 |
public function is_const_enabled() {
|
518 |
+
|
519 |
+
$return = defined( 'WPMS_ON' ) && WPMS_ON === true;
|
520 |
+
|
521 |
+
return apply_filters( 'wp_mail_smtp_options_is_const_enabled', $return );
|
522 |
}
|
523 |
|
524 |
/**
|
527 |
* and display them differently.
|
528 |
*
|
529 |
* @since 1.0.0
|
530 |
+
* @since 1.5.0 Added a filter, Outlook/AmazonSES, license key support.
|
531 |
*
|
532 |
* @param string $group
|
533 |
* @param string $key
|
541 |
}
|
542 |
|
543 |
// Just to feel safe.
|
544 |
+
$group = sanitize_key( $group );
|
545 |
+
$key = sanitize_key( $key );
|
546 |
+
$return = false;
|
547 |
|
548 |
switch ( $group ) {
|
549 |
case 'mail':
|
550 |
switch ( $key ) {
|
551 |
case 'from_name':
|
552 |
+
$return = defined( 'WPMS_MAIL_FROM_NAME' ) && WPMS_MAIL_FROM_NAME;
|
553 |
+
break;
|
554 |
case 'from_email':
|
555 |
+
$return = defined( 'WPMS_MAIL_FROM' ) && WPMS_MAIL_FROM;
|
556 |
+
break;
|
557 |
case 'mailer':
|
558 |
+
$return = defined( 'WPMS_MAILER' ) && WPMS_MAILER;
|
559 |
+
break;
|
560 |
case 'return_path':
|
561 |
+
$return = defined( 'WPMS_SET_RETURN_PATH' ) && ( WPMS_SET_RETURN_PATH === 'true' || WPMS_SET_RETURN_PATH === true );
|
562 |
+
break;
|
563 |
case 'from_name_force':
|
564 |
+
$return = defined( 'WPMS_MAIL_FROM_NAME_FORCE' ) && ( WPMS_MAIL_FROM_NAME_FORCE === 'true' || WPMS_MAIL_FROM_NAME_FORCE === true );
|
565 |
+
break;
|
566 |
case 'from_email_force':
|
567 |
+
$return = defined( 'WPMS_MAIL_FROM_FORCE' ) && ( WPMS_MAIL_FROM_FORCE === 'true' || WPMS_MAIL_FROM_FORCE === true );
|
568 |
+
break;
|
569 |
}
|
570 |
|
571 |
break;
|
573 |
case 'smtp':
|
574 |
switch ( $key ) {
|
575 |
case 'host':
|
576 |
+
$return = defined( 'WPMS_SMTP_HOST' ) && WPMS_SMTP_HOST;
|
577 |
+
break;
|
578 |
case 'port':
|
579 |
+
$return = defined( 'WPMS_SMTP_PORT' ) && WPMS_SMTP_PORT;
|
580 |
+
break;
|
581 |
case 'encryption':
|
582 |
+
$return = defined( 'WPMS_SSL' );
|
583 |
+
break;
|
584 |
case 'auth':
|
585 |
+
$return = defined( 'WPMS_SMTP_AUTH' ) && WPMS_SMTP_AUTH;
|
586 |
+
break;
|
587 |
case 'autotls':
|
588 |
+
$return = defined( 'WPMS_SMTP_AUTOTLS' ) && ( WPMS_SMTP_AUTOTLS === 'true' || WPMS_SMTP_AUTOTLS === true );
|
589 |
+
break;
|
590 |
case 'user':
|
591 |
+
$return = defined( 'WPMS_SMTP_USER' ) && WPMS_SMTP_USER;
|
592 |
+
break;
|
593 |
case 'pass':
|
594 |
+
$return = defined( 'WPMS_SMTP_PASS' ) && WPMS_SMTP_PASS;
|
595 |
+
break;
|
596 |
}
|
597 |
|
598 |
break;
|
600 |
case 'gmail':
|
601 |
switch ( $key ) {
|
602 |
case 'client_id':
|
603 |
+
$return = defined( 'WPMS_GMAIL_CLIENT_ID' ) && WPMS_GMAIL_CLIENT_ID;
|
604 |
+
break;
|
605 |
+
case 'client_secret':
|
606 |
+
$return = defined( 'WPMS_GMAIL_CLIENT_SECRET' ) && WPMS_GMAIL_CLIENT_SECRET;
|
607 |
+
break;
|
608 |
+
}
|
609 |
+
|
610 |
+
break;
|
611 |
+
|
612 |
+
case 'outlook':
|
613 |
+
switch ( $key ) {
|
614 |
+
case 'client_id':
|
615 |
+
$return = defined( 'WPMS_OUTLOOK_CLIENT_ID' ) && WPMS_OUTLOOK_CLIENT_ID;
|
616 |
+
break;
|
617 |
case 'client_secret':
|
618 |
+
$return = defined( 'WPMS_OUTLOOK_CLIENT_SECRET' ) && WPMS_OUTLOOK_CLIENT_SECRET;
|
619 |
+
break;
|
620 |
+
}
|
621 |
+
|
622 |
+
break;
|
623 |
+
|
624 |
+
case 'amazonses':
|
625 |
+
switch ( $key ) {
|
626 |
+
case 'client_id':
|
627 |
+
$return = defined( 'WPMS_AMAZONSES_CLIENT_ID' ) && WPMS_AMAZONSES_CLIENT_ID;
|
628 |
+
break;
|
629 |
+
case 'client_secret':
|
630 |
+
$return = defined( 'WPMS_AMAZONSES_CLIENT_SECRET' ) && WPMS_AMAZONSES_CLIENT_SECRET;
|
631 |
+
break;
|
632 |
+
case 'region':
|
633 |
+
$return = defined( 'WPMS_AMAZONSES_REGION' ) && WPMS_AMAZONSES_REGION;
|
634 |
+
break;
|
635 |
}
|
636 |
|
637 |
break;
|
639 |
case 'mailgun':
|
640 |
switch ( $key ) {
|
641 |
case 'api_key':
|
642 |
+
$return = defined( 'WPMS_MAILGUN_API_KEY' ) && WPMS_MAILGUN_API_KEY;
|
643 |
+
break;
|
644 |
case 'domain':
|
645 |
+
$return = defined( 'WPMS_MAILGUN_DOMAIN' ) && WPMS_MAILGUN_DOMAIN;
|
646 |
+
break;
|
647 |
case 'region':
|
648 |
+
$return = defined( 'WPMS_MAILGUN_REGION' ) && WPMS_MAILGUN_REGION;
|
649 |
+
break;
|
650 |
}
|
651 |
|
652 |
break;
|
654 |
case 'sendgrid':
|
655 |
switch ( $key ) {
|
656 |
case 'api_key':
|
657 |
+
$return = defined( 'WPMS_SENDGRID_API_KEY' ) && WPMS_SENDGRID_API_KEY;
|
658 |
+
break;
|
659 |
+
}
|
660 |
+
|
661 |
+
break;
|
662 |
+
|
663 |
+
case 'license':
|
664 |
+
switch ( $key ) {
|
665 |
+
case 'key':
|
666 |
+
$return = defined( 'WPMS_LICENSE_KEY' ) && WPMS_LICENSE_KEY;
|
667 |
+
break;
|
668 |
}
|
669 |
|
670 |
break;
|
671 |
}
|
672 |
|
673 |
+
return apply_filters( 'wp_mail_smtp_options_is_const_defined', $return, $group, $key );
|
674 |
}
|
675 |
|
676 |
/**
|
677 |
* Set plugin options, all at once.
|
678 |
*
|
679 |
* @since 1.0.0
|
680 |
+
* @since 1.3.0 Added $once argument to save options only if they don't exist already.
|
681 |
+
* @since 1.4.0 Added Mailgun:region.
|
682 |
+
* @since 1.5.0 Added Outlook/AmazonSES, Email Log. Stop saving const values into DB.
|
683 |
*
|
684 |
* @param array $options Plugin options to save.
|
685 |
* @param bool $once Whether to update existing options or to add these options only once.
|
686 |
*/
|
687 |
public function set( $options, $once = false ) {
|
688 |
/*
|
689 |
+
* Process generic options.
|
690 |
*/
|
691 |
foreach ( (array) $options as $group => $keys ) {
|
692 |
foreach ( $keys as $option_name => $option_value ) {
|
695 |
switch ( $option_name ) {
|
696 |
case 'from_name':
|
697 |
case 'mailer':
|
698 |
+
$options[ $group ][ $option_name ] = sanitize_text_field( $option_value );
|
699 |
break;
|
700 |
case 'from_email':
|
701 |
if ( filter_var( $option_value, FILTER_VALIDATE_EMAIL ) ) {
|
702 |
+
$options[ $group ][ $option_name ] = sanitize_email( $option_value );
|
703 |
}
|
704 |
break;
|
705 |
case 'return_path':
|
706 |
case 'from_name_force':
|
707 |
case 'from_email_force':
|
708 |
+
$options[ $group ][ $option_name ] = (bool) $option_value;
|
709 |
break;
|
710 |
}
|
711 |
break;
|
728 |
if (
|
729 |
! empty( $options['mail']['mailer'] ) &&
|
730 |
isset( $options[ $options['mail']['mailer'] ] ) &&
|
731 |
+
in_array( $options['mail']['mailer'], array( 'pepipost', 'smtp', 'sendgrid', 'mailgun', 'gmail', 'outlook' ), true )
|
732 |
) {
|
733 |
|
734 |
$mailer = $options['mail']['mailer'];
|
738 |
case 'host': // smtp.
|
739 |
case 'user': // smtp.
|
740 |
case 'encryption': // smtp.
|
741 |
+
case 'region': // mailgun/amazonses.
|
742 |
+
$options[ $mailer ][ $option_name ] = $this->is_const_defined( $mailer, $option_name ) ? '' : sanitize_text_field( $option_value );
|
743 |
break; // smtp.
|
744 |
case 'port':
|
745 |
+
$options[ $mailer ][ $option_name ] = $this->is_const_defined( $mailer, $option_name ) ? 25 : (int) $option_value;
|
746 |
break;
|
747 |
case 'auth': // smtp.
|
748 |
case 'autotls': // smtp.
|
749 |
+
$option_value = (bool) $option_value;
|
750 |
|
751 |
+
$options[ $mailer ][ $option_name ] = $this->is_const_defined( $mailer, $option_name ) ? false : $option_value;
|
752 |
break;
|
753 |
|
754 |
case 'pass': // smtp.
|
|
|
|
|
755 |
// Do not process as they may contain certain special characters, but allow to be overwritten using constants.
|
756 |
+
$options[ $mailer ][ $option_name ] = $this->is_const_defined( $mailer, $option_name ) ? '' : trim( (string) $option_value );
|
757 |
break;
|
758 |
|
759 |
case 'api_key': // mailgun/sendgrid.
|
760 |
case 'domain': // mailgun.
|
761 |
+
case 'client_id': // gmail/outlook/amazonses.
|
762 |
+
case 'client_secret': // gmail/outlook/amazonses.
|
763 |
+
case 'auth_code': // gmail/outlook.
|
764 |
+
$options[ $mailer ][ $option_name ] = $this->is_const_defined( $mailer, $option_name ) ? '' : sanitize_text_field( $option_value );
|
765 |
+
break;
|
766 |
|
767 |
+
case 'access_token': // gmail/outlook, array().
|
768 |
+
case 'user_details': // outlook, array().
|
769 |
+
case 'emails_pending': // amazonses, array().
|
770 |
+
// These options don't support constants.
|
771 |
+
$options[ $mailer ][ $option_name ] = $option_value;
|
772 |
break;
|
773 |
}
|
774 |
}
|
src/Processor.php
CHANGED
@@ -113,6 +113,7 @@ class Processor {
|
|
113 |
* This method will be called every time 'smtp' and 'mail' mailers will be used to send emails.
|
114 |
*
|
115 |
* @since 1.3.0
|
|
|
116 |
*
|
117 |
* @param bool $is_sent
|
118 |
* @param array $to
|
@@ -133,6 +134,8 @@ class Processor {
|
|
133 |
} else {
|
134 |
Debug::clear();
|
135 |
}
|
|
|
|
|
136 |
}
|
137 |
|
138 |
/**
|
@@ -199,7 +202,7 @@ class Processor {
|
|
199 |
public function get_default_email() {
|
200 |
|
201 |
// In case of CLI we don't have SERVER_NAME, so use host name instead, may be not a domain name.
|
202 |
-
$server_name =
|
203 |
|
204 |
// Get the site domain and get rid of www.
|
205 |
$sitename = strtolower( $server_name );
|
113 |
* This method will be called every time 'smtp' and 'mail' mailers will be used to send emails.
|
114 |
*
|
115 |
* @since 1.3.0
|
116 |
+
* @since 1.5.0 Added a do_action() to be able to hook into.
|
117 |
*
|
118 |
* @param bool $is_sent
|
119 |
* @param array $to
|
134 |
} else {
|
135 |
Debug::clear();
|
136 |
}
|
137 |
+
|
138 |
+
do_action( 'wp_mail_smtp_mailcatcher_smtp_send_after', $is_sent, $to, $cc, $bcc, $subject, $body, $from );
|
139 |
}
|
140 |
|
141 |
/**
|
202 |
public function get_default_email() {
|
203 |
|
204 |
// In case of CLI we don't have SERVER_NAME, so use host name instead, may be not a domain name.
|
205 |
+
$server_name = Geo::get_site_domain();
|
206 |
|
207 |
// Get the site domain and get rid of www.
|
208 |
$sitename = strtolower( $server_name );
|
src/Providers/AuthAbstract.php
CHANGED
@@ -2,6 +2,8 @@
|
|
2 |
|
3 |
namespace WPMailSMTP\Providers;
|
4 |
|
|
|
|
|
5 |
/**
|
6 |
* Class AuthAbstract.
|
7 |
*
|
@@ -9,6 +11,49 @@ namespace WPMailSMTP\Providers;
|
|
9 |
*/
|
10 |
abstract class AuthAbstract implements AuthInterface {
|
11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
/**
|
13 |
* Get the url, that users will be redirected back to finish the OAuth process.
|
14 |
*
|
@@ -19,4 +64,81 @@ abstract class AuthAbstract implements AuthInterface {
|
|
19 |
public static function get_plugin_auth_url() {
|
20 |
return add_query_arg( 'tab', 'auth', wp_mail_smtp()->get_admin()->get_admin_page_url() );
|
21 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
}
|
2 |
|
3 |
namespace WPMailSMTP\Providers;
|
4 |
|
5 |
+
use WPMailSMTP\Options as PluginOptions;
|
6 |
+
|
7 |
/**
|
8 |
* Class AuthAbstract.
|
9 |
*
|
11 |
*/
|
12 |
abstract class AuthAbstract implements AuthInterface {
|
13 |
|
14 |
+
/**
|
15 |
+
* Mailer DB options.
|
16 |
+
*
|
17 |
+
* @since 1.0.0
|
18 |
+
*
|
19 |
+
* @var array
|
20 |
+
*/
|
21 |
+
protected $options = array();
|
22 |
+
|
23 |
+
/**
|
24 |
+
* @since 1.0.0
|
25 |
+
*
|
26 |
+
* @var mixed
|
27 |
+
*/
|
28 |
+
protected $client;
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Mailer slug.
|
32 |
+
*
|
33 |
+
* @since 1.0.0
|
34 |
+
*
|
35 |
+
* @var string
|
36 |
+
*/
|
37 |
+
protected $mailer_slug = '';
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Key for a stored unique state value.
|
41 |
+
*
|
42 |
+
* @since 1.5.0
|
43 |
+
*
|
44 |
+
* @var string
|
45 |
+
*/
|
46 |
+
public $state_key = 'wp_mail_smtp_provider_client_state';
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Use the composer autoloader to include the auth library and all dependencies.
|
50 |
+
*
|
51 |
+
* @since 1.0.0
|
52 |
+
*/
|
53 |
+
protected function include_vendor_lib() {
|
54 |
+
require_once wp_mail_smtp()->plugin_path . '/vendor/autoload.php';
|
55 |
+
}
|
56 |
+
|
57 |
/**
|
58 |
* Get the url, that users will be redirected back to finish the OAuth process.
|
59 |
*
|
64 |
public static function get_plugin_auth_url() {
|
65 |
return add_query_arg( 'tab', 'auth', wp_mail_smtp()->get_admin()->get_admin_page_url() );
|
66 |
}
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Update auth code in our DB.
|
70 |
+
*
|
71 |
+
* @since 1.0.0
|
72 |
+
*
|
73 |
+
* @param string $code
|
74 |
+
*/
|
75 |
+
protected function update_auth_code( $code ) {
|
76 |
+
|
77 |
+
$options = new PluginOptions();
|
78 |
+
$all = $options->get_all();
|
79 |
+
|
80 |
+
// To save in DB.
|
81 |
+
$all[ $this->mailer_slug ]['auth_code'] = $code;
|
82 |
+
|
83 |
+
// To save in currently retrieved options array.
|
84 |
+
$this->options['auth_code'] = $code;
|
85 |
+
|
86 |
+
$options->set( $all );
|
87 |
+
}
|
88 |
+
|
89 |
+
/**
|
90 |
+
* Update access token in our DB.
|
91 |
+
*
|
92 |
+
* @since 1.0.0
|
93 |
+
*
|
94 |
+
* @param mixed $token
|
95 |
+
*/
|
96 |
+
protected function update_access_token( $token ) {
|
97 |
+
|
98 |
+
$options = new PluginOptions();
|
99 |
+
$all = $options->get_all();
|
100 |
+
|
101 |
+
// To save in DB.
|
102 |
+
$all[ $this->mailer_slug ]['access_token'] = $token;
|
103 |
+
|
104 |
+
// To save in currently retrieved options array.
|
105 |
+
$this->options['access_token'] = $token;
|
106 |
+
|
107 |
+
$options->set( $all );
|
108 |
+
}
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Update refresh token in our DB.
|
112 |
+
*
|
113 |
+
* @since 1.0.0
|
114 |
+
*
|
115 |
+
* @param mixed $token
|
116 |
+
*/
|
117 |
+
protected function update_refresh_token( $token ) {
|
118 |
+
|
119 |
+
$options = new PluginOptions();
|
120 |
+
$all = $options->get_all();
|
121 |
+
|
122 |
+
// To save in DB.
|
123 |
+
$all[ $this->mailer_slug ]['refresh_token'] = $token;
|
124 |
+
|
125 |
+
// To save in currently retrieved options array.
|
126 |
+
$this->options['refresh_token'] = $token;
|
127 |
+
|
128 |
+
$options->set( $all );
|
129 |
+
}
|
130 |
+
|
131 |
+
/**
|
132 |
+
* @inheritdoc
|
133 |
+
*/
|
134 |
+
public function is_clients_saved() {
|
135 |
+
return ! empty( $this->options['client_id'] ) && ! empty( $this->options['client_secret'] );
|
136 |
+
}
|
137 |
+
|
138 |
+
/**
|
139 |
+
* @inheritdoc
|
140 |
+
*/
|
141 |
+
public function is_auth_required() {
|
142 |
+
return empty( $this->options['access_token'] ) || empty( $this->options['refresh_token'] );
|
143 |
+
}
|
144 |
}
|
src/Providers/AuthInterface.php
CHANGED
@@ -10,10 +10,21 @@ namespace WPMailSMTP\Providers;
|
|
10 |
interface AuthInterface {
|
11 |
|
12 |
/**
|
13 |
-
*
|
|
|
14 |
*
|
15 |
* @since 1.0.0
|
|
|
|
|
16 |
*/
|
17 |
-
public function
|
18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
}
|
10 |
interface AuthInterface {
|
11 |
|
12 |
/**
|
13 |
+
* Whether user saved Client ID/App ID and Client Secret/App Password or not.
|
14 |
+
* Both options are required.
|
15 |
*
|
16 |
* @since 1.0.0
|
17 |
+
*
|
18 |
+
* @return bool
|
19 |
*/
|
20 |
+
public function is_clients_saved();
|
21 |
|
22 |
+
/**
|
23 |
+
* Whether we have an access and refresh tokens or not.
|
24 |
+
*
|
25 |
+
* @since 1.0.0
|
26 |
+
*
|
27 |
+
* @return bool
|
28 |
+
*/
|
29 |
+
public function is_auth_required();
|
30 |
}
|
src/Providers/Gmail/Auth.php
CHANGED
@@ -13,23 +13,6 @@ use WPMailSMTP\Providers\AuthAbstract;
|
|
13 |
*/
|
14 |
class Auth extends AuthAbstract {
|
15 |
|
16 |
-
/**
|
17 |
-
* Gmail options.
|
18 |
-
*
|
19 |
-
* @var array
|
20 |
-
*/
|
21 |
-
private $gmail;
|
22 |
-
|
23 |
-
/**
|
24 |
-
* @var \Google_Client
|
25 |
-
*/
|
26 |
-
private $client;
|
27 |
-
|
28 |
-
/**
|
29 |
-
* @var string
|
30 |
-
*/
|
31 |
-
private $mailer;
|
32 |
-
|
33 |
/**
|
34 |
* Auth constructor.
|
35 |
*
|
@@ -37,36 +20,30 @@ class Auth extends AuthAbstract {
|
|
37 |
*/
|
38 |
public function __construct() {
|
39 |
|
40 |
-
$options
|
41 |
-
$this->
|
42 |
|
43 |
-
if ( $this->
|
44 |
return;
|
45 |
}
|
46 |
|
47 |
-
$this->
|
48 |
|
49 |
if ( $this->is_clients_saved() ) {
|
50 |
|
51 |
-
$this->
|
52 |
|
53 |
$this->client = $this->get_client();
|
54 |
}
|
55 |
}
|
56 |
|
57 |
-
/**
|
58 |
-
* Use the composer autoloader to include the Google Library and all its dependencies.
|
59 |
-
*
|
60 |
-
* @since 1.0.0
|
61 |
-
*/
|
62 |
-
protected function include_google_lib() {
|
63 |
-
require_once wp_mail_smtp()->plugin_path . '/vendor/autoload.php';
|
64 |
-
}
|
65 |
-
|
66 |
/**
|
67 |
* Init and get the Google Client object.
|
68 |
*
|
69 |
* @since 1.0.0
|
|
|
|
|
|
|
70 |
*/
|
71 |
public function get_client() {
|
72 |
|
@@ -75,14 +52,14 @@ class Auth extends AuthAbstract {
|
|
75 |
return $this->client;
|
76 |
}
|
77 |
|
78 |
-
$this->
|
79 |
|
80 |
$client = new \Google_Client(
|
81 |
array(
|
82 |
-
'client_id' => $this->
|
83 |
-
'client_secret' => $this->
|
84 |
'redirect_uris' => array(
|
85 |
-
|
86 |
),
|
87 |
)
|
88 |
);
|
@@ -94,12 +71,15 @@ class Auth extends AuthAbstract {
|
|
94 |
$client->setScopes( array( \Google_Service_Gmail::MAIL_GOOGLE_COM ) );
|
95 |
$client->setRedirectUri( self::get_plugin_auth_url() );
|
96 |
|
|
|
|
|
|
|
97 |
if (
|
98 |
-
|
99 |
-
! empty( $this->
|
100 |
) {
|
101 |
try {
|
102 |
-
$creds = $client->fetchAccessTokenWithAuthCode( $this->
|
103 |
} catch ( \Exception $e ) {
|
104 |
$creds['error'] = $e->getMessage();
|
105 |
Debug::set(
|
@@ -117,15 +97,15 @@ class Auth extends AuthAbstract {
|
|
117 |
$this->update_refresh_token( $client->getRefreshToken() );
|
118 |
}
|
119 |
|
120 |
-
if ( ! empty( $this->
|
121 |
-
$client->setAccessToken( $this->
|
122 |
}
|
123 |
|
124 |
// Refresh the token if it's expired.
|
125 |
if ( $client->isAccessTokenExpired() ) {
|
126 |
$refresh = $client->getRefreshToken();
|
127 |
-
if ( empty( $refresh ) && isset( $this->
|
128 |
-
$refresh = $this->
|
129 |
}
|
130 |
|
131 |
if ( ! empty( $refresh ) ) {
|
@@ -163,7 +143,7 @@ class Auth extends AuthAbstract {
|
|
163 |
// We can't process without saved client_id/secret.
|
164 |
if ( ! $this->is_clients_saved() ) {
|
165 |
Debug::set( 'There was an error while processing the Google authentication request. Please make sure that you have Client ID and Client Secret both valid and saved.' );
|
166 |
-
|
167 |
add_query_arg(
|
168 |
'error',
|
169 |
'google_no_clients',
|
@@ -173,7 +153,7 @@ class Auth extends AuthAbstract {
|
|
173 |
exit;
|
174 |
}
|
175 |
|
176 |
-
$this->
|
177 |
|
178 |
$code = '';
|
179 |
$scope = '';
|
@@ -185,7 +165,7 @@ class Auth extends AuthAbstract {
|
|
185 |
|
186 |
// In case of any error: display a message to a user.
|
187 |
if ( ! empty( $error ) ) {
|
188 |
-
|
189 |
add_query_arg(
|
190 |
'error',
|
191 |
'google_' . $error,
|
@@ -215,7 +195,7 @@ class Auth extends AuthAbstract {
|
|
215 |
// Save the auth code. So \Google_Client can reuse it to retrieve the access token.
|
216 |
$this->update_auth_code( $code );
|
217 |
} else {
|
218 |
-
|
219 |
add_query_arg(
|
220 |
'error',
|
221 |
'google_no_code_scope',
|
@@ -225,7 +205,7 @@ class Auth extends AuthAbstract {
|
|
225 |
exit;
|
226 |
}
|
227 |
|
228 |
-
|
229 |
add_query_arg(
|
230 |
'success',
|
231 |
'google_site_linked',
|
@@ -236,67 +216,13 @@ class Auth extends AuthAbstract {
|
|
236 |
}
|
237 |
|
238 |
/**
|
239 |
-
*
|
240 |
-
*
|
241 |
-
* @since 1.0.0
|
242 |
-
*
|
243 |
-
* @param array $token
|
244 |
-
*/
|
245 |
-
protected function update_access_token( $token ) {
|
246 |
-
|
247 |
-
$options = new PluginOptions();
|
248 |
-
$all = $options->get_all();
|
249 |
-
|
250 |
-
$all[ $this->mailer ]['access_token'] = $token;
|
251 |
-
$this->gmail['access_token'] = $token;
|
252 |
-
|
253 |
-
$options->set( $all );
|
254 |
-
}
|
255 |
-
|
256 |
-
/**
|
257 |
-
* Update refresh token in our DB.
|
258 |
-
*
|
259 |
-
* @since 1.0.0
|
260 |
-
*
|
261 |
-
* @param string $token
|
262 |
-
*/
|
263 |
-
protected function update_refresh_token( $token ) {
|
264 |
-
|
265 |
-
$options = new PluginOptions();
|
266 |
-
$all = $options->get_all();
|
267 |
-
|
268 |
-
$all[ $this->mailer ]['refresh_token'] = $token;
|
269 |
-
$this->gmail['refresh_token'] = $token;
|
270 |
-
|
271 |
-
$options->set( $all );
|
272 |
-
}
|
273 |
-
|
274 |
-
/**
|
275 |
-
* Update auth code in our DB.
|
276 |
-
*
|
277 |
-
* @since 1.0.0
|
278 |
-
*
|
279 |
-
* @param string $code
|
280 |
-
*/
|
281 |
-
protected function update_auth_code( $code ) {
|
282 |
-
|
283 |
-
$options = new PluginOptions();
|
284 |
-
$all = $options->get_all();
|
285 |
-
|
286 |
-
$all[ $this->mailer ]['auth_code'] = $code;
|
287 |
-
$this->gmail['auth_code'] = $code;
|
288 |
-
|
289 |
-
$options->set( $all );
|
290 |
-
}
|
291 |
-
|
292 |
-
/**
|
293 |
-
* Get the auth URL used to proceed to Google to request access to send emails.
|
294 |
*
|
295 |
* @since 1.0.0
|
296 |
*
|
297 |
* @return string
|
298 |
*/
|
299 |
-
public function
|
300 |
|
301 |
if (
|
302 |
! empty( $this->client ) &&
|
@@ -310,25 +236,22 @@ class Auth extends AuthAbstract {
|
|
310 |
}
|
311 |
|
312 |
/**
|
313 |
-
*
|
314 |
-
* Both options are required.
|
315 |
*
|
316 |
-
* @since 1.
|
317 |
*
|
318 |
-
* @return
|
319 |
*/
|
320 |
-
public function
|
321 |
-
return ! empty( $this->gmail['client_id'] ) && ! empty( $this->gmail['client_secret'] );
|
322 |
-
}
|
323 |
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
return
|
333 |
}
|
334 |
}
|
13 |
*/
|
14 |
class Auth extends AuthAbstract {
|
15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
/**
|
17 |
* Auth constructor.
|
18 |
*
|
20 |
*/
|
21 |
public function __construct() {
|
22 |
|
23 |
+
$options = new PluginOptions();
|
24 |
+
$this->mailer_slug = $options->get( 'mail', 'mailer' );
|
25 |
|
26 |
+
if ( $this->mailer_slug !== Options::SLUG ) {
|
27 |
return;
|
28 |
}
|
29 |
|
30 |
+
$this->options = $options->get_group( $this->mailer_slug );
|
31 |
|
32 |
if ( $this->is_clients_saved() ) {
|
33 |
|
34 |
+
$this->include_vendor_lib();
|
35 |
|
36 |
$this->client = $this->get_client();
|
37 |
}
|
38 |
}
|
39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
/**
|
41 |
* Init and get the Google Client object.
|
42 |
*
|
43 |
* @since 1.0.0
|
44 |
+
* @since 1.5.0 Add ability to apply custom options to the client via a filter.
|
45 |
+
*
|
46 |
+
* @return \Google_Client
|
47 |
*/
|
48 |
public function get_client() {
|
49 |
|
52 |
return $this->client;
|
53 |
}
|
54 |
|
55 |
+
$this->include_vendor_lib();
|
56 |
|
57 |
$client = new \Google_Client(
|
58 |
array(
|
59 |
+
'client_id' => $this->options['client_id'],
|
60 |
+
'client_secret' => $this->options['client_secret'],
|
61 |
'redirect_uris' => array(
|
62 |
+
self::get_plugin_auth_url(),
|
63 |
),
|
64 |
)
|
65 |
);
|
71 |
$client->setScopes( array( \Google_Service_Gmail::MAIL_GOOGLE_COM ) );
|
72 |
$client->setRedirectUri( self::get_plugin_auth_url() );
|
73 |
|
74 |
+
// Apply custom options to the client.
|
75 |
+
$client = apply_filters( 'wp_mail_smtp_providers_gmail_auth_get_client_custom_options', $client );
|
76 |
+
|
77 |
if (
|
78 |
+
$this->is_auth_required() &&
|
79 |
+
! empty( $this->options['auth_code'] )
|
80 |
) {
|
81 |
try {
|
82 |
+
$creds = $client->fetchAccessTokenWithAuthCode( $this->options['auth_code'] );
|
83 |
} catch ( \Exception $e ) {
|
84 |
$creds['error'] = $e->getMessage();
|
85 |
Debug::set(
|
97 |
$this->update_refresh_token( $client->getRefreshToken() );
|
98 |
}
|
99 |
|
100 |
+
if ( ! empty( $this->options['access_token'] ) ) {
|
101 |
+
$client->setAccessToken( $this->options['access_token'] );
|
102 |
}
|
103 |
|
104 |
// Refresh the token if it's expired.
|
105 |
if ( $client->isAccessTokenExpired() ) {
|
106 |
$refresh = $client->getRefreshToken();
|
107 |
+
if ( empty( $refresh ) && isset( $this->options['refresh_token'] ) ) {
|
108 |
+
$refresh = $this->options['refresh_token'];
|
109 |
}
|
110 |
|
111 |
if ( ! empty( $refresh ) ) {
|
143 |
// We can't process without saved client_id/secret.
|
144 |
if ( ! $this->is_clients_saved() ) {
|
145 |
Debug::set( 'There was an error while processing the Google authentication request. Please make sure that you have Client ID and Client Secret both valid and saved.' );
|
146 |
+
wp_safe_redirect(
|
147 |
add_query_arg(
|
148 |
'error',
|
149 |
'google_no_clients',
|
153 |
exit;
|
154 |
}
|
155 |
|
156 |
+
$this->include_vendor_lib();
|
157 |
|
158 |
$code = '';
|
159 |
$scope = '';
|
165 |
|
166 |
// In case of any error: display a message to a user.
|
167 |
if ( ! empty( $error ) ) {
|
168 |
+
wp_safe_redirect(
|
169 |
add_query_arg(
|
170 |
'error',
|
171 |
'google_' . $error,
|
195 |
// Save the auth code. So \Google_Client can reuse it to retrieve the access token.
|
196 |
$this->update_auth_code( $code );
|
197 |
} else {
|
198 |
+
wp_safe_redirect(
|
199 |
add_query_arg(
|
200 |
'error',
|
201 |
'google_no_code_scope',
|
205 |
exit;
|
206 |
}
|
207 |
|
208 |
+
wp_safe_redirect(
|
209 |
add_query_arg(
|
210 |
'success',
|
211 |
'google_site_linked',
|
216 |
}
|
217 |
|
218 |
/**
|
219 |
+
* Get the auth URL used to proceed to Provider to request access to send emails.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
220 |
*
|
221 |
* @since 1.0.0
|
222 |
*
|
223 |
* @return string
|
224 |
*/
|
225 |
+
public function get_auth_url() {
|
226 |
|
227 |
if (
|
228 |
! empty( $this->client ) &&
|
236 |
}
|
237 |
|
238 |
/**
|
239 |
+
* Get user information (like email etc) that is associated with the current connection.
|
|
|
240 |
*
|
241 |
+
* @since 1.5.0
|
242 |
*
|
243 |
+
* @return array
|
244 |
*/
|
245 |
+
public function get_user_info() {
|
|
|
|
|
246 |
|
247 |
+
$gmail = new \Google_Service_Gmail( $this->get_client() );
|
248 |
+
|
249 |
+
try {
|
250 |
+
$email = $gmail->users->getProfile( 'me' )->getEmailAddress();
|
251 |
+
} catch ( \Exception $e ) {
|
252 |
+
$email = '';
|
253 |
+
}
|
254 |
+
|
255 |
+
return array( 'email' => $email );
|
256 |
}
|
257 |
}
|
src/Providers/Gmail/Mailer.php
CHANGED
@@ -80,11 +80,12 @@ class Mailer extends MailerAbstract {
|
|
80 |
$message = new \Google_Service_Gmail_Message();
|
81 |
|
82 |
// Get the raw MIME email using \MailCatcher data.
|
|
|
83 |
$base64 = str_replace(
|
84 |
array( '+', '/', '=' ),
|
85 |
array( '-', '_', '' ),
|
86 |
base64_encode( $this->phpmailer->getSentMIMEMessage() )
|
87 |
-
);
|
88 |
|
89 |
$message->setRaw( $base64 );
|
90 |
|
@@ -108,11 +109,15 @@ class Mailer extends MailerAbstract {
|
|
108 |
* Save response from the API to use it later.
|
109 |
*
|
110 |
* @since 1.0.0
|
|
|
111 |
*
|
112 |
* @param \Google_Service_Gmail_Message $response
|
113 |
*/
|
114 |
protected function process_response( $response ) {
|
|
|
115 |
$this->response = $response;
|
|
|
|
|
116 |
}
|
117 |
|
118 |
/**
|
80 |
$message = new \Google_Service_Gmail_Message();
|
81 |
|
82 |
// Get the raw MIME email using \MailCatcher data.
|
83 |
+
// We need here to make base64URL-safe string.
|
84 |
$base64 = str_replace(
|
85 |
array( '+', '/', '=' ),
|
86 |
array( '-', '_', '' ),
|
87 |
base64_encode( $this->phpmailer->getSentMIMEMessage() )
|
88 |
+
);
|
89 |
|
90 |
$message->setRaw( $base64 );
|
91 |
|
109 |
* Save response from the API to use it later.
|
110 |
*
|
111 |
* @since 1.0.0
|
112 |
+
* @since 1.5.0 Added action "wp_mail_smtp_providers_gmail_mailer_process_response" with $response.
|
113 |
*
|
114 |
* @param \Google_Service_Gmail_Message $response
|
115 |
*/
|
116 |
protected function process_response( $response ) {
|
117 |
+
|
118 |
$this->response = $response;
|
119 |
+
|
120 |
+
do_action( 'wp_mail_smtp_providers_gmail_mailer_process_response', $this->response, $this->phpmailer );
|
121 |
}
|
122 |
|
123 |
/**
|
src/Providers/Gmail/Options.php
CHANGED
@@ -12,7 +12,14 @@ use WPMailSMTP\Providers\OptionsAbstract;
|
|
12 |
class Options extends OptionsAbstract {
|
13 |
|
14 |
/**
|
15 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
*
|
17 |
* @since 1.0.0
|
18 |
*/
|
@@ -20,8 +27,8 @@ class Options extends OptionsAbstract {
|
|
20 |
|
21 |
parent::__construct(
|
22 |
array(
|
23 |
-
'logo_url' => wp_mail_smtp()->
|
24 |
-
'slug' =>
|
25 |
'title' => esc_html__( 'Gmail', 'wp-mail-smtp' ),
|
26 |
'description' => sprintf(
|
27 |
wp_kses(
|
@@ -79,11 +86,18 @@ class Options extends OptionsAbstract {
|
|
79 |
<label for="wp-mail-smtp-setting-<?php echo esc_attr( $this->get_slug() ); ?>-client_secret"><?php esc_html_e( 'Client Secret', 'wp-mail-smtp' ); ?></label>
|
80 |
</div>
|
81 |
<div class="wp-mail-smtp-setting-field">
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
</div>
|
88 |
</div>
|
89 |
|
@@ -104,9 +118,7 @@ class Options extends OptionsAbstract {
|
|
104 |
<span class="dashicons dashicons-admin-page"></span>
|
105 |
</button>
|
106 |
<p class="desc">
|
107 |
-
<?php esc_html_e( '
|
108 |
-
<br>
|
109 |
-
<?php esc_html_e( 'You need to copy this URL into "Authorized redirect URIs" field for you web application on Google APIs site for your project there.', 'wp-mail-smtp' ); ?>
|
110 |
</p>
|
111 |
</div>
|
112 |
</div>
|
@@ -133,21 +145,16 @@ class Options extends OptionsAbstract {
|
|
133 |
protected function display_auth_setting_action() {
|
134 |
|
135 |
// Do the processing on the fly, as having ajax here is too complicated.
|
136 |
-
$this->
|
137 |
|
138 |
$auth = new Auth();
|
139 |
?>
|
140 |
|
141 |
-
<script>
|
142 |
-
var wp_mail_smtp = window.wp_mail_smtp || {};
|
143 |
-
wp_mail_smtp.text_gmail_remove = "<?php esc_html_e( '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.', 'wp-mail-smtp' ); ?>";
|
144 |
-
</script>
|
145 |
-
|
146 |
<?php if ( $auth->is_clients_saved() ) : ?>
|
147 |
|
148 |
<?php if ( $auth->is_auth_required() ) : ?>
|
149 |
|
150 |
-
<a href="<?php echo esc_url( $auth->
|
151 |
<?php esc_html_e( 'Allow plugin to send emails using your Google account', 'wp-mail-smtp' ); ?>
|
152 |
</a>
|
153 |
<p class="desc">
|
@@ -156,9 +163,22 @@ class Options extends OptionsAbstract {
|
|
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
|
160 |
<?php esc_html_e( 'Remove Connection', 'wp-mail-smtp' ); ?>
|
161 |
</a>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
162 |
<p class="desc">
|
163 |
<?php esc_html_e( 'Removing the connection will give you an ability to redo the connection or link to another Google account.', 'wp-mail-smtp' ); ?>
|
164 |
</p>
|
@@ -167,8 +187,8 @@ class Options extends OptionsAbstract {
|
|
167 |
|
168 |
<?php else : ?>
|
169 |
|
170 |
-
<p>
|
171 |
-
<?php esc_html_e( '
|
172 |
</p>
|
173 |
|
174 |
<?php
|
@@ -176,11 +196,11 @@ class Options extends OptionsAbstract {
|
|
176 |
}
|
177 |
|
178 |
/**
|
179 |
-
* Remove
|
180 |
*
|
181 |
* @since 1.3.0
|
182 |
*/
|
183 |
-
public function
|
184 |
|
185 |
if ( ! is_super_admin() ) {
|
186 |
return;
|
@@ -188,19 +208,23 @@ class Options extends OptionsAbstract {
|
|
188 |
|
189 |
if (
|
190 |
! isset( $_GET['gmail_remove_nonce'] ) ||
|
191 |
-
! wp_verify_nonce( $_GET['gmail_remove_nonce'], 'gmail_remove' )
|
192 |
) {
|
193 |
return;
|
194 |
}
|
195 |
|
196 |
$options = new \WPMailSMTP\Options();
|
|
|
|
|
|
|
|
|
|
|
197 |
$old_opt = $options->get_all();
|
198 |
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
}
|
204 |
}
|
205 |
}
|
206 |
|
12 |
class Options extends OptionsAbstract {
|
13 |
|
14 |
/**
|
15 |
+
* Mailer slug.
|
16 |
+
*
|
17 |
+
* @since 1.5.0
|
18 |
+
*/
|
19 |
+
const SLUG = 'gmail';
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Gmail Options constructor.
|
23 |
*
|
24 |
* @since 1.0.0
|
25 |
*/
|
27 |
|
28 |
parent::__construct(
|
29 |
array(
|
30 |
+
'logo_url' => wp_mail_smtp()->assets_url . '/images/google.svg',
|
31 |
+
'slug' => self::SLUG,
|
32 |
'title' => esc_html__( 'Gmail', 'wp-mail-smtp' ),
|
33 |
'description' => sprintf(
|
34 |
wp_kses(
|
86 |
<label for="wp-mail-smtp-setting-<?php echo esc_attr( $this->get_slug() ); ?>-client_secret"><?php esc_html_e( 'Client Secret', 'wp-mail-smtp' ); ?></label>
|
87 |
</div>
|
88 |
<div class="wp-mail-smtp-setting-field">
|
89 |
+
<?php if ( $this->options->is_const_defined( $this->get_slug(), 'client_secret' ) ) : ?>
|
90 |
+
<input type="text" disabled value="****************************************"
|
91 |
+
id="wp-mail-smtp-setting-<?php echo esc_attr( $this->get_slug() ); ?>-client_secret"
|
92 |
+
/>
|
93 |
+
<?php $this->display_const_set_message( 'WPMS_GMAIL_CLIENT_SECRET' ); ?>
|
94 |
+
<?php else : ?>
|
95 |
+
<input type="text" spellcheck="false"
|
96 |
+
name="wp-mail-smtp[<?php echo esc_attr( $this->get_slug() ); ?>][client_secret]"
|
97 |
+
value="<?php echo esc_attr( $this->options->get( $this->get_slug(), 'client_secret' ) ); ?>"
|
98 |
+
id="wp-mail-smtp-setting-<?php echo esc_attr( $this->get_slug() ); ?>-client_secret"
|
99 |
+
/>
|
100 |
+
<?php endif; ?>
|
101 |
</div>
|
102 |
</div>
|
103 |
|
118 |
<span class="dashicons dashicons-admin-page"></span>
|
119 |
</button>
|
120 |
<p class="desc">
|
121 |
+
<?php esc_html_e( 'Please copy this URL into the "Authorized redirect URIs" field of your Google web application.', 'wp-mail-smtp' ); ?>
|
|
|
|
|
122 |
</p>
|
123 |
</div>
|
124 |
</div>
|
145 |
protected function display_auth_setting_action() {
|
146 |
|
147 |
// Do the processing on the fly, as having ajax here is too complicated.
|
148 |
+
$this->process_provider_remove();
|
149 |
|
150 |
$auth = new Auth();
|
151 |
?>
|
152 |
|
|
|
|
|
|
|
|
|
|
|
153 |
<?php if ( $auth->is_clients_saved() ) : ?>
|
154 |
|
155 |
<?php if ( $auth->is_auth_required() ) : ?>
|
156 |
|
157 |
+
<a href="<?php echo esc_url( $auth->get_auth_url() ); ?>" class="wp-mail-smtp-btn wp-mail-smtp-btn-md wp-mail-smtp-btn-orange">
|
158 |
<?php esc_html_e( 'Allow plugin to send emails using your Google account', 'wp-mail-smtp' ); ?>
|
159 |
</a>
|
160 |
<p class="desc">
|
163 |
|
164 |
<?php else : ?>
|
165 |
|
166 |
+
<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-<?php echo esc_attr( $this->get_slug() ); ?>-authorize" class="wp-mail-smtp-btn wp-mail-smtp-btn-md wp-mail-smtp-btn-red js-wp-mail-smtp-provider-remove">
|
167 |
<?php esc_html_e( 'Remove Connection', 'wp-mail-smtp' ); ?>
|
168 |
</a>
|
169 |
+
<span class="connected-as">
|
170 |
+
<?php
|
171 |
+
$user = $auth->get_user_info();
|
172 |
+
|
173 |
+
if ( ! empty( $user['email'] ) ) {
|
174 |
+
printf(
|
175 |
+
/* translators: %s - email address, as received from Google API. */
|
176 |
+
esc_html__( 'Connected as %s', 'wp-mail-smtp' ),
|
177 |
+
'<code>' . esc_html( $user['email'] ) . '</code>'
|
178 |
+
);
|
179 |
+
}
|
180 |
+
?>
|
181 |
+
</span>
|
182 |
<p class="desc">
|
183 |
<?php esc_html_e( 'Removing the connection will give you an ability to redo the connection or link to another Google account.', 'wp-mail-smtp' ); ?>
|
184 |
</p>
|
187 |
|
188 |
<?php else : ?>
|
189 |
|
190 |
+
<p class="inline-error">
|
191 |
+
<?php esc_html_e( 'You need to save settings with Client ID and Client Secret before you can proceed.', 'wp-mail-smtp' ); ?>
|
192 |
</p>
|
193 |
|
194 |
<?php
|
196 |
}
|
197 |
|
198 |
/**
|
199 |
+
* Remove Provider connection.
|
200 |
*
|
201 |
* @since 1.3.0
|
202 |
*/
|
203 |
+
public function process_provider_remove() {
|
204 |
|
205 |
if ( ! is_super_admin() ) {
|
206 |
return;
|
208 |
|
209 |
if (
|
210 |
! isset( $_GET['gmail_remove_nonce'] ) ||
|
211 |
+
! wp_verify_nonce( $_GET['gmail_remove_nonce'], 'gmail_remove' ) // phpcs:ignore
|
212 |
) {
|
213 |
return;
|
214 |
}
|
215 |
|
216 |
$options = new \WPMailSMTP\Options();
|
217 |
+
|
218 |
+
if ( $options->get( 'mail', 'mailer' ) !== $this->get_slug() ) {
|
219 |
+
return;
|
220 |
+
}
|
221 |
+
|
222 |
$old_opt = $options->get_all();
|
223 |
|
224 |
+
foreach ( $old_opt[ $this->get_slug() ] as $key => $value ) {
|
225 |
+
// Unset everything except Client ID and Secret.
|
226 |
+
if ( ! in_array( $key, array( 'client_id', 'client_secret' ), true ) ) {
|
227 |
+
unset( $old_opt[ $this->get_slug() ][ $key ] );
|
|
|
228 |
}
|
229 |
}
|
230 |
|
src/Providers/Loader.php
CHANGED
@@ -16,6 +16,8 @@ class Loader {
|
|
16 |
/**
|
17 |
* Key is the mailer option, value is the path to its classes.
|
18 |
*
|
|
|
|
|
19 |
* @var array
|
20 |
*/
|
21 |
protected $providers = array(
|
@@ -28,7 +30,9 @@ class Loader {
|
|
28 |
);
|
29 |
|
30 |
/**
|
31 |
-
* @
|
|
|
|
|
32 |
*/
|
33 |
private $phpmailer;
|
34 |
|
@@ -58,11 +62,14 @@ class Loader {
|
|
58 |
* @return array
|
59 |
*/
|
60 |
public function get_provider_path( $provider ) {
|
|
|
61 |
$provider = sanitize_key( $provider );
|
62 |
|
|
|
|
|
63 |
return apply_filters(
|
64 |
'wp_mail_smtp_providers_loader_get_provider_path',
|
65 |
-
isset( $
|
66 |
$provider
|
67 |
);
|
68 |
}
|
@@ -71,13 +78,21 @@ class Loader {
|
|
71 |
* Get the provider options, if exists.
|
72 |
*
|
73 |
* @since 1.0.0
|
|
|
74 |
*
|
75 |
* @param string $provider
|
76 |
*
|
77 |
-
* @return
|
78 |
*/
|
79 |
public function get_options( $provider ) {
|
80 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
}
|
82 |
|
83 |
/**
|
@@ -85,9 +100,10 @@ class Loader {
|
|
85 |
*
|
86 |
* @since 1.0.0
|
87 |
*
|
88 |
-
* @return
|
89 |
*/
|
90 |
public function get_options_all() {
|
|
|
91 |
$options = array();
|
92 |
|
93 |
foreach ( $this->get_providers() as $provider => $path ) {
|
@@ -115,14 +131,17 @@ class Loader {
|
|
115 |
* Get the provider mailer, if exists.
|
116 |
*
|
117 |
* @since 1.0.0
|
|
|
118 |
*
|
119 |
-
* @param string
|
120 |
* @param MailCatcher $phpmailer
|
121 |
*
|
122 |
-
* @return
|
123 |
*/
|
124 |
public function get_mailer( $provider, $phpmailer ) {
|
125 |
|
|
|
|
|
126 |
if (
|
127 |
$phpmailer instanceof MailCatcher ||
|
128 |
$phpmailer instanceof \PHPMailer
|
@@ -130,7 +149,11 @@ class Loader {
|
|
130 |
$this->phpmailer = $phpmailer;
|
131 |
}
|
132 |
|
133 |
-
|
|
|
|
|
|
|
|
|
134 |
}
|
135 |
|
136 |
/**
|
@@ -138,23 +161,24 @@ class Loader {
|
|
138 |
*
|
139 |
* @param string $provider
|
140 |
*
|
141 |
-
* @return
|
142 |
*/
|
143 |
public function get_auth( $provider ) {
|
|
|
144 |
return $this->get_entity( $provider, 'Auth' );
|
145 |
}
|
146 |
|
147 |
/**
|
148 |
* Get a generic entity based on the request.
|
149 |
*
|
150 |
-
* @uses
|
151 |
*
|
152 |
* @since 1.0.0
|
153 |
*
|
154 |
* @param string $provider
|
155 |
* @param string $request
|
156 |
*
|
157 |
-
* @return null
|
158 |
*/
|
159 |
protected function get_entity( $provider, $request ) {
|
160 |
|
@@ -178,7 +202,8 @@ class Loader {
|
|
178 |
$entity = new $class();
|
179 |
}
|
180 |
}
|
181 |
-
}
|
|
|
182 |
Debug::set( "There was a problem while retrieving {$request} for {$provider}: {$e->getMessage()}" );
|
183 |
$entity = null;
|
184 |
}
|
16 |
/**
|
17 |
* Key is the mailer option, value is the path to its classes.
|
18 |
*
|
19 |
+
* @since 1.0.0
|
20 |
+
*
|
21 |
* @var array
|
22 |
*/
|
23 |
protected $providers = array(
|
30 |
);
|
31 |
|
32 |
/**
|
33 |
+
* @since 1.0.0
|
34 |
+
*
|
35 |
+
* @var MailCatcher
|
36 |
*/
|
37 |
private $phpmailer;
|
38 |
|
62 |
* @return array
|
63 |
*/
|
64 |
public function get_provider_path( $provider ) {
|
65 |
+
|
66 |
$provider = sanitize_key( $provider );
|
67 |
|
68 |
+
$providers = $this->get_providers();
|
69 |
+
|
70 |
return apply_filters(
|
71 |
'wp_mail_smtp_providers_loader_get_provider_path',
|
72 |
+
isset( $providers[ $provider ] ) ? $providers[ $provider ] : null,
|
73 |
$provider
|
74 |
);
|
75 |
}
|
78 |
* Get the provider options, if exists.
|
79 |
*
|
80 |
* @since 1.0.0
|
81 |
+
* @since 1.5.0 Init the Option class for a provider only once and store it for future reuse.
|
82 |
*
|
83 |
* @param string $provider
|
84 |
*
|
85 |
+
* @return OptionsAbstract|null
|
86 |
*/
|
87 |
public function get_options( $provider ) {
|
88 |
+
|
89 |
+
static $options = array();
|
90 |
+
|
91 |
+
if ( empty( $options[ $provider ] ) ) {
|
92 |
+
$options[ $provider ] = $this->get_entity( $provider, 'Options' );
|
93 |
+
}
|
94 |
+
|
95 |
+
return $options[ $provider ];
|
96 |
}
|
97 |
|
98 |
/**
|
100 |
*
|
101 |
* @since 1.0.0
|
102 |
*
|
103 |
+
* @return OptionsAbstract[]
|
104 |
*/
|
105 |
public function get_options_all() {
|
106 |
+
|
107 |
$options = array();
|
108 |
|
109 |
foreach ( $this->get_providers() as $provider => $path ) {
|
131 |
* Get the provider mailer, if exists.
|
132 |
*
|
133 |
* @since 1.0.0
|
134 |
+
* @since 1.5.0 Init the Mailer class for a provider only once and store it for future reuse.
|
135 |
*
|
136 |
+
* @param string $provider
|
137 |
* @param MailCatcher $phpmailer
|
138 |
*
|
139 |
+
* @return MailerAbstract|null
|
140 |
*/
|
141 |
public function get_mailer( $provider, $phpmailer ) {
|
142 |
|
143 |
+
static $providers = array();
|
144 |
+
|
145 |
if (
|
146 |
$phpmailer instanceof MailCatcher ||
|
147 |
$phpmailer instanceof \PHPMailer
|
149 |
$this->phpmailer = $phpmailer;
|
150 |
}
|
151 |
|
152 |
+
if ( empty( $providers[ $provider ] ) ) {
|
153 |
+
$providers[ $provider ] = $this->get_entity( $provider, 'Mailer' );
|
154 |
+
}
|
155 |
+
|
156 |
+
return $providers[ $provider ];
|
157 |
}
|
158 |
|
159 |
/**
|
161 |
*
|
162 |
* @param string $provider
|
163 |
*
|
164 |
+
* @return AuthAbstract|null
|
165 |
*/
|
166 |
public function get_auth( $provider ) {
|
167 |
+
|
168 |
return $this->get_entity( $provider, 'Auth' );
|
169 |
}
|
170 |
|
171 |
/**
|
172 |
* Get a generic entity based on the request.
|
173 |
*
|
174 |
+
* @uses \ReflectionClass
|
175 |
*
|
176 |
* @since 1.0.0
|
177 |
*
|
178 |
* @param string $provider
|
179 |
* @param string $request
|
180 |
*
|
181 |
+
* @return OptionsAbstract|MailerAbstract|AuthAbstract|null
|
182 |
*/
|
183 |
protected function get_entity( $provider, $request ) {
|
184 |
|
202 |
$entity = new $class();
|
203 |
}
|
204 |
}
|
205 |
+
}
|
206 |
+
catch ( \Exception $e ) {
|
207 |
Debug::set( "There was a problem while retrieving {$request} for {$provider}: {$e->getMessage()}" );
|
208 |
$entity = null;
|
209 |
}
|
src/Providers/Mail/Options.php
CHANGED
@@ -20,7 +20,7 @@ class Options extends OptionsAbstract {
|
|
20 |
|
21 |
parent::__construct(
|
22 |
array(
|
23 |
-
'logo_url' => wp_mail_smtp()->plugin_url . '/assets/images/php.
|
24 |
'slug' => 'mail',
|
25 |
'title' => esc_html__( 'Default (none)', 'wp-mail-smtp' ),
|
26 |
)
|
20 |
|
21 |
parent::__construct(
|
22 |
array(
|
23 |
+
'logo_url' => wp_mail_smtp()->plugin_url . '/assets/images/php.svg',
|
24 |
'slug' => 'mail',
|
25 |
'title' => esc_html__( 'Default (none)', 'wp-mail-smtp' ),
|
26 |
)
|
src/Providers/MailerAbstract.php
CHANGED
@@ -2,9 +2,11 @@
|
|
2 |
|
3 |
namespace WPMailSMTP\Providers;
|
4 |
|
|
|
5 |
use WPMailSMTP\Debug;
|
6 |
use WPMailSMTP\MailCatcher;
|
7 |
use WPMailSMTP\Options;
|
|
|
8 |
|
9 |
/**
|
10 |
* Class MailerAbstract.
|
@@ -16,18 +18,26 @@ abstract class MailerAbstract implements MailerInterface {
|
|
16 |
/**
|
17 |
* Which response code from HTTP provider is considered to be successful?
|
18 |
*
|
|
|
|
|
19 |
* @var int
|
20 |
*/
|
21 |
protected $email_sent_code = 200;
|
22 |
/**
|
|
|
|
|
23 |
* @var Options
|
24 |
*/
|
25 |
protected $options;
|
26 |
/**
|
|
|
|
|
27 |
* @var MailCatcher
|
28 |
*/
|
29 |
protected $phpmailer;
|
30 |
/**
|
|
|
|
|
31 |
* @var string
|
32 |
*/
|
33 |
protected $mailer = '';
|
@@ -35,18 +45,26 @@ abstract class MailerAbstract implements MailerInterface {
|
|
35 |
/**
|
36 |
* URL to make an API request to.
|
37 |
*
|
|
|
|
|
38 |
* @var string
|
39 |
*/
|
40 |
protected $url = '';
|
41 |
/**
|
|
|
|
|
42 |
* @var array
|
43 |
*/
|
44 |
protected $headers = array();
|
45 |
/**
|
|
|
|
|
46 |
* @var array
|
47 |
*/
|
48 |
protected $body = array();
|
49 |
/**
|
|
|
|
|
50 |
* @var mixed
|
51 |
*/
|
52 |
protected $response = array();
|
@@ -63,7 +81,7 @@ abstract class MailerAbstract implements MailerInterface {
|
|
63 |
$this->options = new Options();
|
64 |
$this->mailer = $this->options->get( 'mail', 'mailer' );
|
65 |
|
66 |
-
// Only non-SMTP mailers need URL.
|
67 |
if ( ! $this->options->is_mailer_smtp() && empty( $this->url ) ) {
|
68 |
return;
|
69 |
}
|
@@ -141,13 +159,14 @@ abstract class MailerAbstract implements MailerInterface {
|
|
141 |
/**
|
142 |
* Set the request params, that goes to the body of the HTTP request.
|
143 |
*
|
144 |
-
* @since
|
145 |
*
|
146 |
* @param array $param Key=>value of what should be sent to a 3rd party API.
|
147 |
*
|
148 |
* @internal param array $params
|
149 |
*/
|
150 |
protected function set_body_param( $param ) {
|
|
|
151 |
$this->body = Options::array_merge_recursive( $this->body, $param );
|
152 |
}
|
153 |
|
@@ -173,51 +192,25 @@ abstract class MailerAbstract implements MailerInterface {
|
|
173 |
*/
|
174 |
public function set_header( $name, $value ) {
|
175 |
|
176 |
-
$process_value = function ( $value ) {
|
177 |
-
// Remove HTML tags.
|
178 |
-
$filtered = wp_strip_all_tags( $value, false );
|
179 |
-
// Remove multi-lines/tabs.
|
180 |
-
$filtered = preg_replace( '/[\r\n\t ]+/', ' ', $filtered );
|
181 |
-
// Remove whitespaces.
|
182 |
-
$filtered = trim( $filtered );
|
183 |
-
|
184 |
-
// Remove octets.
|
185 |
-
$found = false;
|
186 |
-
while ( preg_match( '/%[a-f0-9]{2}/i', $filtered, $match ) ) {
|
187 |
-
$filtered = str_replace( $match[0], '', $filtered );
|
188 |
-
$found = true;
|
189 |
-
}
|
190 |
-
|
191 |
-
if ( $found ) {
|
192 |
-
// Strip out the whitespace that may now exist after removing the octets.
|
193 |
-
$filtered = trim( preg_replace( '/ +/', ' ', $filtered ) );
|
194 |
-
}
|
195 |
-
|
196 |
-
return $filtered;
|
197 |
-
};
|
198 |
-
|
199 |
$name = sanitize_text_field( $name );
|
200 |
-
if ( empty( $name ) ) {
|
201 |
-
return;
|
202 |
-
}
|
203 |
-
|
204 |
-
$value = $process_value( $value );
|
205 |
|
206 |
-
$this->headers[ $name ] = $value;
|
207 |
}
|
208 |
|
209 |
/**
|
210 |
* @inheritdoc
|
211 |
*/
|
212 |
public function get_body() {
|
213 |
-
|
|
|
214 |
}
|
215 |
|
216 |
/**
|
217 |
* @inheritdoc
|
218 |
*/
|
219 |
public function get_headers() {
|
220 |
-
|
|
|
221 |
}
|
222 |
|
223 |
/**
|
@@ -244,7 +237,7 @@ abstract class MailerAbstract implements MailerInterface {
|
|
244 |
*
|
245 |
* @since 1.0.0
|
246 |
*
|
247 |
-
* @param
|
248 |
*/
|
249 |
protected function process_response( $response ) {
|
250 |
|
@@ -258,7 +251,7 @@ abstract class MailerAbstract implements MailerInterface {
|
|
258 |
return;
|
259 |
}
|
260 |
|
261 |
-
if ( isset( $response['body'] ) &&
|
262 |
$response['body'] = \json_decode( $response['body'] );
|
263 |
}
|
264 |
|
@@ -280,7 +273,8 @@ abstract class MailerAbstract implements MailerInterface {
|
|
280 |
'timeout' => 15,
|
281 |
'httpversion' => '1.1',
|
282 |
'blocking' => true,
|
283 |
-
)
|
|
|
284 |
);
|
285 |
}
|
286 |
|
@@ -298,10 +292,14 @@ abstract class MailerAbstract implements MailerInterface {
|
|
298 |
|
299 |
if ( ! empty( $error ) ) {
|
300 |
// Add mailer to the beginning and save to display later.
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
)
|
|
|
|
|
|
|
|
|
305 |
}
|
306 |
}
|
307 |
|
@@ -310,7 +308,7 @@ abstract class MailerAbstract implements MailerInterface {
|
|
310 |
Debug::clear();
|
311 |
}
|
312 |
|
313 |
-
return apply_filters( 'wp_mail_smtp_providers_mailer_is_email_sent', $is_sent );
|
314 |
}
|
315 |
|
316 |
/**
|
@@ -321,6 +319,7 @@ abstract class MailerAbstract implements MailerInterface {
|
|
321 |
* @return string
|
322 |
*/
|
323 |
protected function get_response_error() {
|
|
|
324 |
return '';
|
325 |
}
|
326 |
|
@@ -334,19 +333,6 @@ abstract class MailerAbstract implements MailerInterface {
|
|
334 |
return version_compare( phpversion(), $options->get_php_version(), '>=' );
|
335 |
}
|
336 |
|
337 |
-
/**
|
338 |
-
* Check whether the string is a JSON or not.
|
339 |
-
*
|
340 |
-
* @since 1.0.0
|
341 |
-
*
|
342 |
-
* @param string $string
|
343 |
-
*
|
344 |
-
* @return bool
|
345 |
-
*/
|
346 |
-
protected function is_json( $string ) {
|
347 |
-
return is_string( $string ) && is_array( json_decode( $string, true ) ) && ( json_last_error() === JSON_ERROR_NONE ) ? true : false;
|
348 |
-
}
|
349 |
-
|
350 |
/**
|
351 |
* This method is relevant to SMTP and Pepipost.
|
352 |
* All other custom mailers should override it with own information.
|
@@ -356,12 +342,14 @@ abstract class MailerAbstract implements MailerInterface {
|
|
356 |
* @return string
|
357 |
*/
|
358 |
public function get_debug_info() {
|
|
|
359 |
global $phpmailer;
|
360 |
|
361 |
$smtp_text = array();
|
362 |
|
363 |
// Mail mailer has nothing to return.
|
364 |
if ( $this->options->is_mailer_smtp() ) {
|
|
|
365 |
$smtp_text[] = '<strong>ErrorInfo:</strong> ' . make_clickable( wp_strip_all_tags( $phpmailer->ErrorInfo ) );
|
366 |
$smtp_text[] = '<strong>Host:</strong> ' . $phpmailer->Host;
|
367 |
$smtp_text[] = '<strong>Port:</strong> ' . $phpmailer->Port;
|
@@ -369,8 +357,9 @@ abstract class MailerAbstract implements MailerInterface {
|
|
369 |
$smtp_text[] = '<strong>SMTPAutoTLS:</strong> ' . Debug::pvar( $phpmailer->SMTPAutoTLS );
|
370 |
$smtp_text[] = '<strong>SMTPAuth:</strong> ' . Debug::pvar( $phpmailer->SMTPAuth );
|
371 |
if ( ! empty( $phpmailer->SMTPOptions ) ) {
|
372 |
-
$smtp_text[] = '<strong>SMTPOptions:</strong> <code>' .
|
373 |
}
|
|
|
374 |
}
|
375 |
|
376 |
$smtp_text[] = '<br><strong>Server:</strong>';
|
2 |
|
3 |
namespace WPMailSMTP\Providers;
|
4 |
|
5 |
+
use WPMailSMTP\Conflicts;
|
6 |
use WPMailSMTP\Debug;
|
7 |
use WPMailSMTP\MailCatcher;
|
8 |
use WPMailSMTP\Options;
|
9 |
+
use WPMailSMTP\WP;
|
10 |
|
11 |
/**
|
12 |
* Class MailerAbstract.
|
18 |
/**
|
19 |
* Which response code from HTTP provider is considered to be successful?
|
20 |
*
|
21 |
+
* @since 1.0.0
|
22 |
+
*
|
23 |
* @var int
|
24 |
*/
|
25 |
protected $email_sent_code = 200;
|
26 |
/**
|
27 |
+
* @since 1.0.0
|
28 |
+
*
|
29 |
* @var Options
|
30 |
*/
|
31 |
protected $options;
|
32 |
/**
|
33 |
+
* @since 1.0.0
|
34 |
+
*
|
35 |
* @var MailCatcher
|
36 |
*/
|
37 |
protected $phpmailer;
|
38 |
/**
|
39 |
+
* @since 1.0.0
|
40 |
+
*
|
41 |
* @var string
|
42 |
*/
|
43 |
protected $mailer = '';
|
45 |
/**
|
46 |
* URL to make an API request to.
|
47 |
*
|
48 |
+
* @since 1.0.0
|
49 |
+
*
|
50 |
* @var string
|
51 |
*/
|
52 |
protected $url = '';
|
53 |
/**
|
54 |
+
* @since 1.0.0
|
55 |
+
*
|
56 |
* @var array
|
57 |
*/
|
58 |
protected $headers = array();
|
59 |
/**
|
60 |
+
* @since 1.0.0
|
61 |
+
*
|
62 |
* @var array
|
63 |
*/
|
64 |
protected $body = array();
|
65 |
/**
|
66 |
+
* @since 1.0.0
|
67 |
+
*
|
68 |
* @var mixed
|
69 |
*/
|
70 |
protected $response = array();
|
81 |
$this->options = new Options();
|
82 |
$this->mailer = $this->options->get( 'mail', 'mailer' );
|
83 |
|
84 |
+
// Only non-SMTP mailers need URL and extra processing for PHPMailer class.
|
85 |
if ( ! $this->options->is_mailer_smtp() && empty( $this->url ) ) {
|
86 |
return;
|
87 |
}
|
159 |
/**
|
160 |
* Set the request params, that goes to the body of the HTTP request.
|
161 |
*
|
162 |
+
* @since 1.0.0
|
163 |
*
|
164 |
* @param array $param Key=>value of what should be sent to a 3rd party API.
|
165 |
*
|
166 |
* @internal param array $params
|
167 |
*/
|
168 |
protected function set_body_param( $param ) {
|
169 |
+
|
170 |
$this->body = Options::array_merge_recursive( $this->body, $param );
|
171 |
}
|
172 |
|
192 |
*/
|
193 |
public function set_header( $name, $value ) {
|
194 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
195 |
$name = sanitize_text_field( $name );
|
|
|
|
|
|
|
|
|
|
|
196 |
|
197 |
+
$this->headers[ $name ] = WP::sanitize_value( $value );
|
198 |
}
|
199 |
|
200 |
/**
|
201 |
* @inheritdoc
|
202 |
*/
|
203 |
public function get_body() {
|
204 |
+
|
205 |
+
return apply_filters( 'wp_mail_smtp_providers_mailer_get_body', $this->body, $this->mailer );
|
206 |
}
|
207 |
|
208 |
/**
|
209 |
* @inheritdoc
|
210 |
*/
|
211 |
public function get_headers() {
|
212 |
+
|
213 |
+
return apply_filters( 'wp_mail_smtp_providers_mailer_get_headers', $this->headers, $this->mailer );
|
214 |
}
|
215 |
|
216 |
/**
|
237 |
*
|
238 |
* @since 1.0.0
|
239 |
*
|
240 |
+
* @param mixed $response
|
241 |
*/
|
242 |
protected function process_response( $response ) {
|
243 |
|
251 |
return;
|
252 |
}
|
253 |
|
254 |
+
if ( isset( $response['body'] ) && WP::is_json( $response['body'] ) ) {
|
255 |
$response['body'] = \json_decode( $response['body'] );
|
256 |
}
|
257 |
|
273 |
'timeout' => 15,
|
274 |
'httpversion' => '1.1',
|
275 |
'blocking' => true,
|
276 |
+
),
|
277 |
+
$this->mailer
|
278 |
);
|
279 |
}
|
280 |
|
292 |
|
293 |
if ( ! empty( $error ) ) {
|
294 |
// Add mailer to the beginning and save to display later.
|
295 |
+
$message = 'Mailer: ' . esc_html( wp_mail_smtp()->get_providers()->get_options( $this->mailer )->get_title() ) . "\r\n";
|
296 |
+
|
297 |
+
$conflicts = new Conflicts();
|
298 |
+
if ( $conflicts->is_detected() ) {
|
299 |
+
$message .= 'Conflicts: ' . esc_html( $conflicts->get_conflict_name() ) . "\r\n";
|
300 |
+
}
|
301 |
+
|
302 |
+
Debug::set( $message . $error );
|
303 |
}
|
304 |
}
|
305 |
|
308 |
Debug::clear();
|
309 |
}
|
310 |
|
311 |
+
return apply_filters( 'wp_mail_smtp_providers_mailer_is_email_sent', $is_sent, $this->mailer );
|
312 |
}
|
313 |
|
314 |
/**
|
319 |
* @return string
|
320 |
*/
|
321 |
protected function get_response_error() {
|
322 |
+
|
323 |
return '';
|
324 |
}
|
325 |
|
333 |
return version_compare( phpversion(), $options->get_php_version(), '>=' );
|
334 |
}
|
335 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
336 |
/**
|
337 |
* This method is relevant to SMTP and Pepipost.
|
338 |
* All other custom mailers should override it with own information.
|
342 |
* @return string
|
343 |
*/
|
344 |
public function get_debug_info() {
|
345 |
+
|
346 |
global $phpmailer;
|
347 |
|
348 |
$smtp_text = array();
|
349 |
|
350 |
// Mail mailer has nothing to return.
|
351 |
if ( $this->options->is_mailer_smtp() ) {
|
352 |
+
// phpcs:disable
|
353 |
$smtp_text[] = '<strong>ErrorInfo:</strong> ' . make_clickable( wp_strip_all_tags( $phpmailer->ErrorInfo ) );
|
354 |
$smtp_text[] = '<strong>Host:</strong> ' . $phpmailer->Host;
|
355 |
$smtp_text[] = '<strong>Port:</strong> ' . $phpmailer->Port;
|
357 |
$smtp_text[] = '<strong>SMTPAutoTLS:</strong> ' . Debug::pvar( $phpmailer->SMTPAutoTLS );
|
358 |
$smtp_text[] = '<strong>SMTPAuth:</strong> ' . Debug::pvar( $phpmailer->SMTPAuth );
|
359 |
if ( ! empty( $phpmailer->SMTPOptions ) ) {
|
360 |
+
$smtp_text[] = '<strong>SMTPOptions:</strong> <code>' . wp_json_encode( $phpmailer->SMTPOptions ) . '</code>';
|
361 |
}
|
362 |
+
// phpcs:enable
|
363 |
}
|
364 |
|
365 |
$smtp_text[] = '<br><strong>Server:</strong>';
|
src/Providers/Mailgun/Mailer.php
CHANGED
@@ -3,6 +3,7 @@
|
|
3 |
namespace WPMailSMTP\Providers\Mailgun;
|
4 |
|
5 |
use WPMailSMTP\Providers\MailerAbstract;
|
|
|
6 |
|
7 |
/**
|
8 |
* Class Mailer.
|
@@ -184,6 +185,42 @@ class Mailer extends MailerAbstract {
|
|
184 |
}
|
185 |
}
|
186 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
187 |
/**
|
188 |
* It's the last one, so we can modify the whole body.
|
189 |
*
|
@@ -211,7 +248,8 @@ class Mailer extends MailerAbstract {
|
|
211 |
if ( is_file( $attachment[0] ) && is_readable( $attachment[0] ) ) {
|
212 |
$file = file_get_contents( $attachment[0] );
|
213 |
}
|
214 |
-
}
|
|
|
215 |
$file = false;
|
216 |
}
|
217 |
|
3 |
namespace WPMailSMTP\Providers\Mailgun;
|
4 |
|
5 |
use WPMailSMTP\Providers\MailerAbstract;
|
6 |
+
use WPMailSMTP\WP;
|
7 |
|
8 |
/**
|
9 |
* Class Mailer.
|
185 |
}
|
186 |
}
|
187 |
|
188 |
+
/**
|
189 |
+
* Redefine the way custom headers are process for this mailer - they should be in body.
|
190 |
+
*
|
191 |
+
* @since 1.5.0
|
192 |
+
*
|
193 |
+
* @param array $headers
|
194 |
+
*/
|
195 |
+
public function set_headers( $headers ) {
|
196 |
+
|
197 |
+
foreach ( $headers as $header ) {
|
198 |
+
$name = isset( $header[0] ) ? $header[0] : false;
|
199 |
+
$value = isset( $header[1] ) ? $header[1] : false;
|
200 |
+
|
201 |
+
$this->set_body_header( $name, $value );
|
202 |
+
}
|
203 |
+
|
204 |
+
// Add custom PHPMailer-specific header.
|
205 |
+
$this->set_body_header( 'X-Mailer', 'WPMailSMTP/Mailer/' . $this->mailer . ' ' . WPMS_PLUGIN_VER );
|
206 |
+
}
|
207 |
+
|
208 |
+
/**
|
209 |
+
* This mailer supports email-related custom headers inside a body of the message with a special prefix "h:".
|
210 |
+
*
|
211 |
+
* @since 1.5.0
|
212 |
+
*/
|
213 |
+
public function set_body_header( $name, $value ) {
|
214 |
+
|
215 |
+
$name = sanitize_text_field( $name );
|
216 |
+
|
217 |
+
$this->set_body_param(
|
218 |
+
array(
|
219 |
+
'h:' . $name => WP::sanitize_value( $value ),
|
220 |
+
)
|
221 |
+
);
|
222 |
+
}
|
223 |
+
|
224 |
/**
|
225 |
* It's the last one, so we can modify the whole body.
|
226 |
*
|
248 |
if ( is_file( $attachment[0] ) && is_readable( $attachment[0] ) ) {
|
249 |
$file = file_get_contents( $attachment[0] );
|
250 |
}
|
251 |
+
}
|
252 |
+
catch ( \Exception $e ) {
|
253 |
$file = false;
|
254 |
}
|
255 |
|
src/Providers/Mailgun/Options.php
CHANGED
@@ -20,7 +20,7 @@ class Options extends OptionsAbstract {
|
|
20 |
|
21 |
parent::__construct(
|
22 |
array(
|
23 |
-
'logo_url' => wp_mail_smtp()->plugin_url . '/assets/images/mailgun.
|
24 |
'slug' => 'mailgun',
|
25 |
'title' => esc_html__( 'Mailgun', 'wp-mail-smtp' ),
|
26 |
'description' => sprintf(
|
@@ -57,11 +57,18 @@ class Options extends OptionsAbstract {
|
|
57 |
<label for="wp-mail-smtp-setting-<?php echo esc_attr( $this->get_slug() ); ?>-api_key"><?php esc_html_e( 'Private API Key', 'wp-mail-smtp' ); ?></label>
|
58 |
</div>
|
59 |
<div class="wp-mail-smtp-setting-field">
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
<p class="desc">
|
66 |
<?php
|
67 |
printf(
|
20 |
|
21 |
parent::__construct(
|
22 |
array(
|
23 |
+
'logo_url' => wp_mail_smtp()->plugin_url . '/assets/images/mailgun.svg',
|
24 |
'slug' => 'mailgun',
|
25 |
'title' => esc_html__( 'Mailgun', 'wp-mail-smtp' ),
|
26 |
'description' => sprintf(
|
57 |
<label for="wp-mail-smtp-setting-<?php echo esc_attr( $this->get_slug() ); ?>-api_key"><?php esc_html_e( 'Private API Key', 'wp-mail-smtp' ); ?></label>
|
58 |
</div>
|
59 |
<div class="wp-mail-smtp-setting-field">
|
60 |
+
<?php if ( $this->options->is_const_defined( $this->get_slug(), 'api_key' ) ) : ?>
|
61 |
+
<input type="text" disabled value="****************************************"
|
62 |
+
id="wp-mail-smtp-setting-<?php echo esc_attr( $this->get_slug() ); ?>-api_key"
|
63 |
+
/>
|
64 |
+
<?php $this->display_const_set_message( 'WPMS_MAILGUN_API_KEY' ); ?>
|
65 |
+
<?php else : ?>
|
66 |
+
<input type="text" spellcheck="false"
|
67 |
+
name="wp-mail-smtp[<?php echo esc_attr( $this->get_slug() ); ?>][api_key]"
|
68 |
+
value="<?php echo esc_attr( $this->options->get( $this->get_slug(), 'api_key' ) ); ?>"
|
69 |
+
id="wp-mail-smtp-setting-<?php echo esc_attr( $this->get_slug() ); ?>-api_key"
|
70 |
+
/>
|
71 |
+
<?php endif; ?>
|
72 |
<p class="desc">
|
73 |
<?php
|
74 |
printf(
|
src/Providers/OptionsAbstract.php
CHANGED
@@ -251,16 +251,45 @@ abstract class OptionsAbstract implements OptionsInterface {
|
|
251 |
<div class="wp-mail-smtp-setting-field">
|
252 |
<?php if ( $this->options->is_const_defined( $this->get_slug(), 'pass' ) ) : ?>
|
253 |
<input type="text" value="*************" disabled id="wp-mail-smtp-setting-<?php echo esc_attr( $this->get_slug() ); ?>-pass"/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
254 |
<?php else : ?>
|
255 |
<input name="wp-mail-smtp[<?php echo esc_attr( $this->get_slug() ); ?>][pass]" type="password"
|
256 |
value="<?php echo esc_attr( $this->options->get( $this->get_slug(), 'pass' ) ); ?>"
|
257 |
id="wp-mail-smtp-setting-<?php echo esc_attr( $this->get_slug() ); ?>-pass" spellcheck="false" autocomplete="new-password"
|
258 |
/>
|
259 |
<p class="desc">
|
|
|
|
|
260 |
<?php
|
261 |
printf(
|
262 |
/* translators: %s - wp-config.php. */
|
263 |
-
esc_html__( '
|
264 |
'<code>wp-config.php</code>'
|
265 |
);
|
266 |
?>
|
@@ -280,6 +309,8 @@ abstract class OptionsAbstract implements OptionsInterface {
|
|
280 |
* Check whether we can use this provider based on the PHP version.
|
281 |
* Valid for those, that use SDK.
|
282 |
*
|
|
|
|
|
283 |
* @return bool
|
284 |
*/
|
285 |
public function is_php_correct() {
|
@@ -289,6 +320,8 @@ abstract class OptionsAbstract implements OptionsInterface {
|
|
289 |
/**
|
290 |
* Display a helpful message to those users, that are using an outdated version of PHP,
|
291 |
* which is not supported by the currently selected Provider.
|
|
|
|
|
292 |
*/
|
293 |
protected function display_php_warning() {
|
294 |
?>
|
@@ -298,10 +331,10 @@ abstract class OptionsAbstract implements OptionsInterface {
|
|
298 |
printf(
|
299 |
/* translators: %1$s - Provider name; %2$s - PHP version required by Provider; %3$s - current PHP version. */
|
300 |
esc_html__( '%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.', 'wp-mail-smtp' ),
|
301 |
-
$this->
|
302 |
-
$this->php,
|
303 |
-
phpversion()
|
304 |
-
)
|
305 |
?>
|
306 |
<br>
|
307 |
<?php esc_html_e( 'Meanwhile you can switch to the "Other SMTP" Mailer option.', 'wp-mail-smtp' ); ?>
|
@@ -309,4 +342,51 @@ abstract class OptionsAbstract implements OptionsInterface {
|
|
309 |
|
310 |
<?php
|
311 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
312 |
}
|
251 |
<div class="wp-mail-smtp-setting-field">
|
252 |
<?php if ( $this->options->is_const_defined( $this->get_slug(), 'pass' ) ) : ?>
|
253 |
<input type="text" value="*************" disabled id="wp-mail-smtp-setting-<?php echo esc_attr( $this->get_slug() ); ?>-pass"/>
|
254 |
+
|
255 |
+
<?php $this->display_const_set_message( 'WPMS_SMTP_PASS' ); ?>
|
256 |
+
|
257 |
+
<p class="desc">
|
258 |
+
<?php
|
259 |
+
printf(
|
260 |
+
/* translators: %s - constant name: WPMS_SMTP_PASS. */
|
261 |
+
esc_html__( 'To change the password you need to change the value of the constant there: %s', 'wp-mail-smtp' ),
|
262 |
+
'<code>define( \'WPMS_SMTP_PASS\', \'your_old_password\' );</code>'
|
263 |
+
);
|
264 |
+
?>
|
265 |
+
<br>
|
266 |
+
<?php
|
267 |
+
printf(
|
268 |
+
/* translators: %1$s - wp-config.php file, %2$s - WPMS_ON constant name. */
|
269 |
+
esc_html__( 'If you want to disable the use of constants, find in %1$s file the constant %2$s and turn if off:', 'wp-mail-smtp' ),
|
270 |
+
'<code>wp-config.php</code>',
|
271 |
+
'<code>WPMS_ON</code>'
|
272 |
+
);
|
273 |
+
?>
|
274 |
+
</p>
|
275 |
+
<pre>
|
276 |
+
define( 'WPMS_ON', false );
|
277 |
+
</pre>
|
278 |
+
<p class="desc">
|
279 |
+
<?php esc_html_e( 'All the defined constants will stop working and you will be able to change all the values on this page.', 'wp-mail-smtp' ); ?>
|
280 |
+
</p>
|
281 |
<?php else : ?>
|
282 |
<input name="wp-mail-smtp[<?php echo esc_attr( $this->get_slug() ); ?>][pass]" type="password"
|
283 |
value="<?php echo esc_attr( $this->options->get( $this->get_slug(), 'pass' ) ); ?>"
|
284 |
id="wp-mail-smtp-setting-<?php echo esc_attr( $this->get_slug() ); ?>-pass" spellcheck="false" autocomplete="new-password"
|
285 |
/>
|
286 |
<p class="desc">
|
287 |
+
<?php esc_html_e( 'The password is stored in plain text. We highly recommend you set up your password in your WordPress configuration file for improved security.', 'wp-mail-smtp' ); ?>
|
288 |
+
<br>
|
289 |
<?php
|
290 |
printf(
|
291 |
/* translators: %s - wp-config.php. */
|
292 |
+
esc_html__( 'To do this add the lines below to your %s file:', 'wp-mail-smtp' ),
|
293 |
'<code>wp-config.php</code>'
|
294 |
);
|
295 |
?>
|
309 |
* Check whether we can use this provider based on the PHP version.
|
310 |
* Valid for those, that use SDK.
|
311 |
*
|
312 |
+
* @since 1.0.0
|
313 |
+
*
|
314 |
* @return bool
|
315 |
*/
|
316 |
public function is_php_correct() {
|
320 |
/**
|
321 |
* Display a helpful message to those users, that are using an outdated version of PHP,
|
322 |
* which is not supported by the currently selected Provider.
|
323 |
+
*
|
324 |
+
* @since 1.0.0
|
325 |
*/
|
326 |
protected function display_php_warning() {
|
327 |
?>
|
331 |
printf(
|
332 |
/* translators: %1$s - Provider name; %2$s - PHP version required by Provider; %3$s - current PHP version. */
|
333 |
esc_html__( '%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.', 'wp-mail-smtp' ),
|
334 |
+
esc_html( $this->get_title() ),
|
335 |
+
esc_html( $this->php ),
|
336 |
+
esc_html( phpversion() )
|
337 |
+
);
|
338 |
?>
|
339 |
<br>
|
340 |
<?php esc_html_e( 'Meanwhile you can switch to the "Other SMTP" Mailer option.', 'wp-mail-smtp' ); ?>
|
342 |
|
343 |
<?php
|
344 |
}
|
345 |
+
|
346 |
+
/**
|
347 |
+
* Display a helpful message to those users, that are using an outdated version of PHP,
|
348 |
+
* which is not supported by the currently selected Provider.
|
349 |
+
*
|
350 |
+
* @since 1.5.0
|
351 |
+
*/
|
352 |
+
protected function display_ssl_warning() {
|
353 |
+
?>
|
354 |
+
|
355 |
+
<blockquote>
|
356 |
+
<?php
|
357 |
+
printf(
|
358 |
+
/* translators: %s - Provider name. */
|
359 |
+
esc_html__( '%s requires a SSL certificate on a site to work and does not support you current installation. Please contact your host and request a SSL certificate or install a free one, like Let\'s Encrypt.', 'wp-mail-smtp' ),
|
360 |
+
esc_html( $this->get_title() )
|
361 |
+
);
|
362 |
+
?>
|
363 |
+
<br>
|
364 |
+
<?php esc_html_e( 'Meanwhile you can switch to the "Other SMTP" Mailer option.', 'wp-mail-smtp' ); ?>
|
365 |
+
</blockquote>
|
366 |
+
|
367 |
+
<?php
|
368 |
+
}
|
369 |
+
|
370 |
+
/**
|
371 |
+
* Display a message of a constant that was set inside wp-config.php file.
|
372 |
+
*
|
373 |
+
* @since 1.5.0
|
374 |
+
*
|
375 |
+
* @param string $constant Constant name.
|
376 |
+
*/
|
377 |
+
protected function display_const_set_message( $constant ) {
|
378 |
+
?>
|
379 |
+
|
380 |
+
<p class="desc">
|
381 |
+
<?php
|
382 |
+
printf( /* translators: %1$s - constant name, %2$s - file name. */
|
383 |
+
esc_html__( 'The value of this field was set using a constant %1$s most likely inside %2$s of your WordPress installation.', 'wp-mail-smtp' ),
|
384 |
+
'<code>' . esc_attr( $constant ) . '</code>',
|
385 |
+
'<code>wp-config.php</code>'
|
386 |
+
);
|
387 |
+
?>
|
388 |
+
</p>
|
389 |
+
|
390 |
+
<?php
|
391 |
+
}
|
392 |
}
|
src/Providers/SMTP/Options.php
CHANGED
@@ -20,13 +20,13 @@ class Options extends OptionsAbstract {
|
|
20 |
|
21 |
parent::__construct(
|
22 |
array(
|
23 |
-
'logo_url' => wp_mail_smtp()->plugin_url . '/assets/images/smtp.
|
24 |
'slug' => 'smtp',
|
25 |
'title' => esc_html__( 'Other SMTP', 'wp-mail-smtp' ),
|
26 |
-
/* translators: %1$s - opening link tag; %2$s - closing link tag. */
|
27 |
'description' => sprintf(
|
28 |
wp_kses(
|
29 |
-
|
|
|
30 |
array(
|
31 |
'br' => array(),
|
32 |
'a' => array(
|
@@ -36,8 +36,7 @@ class Options extends OptionsAbstract {
|
|
36 |
),
|
37 |
)
|
38 |
),
|
39 |
-
'
|
40 |
-
'</a>'
|
41 |
),
|
42 |
)
|
43 |
);
|
20 |
|
21 |
parent::__construct(
|
22 |
array(
|
23 |
+
'logo_url' => wp_mail_smtp()->plugin_url . '/assets/images/smtp.svg',
|
24 |
'slug' => 'smtp',
|
25 |
'title' => esc_html__( 'Other SMTP', 'wp-mail-smtp' ),
|
|
|
26 |
'description' => sprintf(
|
27 |
wp_kses(
|
28 |
+
/* translators: %s - URL to a related article on WPForms.com. */
|
29 |
+
__( '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 <a href="%s" target="_blank" rel="noopener noreferrer">SMTP documentation</a>.', 'wp-mail-smtp' ),
|
30 |
array(
|
31 |
'br' => array(),
|
32 |
'a' => array(
|
36 |
),
|
37 |
)
|
38 |
),
|
39 |
+
'https://wpforms.com/docs/how-to-set-up-smtp-using-the-wp-mail-smtp-plugin/'
|
|
|
40 |
),
|
41 |
)
|
42 |
);
|
src/Providers/Sendgrid/Mailer.php
CHANGED
@@ -3,6 +3,7 @@
|
|
3 |
namespace WPMailSMTP\Providers\Sendgrid;
|
4 |
|
5 |
use WPMailSMTP\Providers\MailerAbstract;
|
|
|
6 |
|
7 |
/**
|
8 |
* Class Mailer.
|
@@ -14,6 +15,8 @@ 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 = 202;
|
@@ -21,6 +24,8 @@ class Mailer extends MailerAbstract {
|
|
21 |
/**
|
22 |
* URL to make an API request to.
|
23 |
*
|
|
|
|
|
24 |
* @var string
|
25 |
*/
|
26 |
protected $url = 'https://api.sendgrid.com/v3/mail/send';
|
@@ -52,7 +57,7 @@ class Mailer extends MailerAbstract {
|
|
52 |
|
53 |
$body = parent::get_body();
|
54 |
|
55 |
-
return
|
56 |
}
|
57 |
|
58 |
/**
|
@@ -186,9 +191,55 @@ class Mailer extends MailerAbstract {
|
|
186 |
}
|
187 |
}
|
188 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
189 |
/**
|
190 |
* SendGrid accepts an array of files content in body, so we will include all files and send.
|
191 |
-
* Doesn't handle exceeding the limits etc, as this is done and reported
|
192 |
*
|
193 |
* @since 1.0.0
|
194 |
*
|
@@ -211,7 +262,7 @@ class Mailer extends MailerAbstract {
|
|
211 |
*/
|
212 |
try {
|
213 |
if ( is_file( $attachment[0] ) && is_readable( $attachment[0] ) ) {
|
214 |
-
$file = file_get_contents( $attachment[0] );
|
215 |
}
|
216 |
}
|
217 |
catch ( \Exception $e ) {
|
@@ -269,8 +320,6 @@ class Mailer extends MailerAbstract {
|
|
269 |
if ( ! empty( $name ) ) {
|
270 |
$data['name'] = $name;
|
271 |
}
|
272 |
-
|
273 |
-
break;
|
274 |
}
|
275 |
|
276 |
if ( ! empty( $data ) ) {
|
@@ -288,10 +337,9 @@ class Mailer extends MailerAbstract {
|
|
288 |
*
|
289 |
* @since 1.0.0
|
290 |
*
|
291 |
-
* @param string $
|
292 |
*/
|
293 |
-
public function set_return_path( $
|
294 |
-
}
|
295 |
|
296 |
/**
|
297 |
* Get a SendGrid-specific response with a helpful error.
|
@@ -328,16 +376,20 @@ class Mailer extends MailerAbstract {
|
|
328 |
}
|
329 |
|
330 |
/**
|
331 |
-
*
|
|
|
|
|
|
|
|
|
332 |
*/
|
333 |
public function get_debug_info() {
|
334 |
|
335 |
$mg_text = array();
|
336 |
|
337 |
-
$options
|
338 |
-
$
|
339 |
|
340 |
-
$mg_text[] = '<strong>Api Key:</strong> ' . ( ! empty( $
|
341 |
|
342 |
return implode( '<br>', $mg_text );
|
343 |
}
|
3 |
namespace WPMailSMTP\Providers\Sendgrid;
|
4 |
|
5 |
use WPMailSMTP\Providers\MailerAbstract;
|
6 |
+
use WPMailSMTP\WP;
|
7 |
|
8 |
/**
|
9 |
* Class Mailer.
|
15 |
/**
|
16 |
* Which response code from HTTP provider is considered to be successful?
|
17 |
*
|
18 |
+
* @since 1.0.0
|
19 |
+
*
|
20 |
* @var int
|
21 |
*/
|
22 |
protected $email_sent_code = 202;
|
24 |
/**
|
25 |
* URL to make an API request to.
|
26 |
*
|
27 |
+
* @since 1.0.0
|
28 |
+
*
|
29 |
* @var string
|
30 |
*/
|
31 |
protected $url = 'https://api.sendgrid.com/v3/mail/send';
|
57 |
|
58 |
$body = parent::get_body();
|
59 |
|
60 |
+
return wp_json_encode( $body );
|
61 |
}
|
62 |
|
63 |
/**
|
191 |
}
|
192 |
}
|
193 |
|
194 |
+
/**
|
195 |
+
* Redefine the way custom headers are processed for this mailer - they should be in body.
|
196 |
+
*
|
197 |
+
* @since 1.5.0
|
198 |
+
*
|
199 |
+
* @param array $headers
|
200 |
+
*/
|
201 |
+
public function set_headers( $headers ) {
|
202 |
+
|
203 |
+
foreach ( $headers as $header ) {
|
204 |
+
$name = isset( $header[0] ) ? $header[0] : false;
|
205 |
+
$value = isset( $header[1] ) ? $header[1] : false;
|
206 |
+
|
207 |
+
$this->set_body_header( $name, $value );
|
208 |
+
}
|
209 |
+
|
210 |
+
// Add custom PHPMailer-specific header.
|
211 |
+
$this->set_body_header( 'X-Mailer', 'WPMailSMTP/Mailer/' . $this->mailer . ' ' . WPMS_PLUGIN_VER );
|
212 |
+
}
|
213 |
+
|
214 |
+
/**
|
215 |
+
* This mailer supports email-related custom headers inside a body of the message.
|
216 |
+
*
|
217 |
+
* @since 1.5.0
|
218 |
+
*
|
219 |
+
* @param string $name
|
220 |
+
* @param string $value
|
221 |
+
*/
|
222 |
+
public function set_body_header( $name, $value ) {
|
223 |
+
|
224 |
+
$name = sanitize_text_field( $name );
|
225 |
+
if ( empty( $name ) ) {
|
226 |
+
return;
|
227 |
+
}
|
228 |
+
|
229 |
+
$headers = isset( $this->body['headers'] ) ? (array) $this->body['headers'] : array();
|
230 |
+
|
231 |
+
$headers[ $name ] = WP::sanitize_value( $value );
|
232 |
+
|
233 |
+
$this->set_body_param(
|
234 |
+
array(
|
235 |
+
'headers' => $headers,
|
236 |
+
)
|
237 |
+
);
|
238 |
+
}
|
239 |
+
|
240 |
/**
|
241 |
* SendGrid accepts an array of files content in body, so we will include all files and send.
|
242 |
+
* Doesn't handle exceeding the limits etc, as this is done and reported by SendGrid API.
|
243 |
*
|
244 |
* @since 1.0.0
|
245 |
*
|
262 |
*/
|
263 |
try {
|
264 |
if ( is_file( $attachment[0] ) && is_readable( $attachment[0] ) ) {
|
265 |
+
$file = file_get_contents( $attachment[0] ); // phpcs:ignore
|
266 |
}
|
267 |
}
|
268 |
catch ( \Exception $e ) {
|
320 |
if ( ! empty( $name ) ) {
|
321 |
$data['name'] = $name;
|
322 |
}
|
|
|
|
|
323 |
}
|
324 |
|
325 |
if ( ! empty( $data ) ) {
|
337 |
*
|
338 |
* @since 1.0.0
|
339 |
*
|
340 |
+
* @param string $from_email
|
341 |
*/
|
342 |
+
public function set_return_path( $from_email ) {}
|
|
|
343 |
|
344 |
/**
|
345 |
* Get a SendGrid-specific response with a helpful error.
|
376 |
}
|
377 |
|
378 |
/**
|
379 |
+
* Get mailer debug information, that is helpful during support.
|
380 |
+
*
|
381 |
+
* @since 1.2.0
|
382 |
+
*
|
383 |
+
* @return string
|
384 |
*/
|
385 |
public function get_debug_info() {
|
386 |
|
387 |
$mg_text = array();
|
388 |
|
389 |
+
$options = new \WPMailSMTP\Options();
|
390 |
+
$provider = $options->get_group( $this->mailer );
|
391 |
|
392 |
+
$mg_text[] = '<strong>Api Key:</strong> ' . ( ! empty( $provider['api_key'] ) ? 'Yes' : 'No' );
|
393 |
|
394 |
return implode( '<br>', $mg_text );
|
395 |
}
|
src/Providers/Sendgrid/Options.php
CHANGED
@@ -20,13 +20,13 @@ class Options extends OptionsAbstract {
|
|
20 |
|
21 |
parent::__construct(
|
22 |
array(
|
23 |
-
'logo_url' => wp_mail_smtp()->plugin_url . '/assets/images/sendgrid.
|
24 |
'slug' => 'sendgrid',
|
25 |
'title' => esc_html__( 'SendGrid', 'wp-mail-smtp' ),
|
26 |
'description' => sprintf(
|
27 |
wp_kses(
|
28 |
/* translators: %1$s - opening link tag; %2$s - closing link tag; %3$s - opening link tag; %4$s - closing link tag. */
|
29 |
-
__( '%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
|
30 |
array(
|
31 |
'br' => array(),
|
32 |
'a' => array(
|
@@ -57,11 +57,18 @@ class Options extends OptionsAbstract {
|
|
57 |
<label for="wp-mail-smtp-setting-<?php echo esc_attr( $this->get_slug() ); ?>-api_key"><?php esc_html_e( 'API Key', 'wp-mail-smtp' ); ?></label>
|
58 |
</div>
|
59 |
<div class="wp-mail-smtp-setting-field">
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
<p class="desc">
|
66 |
<?php
|
67 |
printf(
|
20 |
|
21 |
parent::__construct(
|
22 |
array(
|
23 |
+
'logo_url' => wp_mail_smtp()->plugin_url . '/assets/images/sendgrid.svg',
|
24 |
'slug' => 'sendgrid',
|
25 |
'title' => esc_html__( 'SendGrid', 'wp-mail-smtp' ),
|
26 |
'description' => sprintf(
|
27 |
wp_kses(
|
28 |
/* translators: %1$s - opening link tag; %2$s - closing link tag; %3$s - opening link tag; %4$s - closing link tag. */
|
29 |
+
__( '%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 day.<br><br>Read our %3$sSendGrid documentation%4$s to learn how to set up SendGrid and improve your email deliverability.', 'wp-mail-smtp' ),
|
30 |
array(
|
31 |
'br' => array(),
|
32 |
'a' => array(
|
57 |
<label for="wp-mail-smtp-setting-<?php echo esc_attr( $this->get_slug() ); ?>-api_key"><?php esc_html_e( 'API Key', 'wp-mail-smtp' ); ?></label>
|
58 |
</div>
|
59 |
<div class="wp-mail-smtp-setting-field">
|
60 |
+
<?php if ( $this->options->is_const_defined( $this->get_slug(), 'api_key' ) ) : ?>
|
61 |
+
<input type="text" disabled value="****************************************"
|
62 |
+
id="wp-mail-smtp-setting-<?php echo esc_attr( $this->get_slug() ); ?>-api_key"
|
63 |
+
/>
|
64 |
+
<?php $this->display_const_set_message( 'WPMS_SENDGRID_API_KEY' ); ?>
|
65 |
+
<?php else : ?>
|
66 |
+
<input type="text" spellcheck="false"
|
67 |
+
name="wp-mail-smtp[<?php echo esc_attr( $this->get_slug() ); ?>][api_key]"
|
68 |
+
value="<?php echo esc_attr( $this->options->get( $this->get_slug(), 'api_key' ) ); ?>"
|
69 |
+
id="wp-mail-smtp-setting-<?php echo esc_attr( $this->get_slug() ); ?>-api_key"
|
70 |
+
/>
|
71 |
+
<?php endif; ?>
|
72 |
<p class="desc">
|
73 |
<?php
|
74 |
printf(
|
src/WP.php
CHANGED
@@ -12,22 +12,32 @@ class WP {
|
|
12 |
/**
|
13 |
* The "queue" of notices.
|
14 |
*
|
|
|
|
|
15 |
* @var array
|
16 |
*/
|
17 |
protected static $admin_notices = array();
|
18 |
/**
|
|
|
|
|
19 |
* @var string
|
20 |
*/
|
21 |
const ADMIN_NOTICE_SUCCESS = 'notice-success';
|
22 |
/**
|
|
|
|
|
23 |
* @var string
|
24 |
*/
|
25 |
const ADMIN_NOTICE_ERROR = 'notice-error';
|
26 |
/**
|
|
|
|
|
27 |
* @var string
|
28 |
*/
|
29 |
const ADMIN_NOTICE_INFO = 'notice-info';
|
30 |
/**
|
|
|
|
|
31 |
* @var string
|
32 |
*/
|
33 |
const ADMIN_NOTICE_WARNING = 'notice-warning';
|
@@ -56,6 +66,7 @@ class WP {
|
|
56 |
* @return bool
|
57 |
*/
|
58 |
public static function in_wp_admin() {
|
|
|
59 |
return ( is_admin() && ! self::is_doing_ajax() );
|
60 |
}
|
61 |
|
@@ -63,15 +74,18 @@ class WP {
|
|
63 |
* Add a notice to the "queue of notices".
|
64 |
*
|
65 |
* @since 1.0.0
|
|
|
66 |
*
|
67 |
-
* @param string $message
|
68 |
-
* @param string $class
|
|
|
69 |
*/
|
70 |
-
public static function add_admin_notice( $message, $class = self::ADMIN_NOTICE_INFO ) {
|
71 |
|
72 |
self::$admin_notices[] = array(
|
73 |
-
'message'
|
74 |
-
'class'
|
|
|
75 |
);
|
76 |
}
|
77 |
|
@@ -79,12 +93,15 @@ class WP {
|
|
79 |
* Display all notices.
|
80 |
*
|
81 |
* @since 1.0.0
|
|
|
82 |
*/
|
83 |
public static function display_admin_notices() {
|
84 |
|
85 |
-
foreach ( (array) self::$admin_notices as $notice ) :
|
|
|
|
|
86 |
|
87 |
-
<div
|
88 |
<p>
|
89 |
<?php echo $notice['message']; ?>
|
90 |
</p>
|
@@ -102,6 +119,7 @@ class WP {
|
|
102 |
* @return bool
|
103 |
*/
|
104 |
public static function is_debug() {
|
|
|
105 |
return defined( 'WP_DEBUG' ) && WP_DEBUG;
|
106 |
}
|
107 |
|
@@ -113,7 +131,6 @@ class WP {
|
|
113 |
* @return \wpdb
|
114 |
*/
|
115 |
public static function wpdb() {
|
116 |
-
|
117 |
global $wpdb;
|
118 |
|
119 |
return $wpdb;
|
@@ -137,4 +154,81 @@ class WP {
|
|
137 |
|
138 |
return $min;
|
139 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
140 |
}
|
12 |
/**
|
13 |
* The "queue" of notices.
|
14 |
*
|
15 |
+
* @since 1.0.0
|
16 |
+
*
|
17 |
* @var array
|
18 |
*/
|
19 |
protected static $admin_notices = array();
|
20 |
/**
|
21 |
+
* @since 1.0.0
|
22 |
+
*
|
23 |
* @var string
|
24 |
*/
|
25 |
const ADMIN_NOTICE_SUCCESS = 'notice-success';
|
26 |
/**
|
27 |
+
* @since 1.0.0
|
28 |
+
*
|
29 |
* @var string
|
30 |
*/
|
31 |
const ADMIN_NOTICE_ERROR = 'notice-error';
|
32 |
/**
|
33 |
+
* @since 1.0.0
|
34 |
+
*
|
35 |
* @var string
|
36 |
*/
|
37 |
const ADMIN_NOTICE_INFO = 'notice-info';
|
38 |
/**
|
39 |
+
* @since 1.0.0
|
40 |
+
*
|
41 |
* @var string
|
42 |
*/
|
43 |
const ADMIN_NOTICE_WARNING = 'notice-warning';
|
66 |
* @return bool
|
67 |
*/
|
68 |
public static function in_wp_admin() {
|
69 |
+
|
70 |
return ( is_admin() && ! self::is_doing_ajax() );
|
71 |
}
|
72 |
|
74 |
* Add a notice to the "queue of notices".
|
75 |
*
|
76 |
* @since 1.0.0
|
77 |
+
* @since 1.5.0 Added `$is_dismissible` param.
|
78 |
*
|
79 |
+
* @param string $message Message text (HTML is OK).
|
80 |
+
* @param string $class Display class (severity).
|
81 |
+
* @param bool $is_dismissible Whether the message should be dismissible.
|
82 |
*/
|
83 |
+
public static function add_admin_notice( $message, $class = self::ADMIN_NOTICE_INFO, $is_dismissible = true ) {
|
84 |
|
85 |
self::$admin_notices[] = array(
|
86 |
+
'message' => $message,
|
87 |
+
'class' => $class,
|
88 |
+
'is_dismissible' => (bool) $is_dismissible,
|
89 |
);
|
90 |
}
|
91 |
|
93 |
* Display all notices.
|
94 |
*
|
95 |
* @since 1.0.0
|
96 |
+
* @since 1.5.0 Allow the notice to be dismissible, remove the id attribute, which is not unique.
|
97 |
*/
|
98 |
public static function display_admin_notices() {
|
99 |
|
100 |
+
foreach ( (array) self::$admin_notices as $notice ) :
|
101 |
+
$dismissible = $notice['is_dismissible'] ? 'is-dismissible' : '';
|
102 |
+
?>
|
103 |
|
104 |
+
<div class="notice wp-mail-smtp-notice <?php echo esc_attr( $notice['class'] ); ?> notice <?php echo esc_attr( $dismissible ); ?>">
|
105 |
<p>
|
106 |
<?php echo $notice['message']; ?>
|
107 |
</p>
|
119 |
* @return bool
|
120 |
*/
|
121 |
public static function is_debug() {
|
122 |
+
|
123 |
return defined( 'WP_DEBUG' ) && WP_DEBUG;
|
124 |
}
|
125 |
|
131 |
* @return \wpdb
|
132 |
*/
|
133 |
public static function wpdb() {
|
|
|
134 |
global $wpdb;
|
135 |
|
136 |
return $wpdb;
|
154 |
|
155 |
return $min;
|
156 |
}
|
157 |
+
|
158 |
+
/**
|
159 |
+
* Check whether the string is a JSON or not.
|
160 |
+
*
|
161 |
+
* @since 1.5.0
|
162 |
+
*
|
163 |
+
* @param string $string
|
164 |
+
*
|
165 |
+
* @return bool
|
166 |
+
*/
|
167 |
+
public static function is_json( $string ) {
|
168 |
+
|
169 |
+
return is_string( $string ) && is_array( json_decode( $string, true ) ) && ( json_last_error() === JSON_ERROR_NONE ) ? true : false;
|
170 |
+
}
|
171 |
+
|
172 |
+
/**
|
173 |
+
* Get the full date format as per WP options.
|
174 |
+
*
|
175 |
+
* @since 1.5.0
|
176 |
+
*
|
177 |
+
* @return string
|
178 |
+
*/
|
179 |
+
public static function datetime_format() {
|
180 |
+
|
181 |
+
return sprintf(
|
182 |
+
/* translators: %1$s - date, \a\t - specially escaped "at", %2$s - time. */
|
183 |
+
esc_html__( '%1$s \a\t %2$s', 'wp-mail-smtp' ),
|
184 |
+
get_option( 'date_format' ),
|
185 |
+
get_option( 'time_format' )
|
186 |
+
);
|
187 |
+
}
|
188 |
+
|
189 |
+
/**
|
190 |
+
* Get the full date form as per MySQL format.
|
191 |
+
*
|
192 |
+
* @since 1.5.0
|
193 |
+
*
|
194 |
+
* @return string
|
195 |
+
*/
|
196 |
+
public static function datetime_mysql_format() {
|
197 |
+
|
198 |
+
return 'Y-m-d H:i:s';
|
199 |
+
}
|
200 |
+
|
201 |
+
/**
|
202 |
+
* Sanitize the value, similar to sanitize_text_field(), but a bit differently.
|
203 |
+
* It preserves < and > for non-HTML tags.
|
204 |
+
*
|
205 |
+
* @since 1.5.0
|
206 |
+
*
|
207 |
+
* @param string $value
|
208 |
+
*
|
209 |
+
* @return mixed|string|string[]|null
|
210 |
+
*/
|
211 |
+
public static function sanitize_value( $value ) {
|
212 |
+
|
213 |
+
// Remove HTML tags.
|
214 |
+
$filtered = wp_strip_all_tags( $value, false );
|
215 |
+
// Remove multi-lines/tabs.
|
216 |
+
$filtered = preg_replace( '/[\r\n\t ]+/', ' ', $filtered );
|
217 |
+
// Remove whitespaces.
|
218 |
+
$filtered = trim( $filtered );
|
219 |
+
|
220 |
+
// Remove octets.
|
221 |
+
$found = false;
|
222 |
+
while ( preg_match( '/%[a-f0-9]{2}/i', $filtered, $match ) ) {
|
223 |
+
$filtered = str_replace( $match[0], '', $filtered );
|
224 |
+
$found = true;
|
225 |
+
}
|
226 |
+
|
227 |
+
if ( $found ) {
|
228 |
+
// Strip out the whitespace that may now exist after removing the octets.
|
229 |
+
$filtered = trim( preg_replace( '/ +/', ' ', $filtered ) );
|
230 |
+
}
|
231 |
+
|
232 |
+
return $filtered;
|
233 |
+
}
|
234 |
}
|
uninstall.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* @since 1.3.0
|
6 |
*/
|
@@ -10,13 +10,18 @@ if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
|
|
10 |
exit;
|
11 |
}
|
12 |
|
|
|
|
|
|
|
13 |
// Confirm user has decided to remove all data, otherwise stop.
|
14 |
$settings = get_option( 'wp_mail_smtp', array() );
|
15 |
if ( empty( $settings['general']['uninstall'] ) ) {
|
16 |
return;
|
17 |
}
|
18 |
|
19 |
-
|
|
|
|
|
20 |
$options = array(
|
21 |
'wp_mail_smtp_initial_version',
|
22 |
'wp_mail_smtp_version',
|
@@ -45,8 +50,10 @@ foreach ( $options as $option ) {
|
|
45 |
delete_option( $option );
|
46 |
}
|
47 |
|
48 |
-
|
49 |
-
|
|
|
|
|
50 |
array(
|
51 |
'post_type' => array( 'amn_smtp' ),
|
52 |
'post_status' => 'any',
|
@@ -54,8 +61,20 @@ $annoucements = get_posts(
|
|
54 |
'fields' => 'ids',
|
55 |
)
|
56 |
);
|
57 |
-
if ( ! empty( $
|
58 |
-
foreach ( $
|
59 |
-
wp_delete_post( $
|
60 |
}
|
61 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<?php
|
2 |
/**
|
3 |
+
* Uninstall all WP Mail SMTP data.
|
4 |
*
|
5 |
* @since 1.3.0
|
6 |
*/
|
10 |
exit;
|
11 |
}
|
12 |
|
13 |
+
// Load plugin file.
|
14 |
+
require_once 'wp_mail_smtp.php';
|
15 |
+
|
16 |
// Confirm user has decided to remove all data, otherwise stop.
|
17 |
$settings = get_option( 'wp_mail_smtp', array() );
|
18 |
if ( empty( $settings['general']['uninstall'] ) ) {
|
19 |
return;
|
20 |
}
|
21 |
|
22 |
+
/*
|
23 |
+
* Remove options.
|
24 |
+
*/
|
25 |
$options = array(
|
26 |
'wp_mail_smtp_initial_version',
|
27 |
'wp_mail_smtp_version',
|
50 |
delete_option( $option );
|
51 |
}
|
52 |
|
53 |
+
/*
|
54 |
+
* Remove product announcements.
|
55 |
+
*/
|
56 |
+
$announcements = get_posts(
|
57 |
array(
|
58 |
'post_type' => array( 'amn_smtp' ),
|
59 |
'post_status' => 'any',
|
61 |
'fields' => 'ids',
|
62 |
)
|
63 |
);
|
64 |
+
if ( ! empty( $announcements ) ) {
|
65 |
+
foreach ( $announcements as $announcement ) {
|
66 |
+
wp_delete_post( $announcement, true );
|
67 |
}
|
68 |
}
|
69 |
+
|
70 |
+
/*
|
71 |
+
* Logs for Pro plugin only.
|
72 |
+
*/
|
73 |
+
if ( function_exists( 'wp_mail_smtp' ) && wp_mail_smtp()->is_pro() ) {
|
74 |
+
// DB version.
|
75 |
+
delete_option( 'wp_mail_smtp_logs_db_version' );
|
76 |
+
// DB table.
|
77 |
+
global $wpdb;
|
78 |
+
$table = \WPMailSMTP\Pro\Emails\Logs\Logs::get_table_name();
|
79 |
+
$wpdb->query( "DROP TABLE $table;" ); // phpcs:ignore
|
80 |
+
}
|
vendor/composer/ClassLoader.php
CHANGED
@@ -279,7 +279,7 @@ class ClassLoader
|
|
279 |
*/
|
280 |
public function setApcuPrefix($apcuPrefix)
|
281 |
{
|
282 |
-
$this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
|
283 |
}
|
284 |
|
285 |
/**
|
279 |
*/
|
280 |
public function setApcuPrefix($apcuPrefix)
|
281 |
{
|
282 |
+
$this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
|
283 |
}
|
284 |
|
285 |
/**
|
vendor/composer/autoload_files.php
CHANGED
@@ -6,6 +6,7 @@ $vendorDir = dirname(dirname(__FILE__));
|
|
6 |
$baseDir = dirname($vendorDir);
|
7 |
|
8 |
return array(
|
|
|
9 |
'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
|
10 |
'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php',
|
11 |
'37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
|
6 |
$baseDir = dirname($vendorDir);
|
7 |
|
8 |
return array(
|
9 |
+
'7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php',
|
10 |
'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
|
11 |
'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php',
|
12 |
'37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
|
vendor/composer/autoload_psr4.php
CHANGED
@@ -7,6 +7,7 @@ $baseDir = dirname($vendorDir);
|
|
7 |
|
8 |
return array(
|
9 |
'phpseclib\\' => array($vendorDir . '/phpseclib/phpseclib/phpseclib'),
|
|
|
10 |
'WPMailSMTP\\' => array($baseDir . '/src'),
|
11 |
'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
|
12 |
'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src'),
|
7 |
|
8 |
return array(
|
9 |
'phpseclib\\' => array($vendorDir . '/phpseclib/phpseclib/phpseclib'),
|
10 |
+
'Wikimedia\\Composer\\' => array($vendorDir . '/wikimedia/composer-merge-plugin/src'),
|
11 |
'WPMailSMTP\\' => array($baseDir . '/src'),
|
12 |
'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
|
13 |
'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src'),
|
vendor/composer/autoload_static.php
CHANGED
@@ -7,6 +7,7 @@ namespace Composer\Autoload;
|
|
7 |
class ComposerStaticInit84925637ca46a89b245a3fe4d9646ae4
|
8 |
{
|
9 |
public static $files = array (
|
|
|
10 |
'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
|
11 |
'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php',
|
12 |
'37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
|
@@ -20,6 +21,7 @@ class ComposerStaticInit84925637ca46a89b245a3fe4d9646ae4
|
|
20 |
),
|
21 |
'W' =>
|
22 |
array (
|
|
|
23 |
'WPMailSMTP\\' => 11,
|
24 |
),
|
25 |
'P' =>
|
@@ -54,6 +56,10 @@ class ComposerStaticInit84925637ca46a89b245a3fe4d9646ae4
|
|
54 |
array (
|
55 |
0 => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib',
|
56 |
),
|
|
|
|
|
|
|
|
|
57 |
'WPMailSMTP\\' =>
|
58 |
array (
|
59 |
0 => __DIR__ . '/../..' . '/src',
|
7 |
class ComposerStaticInit84925637ca46a89b245a3fe4d9646ae4
|
8 |
{
|
9 |
public static $files = array (
|
10 |
+
'7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
|
11 |
'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
|
12 |
'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php',
|
13 |
'37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
|
21 |
),
|
22 |
'W' =>
|
23 |
array (
|
24 |
+
'Wikimedia\\Composer\\' => 19,
|
25 |
'WPMailSMTP\\' => 11,
|
26 |
),
|
27 |
'P' =>
|
56 |
array (
|
57 |
0 => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib',
|
58 |
),
|
59 |
+
'Wikimedia\\Composer\\' =>
|
60 |
+
array (
|
61 |
+
0 => __DIR__ . '/..' . '/wikimedia/composer-merge-plugin/src',
|
62 |
+
),
|
63 |
'WPMailSMTP\\' =>
|
64 |
array (
|
65 |
0 => __DIR__ . '/../..' . '/src',
|
vendor/google/apiclient-services/LICENSE
CHANGED
@@ -1,203 +1,203 @@
|
|
1 |
-
Apache License
|
2 |
-
Version 2.0, January 2004
|
3 |
-
http://www.apache.org/licenses/
|
4 |
-
|
5 |
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
6 |
-
|
7 |
-
1. Definitions.
|
8 |
-
|
9 |
-
"License" shall mean the terms and conditions for use, reproduction,
|
10 |
-
and distribution as defined by Sections 1 through 9 of this document.
|
11 |
-
|
12 |
-
"Licensor" shall mean the copyright owner or entity authorized by
|
13 |
-
the copyright owner that is granting the License.
|
14 |
-
|
15 |
-
"Legal Entity" shall mean the union of the acting entity and all
|
16 |
-
other entities that control, are controlled by, or are under common
|
17 |
-
control with that entity. For the purposes of this definition,
|
18 |
-
"control" means (i) the power, direct or indirect, to cause the
|
19 |
-
direction or management of such entity, whether by contract or
|
20 |
-
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
21 |
-
outstanding shares, or (iii) beneficial ownership of such entity.
|
22 |
-
|
23 |
-
"You" (or "Your") shall mean an individual or Legal Entity
|
24 |
-
exercising permissions granted by this License.
|
25 |
-
|
26 |
-
"Source" form shall mean the preferred form for making modifications,
|
27 |
-
including but not limited to software source code, documentation
|
28 |
-
source, and configuration files.
|
29 |
-
|
30 |
-
"Object" form shall mean any form resulting from mechanical
|
31 |
-
transformation or translation of a Source form, including but
|
32 |
-
not limited to compiled object code, generated documentation,
|
33 |
-
and conversions to other media types.
|
34 |
-
|
35 |
-
"Work" shall mean the work of authorship, whether in Source or
|
36 |
-
Object form, made available under the License, as indicated by a
|
37 |
-
copyright notice that is included in or attached to the work
|
38 |
-
(an example is provided in the Appendix below).
|
39 |
-
|
40 |
-
"Derivative Works" shall mean any work, whether in Source or Object
|
41 |
-
form, that is based on (or derived from) the Work and for which the
|
42 |
-
editorial revisions, annotations, elaborations, or other modifications
|
43 |
-
represent, as a whole, an original work of authorship. For the purposes
|
44 |
-
of this License, Derivative Works shall not include works that remain
|
45 |
-
separable from, or merely link (or bind by name) to the interfaces of,
|
46 |
-
the Work and Derivative Works thereof.
|
47 |
-
|
48 |
-
"Contribution" shall mean any work of authorship, including
|
49 |
-
the original version of the Work and any modifications or additions
|
50 |
-
to that Work or Derivative Works thereof, that is intentionally
|
51 |
-
submitted to Licensor for inclusion in the Work by the copyright owner
|
52 |
-
or by an individual or Legal Entity authorized to submit on behalf of
|
53 |
-
the copyright owner. For the purposes of this definition, "submitted"
|
54 |
-
means any form of electronic, verbal, or written communication sent
|
55 |
-
to the Licensor or its representatives, including but not limited to
|
56 |
-
communication on electronic mailing lists, source code control systems,
|
57 |
-
and issue tracking systems that are managed by, or on behalf of, the
|
58 |
-
Licensor for the purpose of discussing and improving the Work, but
|
59 |
-
excluding communication that is conspicuously marked or otherwise
|
60 |
-
designated in writing by the copyright owner as "Not a Contribution."
|
61 |
-
|
62 |
-
"Contributor" shall mean Licensor and any individual or Legal Entity
|
63 |
-
on behalf of whom a Contribution has been received by Licensor and
|
64 |
-
subsequently incorporated within the Work.
|
65 |
-
|
66 |
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
67 |
-
this License, each Contributor hereby grants to You a perpetual,
|
68 |
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
69 |
-
copyright license to reproduce, prepare Derivative Works of,
|
70 |
-
publicly display, publicly perform, sublicense, and distribute the
|
71 |
-
Work and such Derivative Works in Source or Object form.
|
72 |
-
|
73 |
-
3. Grant of Patent License. Subject to the terms and conditions of
|
74 |
-
this License, each Contributor hereby grants to You a perpetual,
|
75 |
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
76 |
-
(except as stated in this section) patent license to make, have made,
|
77 |
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
78 |
-
where such license applies only to those patent claims licensable
|
79 |
-
by such Contributor that are necessarily infringed by their
|
80 |
-
Contribution(s) alone or by combination of their Contribution(s)
|
81 |
-
with the Work to which such Contribution(s) was submitted. If You
|
82 |
-
institute patent litigation against any entity (including a
|
83 |
-
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
84 |
-
or a Contribution incorporated within the Work constitutes direct
|
85 |
-
or contributory patent infringement, then any patent licenses
|
86 |
-
granted to You under this License for that Work shall terminate
|
87 |
-
as of the date such litigation is filed.
|
88 |
-
|
89 |
-
4. Redistribution. You may reproduce and distribute copies of the
|
90 |
-
Work or Derivative Works thereof in any medium, with or without
|
91 |
-
modifications, and in Source or Object form, provided that You
|
92 |
-
meet the following conditions:
|
93 |
-
|
94 |
-
(a) You must give any other recipients of the Work or
|
95 |
-
Derivative Works a copy of this License; and
|
96 |
-
|
97 |
-
(b) You must cause any modified files to carry prominent notices
|
98 |
-
stating that You changed the files; and
|
99 |
-
|
100 |
-
(c) You must retain, in the Source form of any Derivative Works
|
101 |
-
that You distribute, all copyright, patent, trademark, and
|
102 |
-
attribution notices from the Source form of the Work,
|
103 |
-
excluding those notices that do not pertain to any part of
|
104 |
-
the Derivative Works; and
|
105 |
-
|
106 |
-
(d) If the Work includes a "NOTICE" text file as part of its
|
107 |
-
distribution, then any Derivative Works that You distribute must
|
108 |
-
include a readable copy of the attribution notices contained
|
109 |
-
within such NOTICE file, excluding those notices that do not
|
110 |
-
pertain to any part of the Derivative Works, in at least one
|
111 |
-
of the following places: within a NOTICE text file distributed
|
112 |
-
as part of the Derivative Works; within the Source form or
|
113 |
-
documentation, if provided along with the Derivative Works; or,
|
114 |
-
within a display generated by the Derivative Works, if and
|
115 |
-
wherever such third-party notices normally appear. The contents
|
116 |
-
of the NOTICE file are for informational purposes only and
|
117 |
-
do not modify the License. You may add Your own attribution
|
118 |
-
notices within Derivative Works that You distribute, alongside
|
119 |
-
or as an addendum to the NOTICE text from the Work, provided
|
120 |
-
that such additional attribution notices cannot be construed
|
121 |
-
as modifying the License.
|
122 |
-
|
123 |
-
You may add Your own copyright statement to Your modifications and
|
124 |
-
may provide additional or different license terms and conditions
|
125 |
-
for use, reproduction, or distribution of Your modifications, or
|
126 |
-
for any such Derivative Works as a whole, provided Your use,
|
127 |
-
reproduction, and distribution of the Work otherwise complies with
|
128 |
-
the conditions stated in this License.
|
129 |
-
|
130 |
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
131 |
-
any Contribution intentionally submitted for inclusion in the Work
|
132 |
-
by You to the Licensor shall be under the terms and conditions of
|
133 |
-
this License, without any additional terms or conditions.
|
134 |
-
Notwithstanding the above, nothing herein shall supersede or modify
|
135 |
-
the terms of any separate license agreement you may have executed
|
136 |
-
with Licensor regarding such Contributions.
|
137 |
-
|
138 |
-
6. Trademarks. This License does not grant permission to use the trade
|
139 |
-
names, trademarks, service marks, or product names of the Licensor,
|
140 |
-
except as required for reasonable and customary use in describing the
|
141 |
-
origin of the Work and reproducing the content of the NOTICE file.
|
142 |
-
|
143 |
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
144 |
-
agreed to in writing, Licensor provides the Work (and each
|
145 |
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
146 |
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
147 |
-
implied, including, without limitation, any warranties or conditions
|
148 |
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
149 |
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
150 |
-
appropriateness of using or redistributing the Work and assume any
|
151 |
-
risks associated with Your exercise of permissions under this License.
|
152 |
-
|
153 |
-
8. Limitation of Liability. In no event and under no legal theory,
|
154 |
-
whether in tort (including negligence), contract, or otherwise,
|
155 |
-
unless required by applicable law (such as deliberate and grossly
|
156 |
-
negligent acts) or agreed to in writing, shall any Contributor be
|
157 |
-
liable to You for damages, including any direct, indirect, special,
|
158 |
-
incidental, or consequential damages of any character arising as a
|
159 |
-
result of this License or out of the use or inability to use the
|
160 |
-
Work (including but not limited to damages for loss of goodwill,
|
161 |
-
work stoppage, computer failure or malfunction, or any and all
|
162 |
-
other commercial damages or losses), even if such Contributor
|
163 |
-
has been advised of the possibility of such damages.
|
164 |
-
|
165 |
-
9. Accepting Warranty or Additional Liability. While redistributing
|
166 |
-
the Work or Derivative Works thereof, You may choose to offer,
|
167 |
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
168 |
-
or other liability obligations and/or rights consistent with this
|
169 |
-
License. However, in accepting such obligations, You may act only
|
170 |
-
on Your own behalf and on Your sole responsibility, not on behalf
|
171 |
-
of any other Contributor, and only if You agree to indemnify,
|
172 |
-
defend, and hold each Contributor harmless for any liability
|
173 |
-
incurred by, or claims asserted against, such Contributor by reason
|
174 |
-
of your accepting any such warranty or additional liability.
|
175 |
-
|
176 |
-
END OF TERMS AND CONDITIONS
|
177 |
-
|
178 |
-
APPENDIX: How to apply the Apache License to your work.
|
179 |
-
|
180 |
-
To apply the Apache License to your work, attach the following
|
181 |
-
boilerplate notice, with the fields enclosed by brackets "[]"
|
182 |
-
replaced with your own identifying information. (Don't include
|
183 |
-
the brackets!) The text should be enclosed in the appropriate
|
184 |
-
comment syntax for the file format. We also recommend that a
|
185 |
-
file or class name and description of purpose be included on the
|
186 |
-
same "printed page" as the copyright notice for easier
|
187 |
-
identification within third-party archives.
|
188 |
-
|
189 |
-
Copyright [yyyy] [name of copyright owner]
|
190 |
-
|
191 |
-
Licensed under the Apache License, Version 2.0 (the "License");
|
192 |
-
you may not use this file except in compliance with the License.
|
193 |
-
You may obtain a copy of the License at
|
194 |
-
|
195 |
-
http://www.apache.org/licenses/LICENSE-2.0
|
196 |
-
|
197 |
-
Unless required by applicable law or agreed to in writing, software
|
198 |
-
distributed under the License is distributed on an "AS IS" BASIS,
|
199 |
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
200 |
-
See the License for the specific language governing permissions and
|
201 |
-
limitations under the License.
|
202 |
-
|
203 |
-
|
1 |
+
Apache License
|
2 |
+
Version 2.0, January 2004
|
3 |
+
http://www.apache.org/licenses/
|
4 |
+
|
5 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
6 |
+
|
7 |
+
1. Definitions.
|
8 |
+
|
9 |
+
"License" shall mean the terms and conditions for use, reproduction,
|
10 |
+
and distribution as defined by Sections 1 through 9 of this document.
|
11 |
+
|
12 |
+
"Licensor" shall mean the copyright owner or entity authorized by
|
13 |
+
the copyright owner that is granting the License.
|
14 |
+
|
15 |
+
"Legal Entity" shall mean the union of the acting entity and all
|
16 |
+
other entities that control, are controlled by, or are under common
|
17 |
+
control with that entity. For the purposes of this definition,
|
18 |
+
"control" means (i) the power, direct or indirect, to cause the
|
19 |
+
direction or management of such entity, whether by contract or
|
20 |
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
21 |
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
22 |
+
|
23 |
+
"You" (or "Your") shall mean an individual or Legal Entity
|
24 |
+
exercising permissions granted by this License.
|
25 |
+
|
26 |
+
"Source" form shall mean the preferred form for making modifications,
|
27 |
+
including but not limited to software source code, documentation
|
28 |
+
source, and configuration files.
|
29 |
+
|
30 |
+
"Object" form shall mean any form resulting from mechanical
|
31 |
+
transformation or translation of a Source form, including but
|
32 |
+
not limited to compiled object code, generated documentation,
|
33 |
+
and conversions to other media types.
|
34 |
+
|
35 |
+
"Work" shall mean the work of authorship, whether in Source or
|
36 |
+
Object form, made available under the License, as indicated by a
|
37 |
+
copyright notice that is included in or attached to the work
|
38 |
+
(an example is provided in the Appendix below).
|
39 |
+
|
40 |
+
"Derivative Works" shall mean any work, whether in Source or Object
|
41 |
+
form, that is based on (or derived from) the Work and for which the
|
42 |
+
editorial revisions, annotations, elaborations, or other modifications
|
43 |
+
represent, as a whole, an original work of authorship. For the purposes
|
44 |
+
of this License, Derivative Works shall not include works that remain
|
45 |
+
separable from, or merely link (or bind by name) to the interfaces of,
|
46 |
+
the Work and Derivative Works thereof.
|
47 |
+
|
48 |
+
"Contribution" shall mean any work of authorship, including
|
49 |
+
the original version of the Work and any modifications or additions
|
50 |
+
to that Work or Derivative Works thereof, that is intentionally
|
51 |
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
52 |
+
or by an individual or Legal Entity authorized to submit on behalf of
|
53 |
+
the copyright owner. For the purposes of this definition, "submitted"
|
54 |
+
means any form of electronic, verbal, or written communication sent
|
55 |
+
to the Licensor or its representatives, including but not limited to
|
56 |
+
communication on electronic mailing lists, source code control systems,
|
57 |
+
and issue tracking systems that are managed by, or on behalf of, the
|
58 |
+
Licensor for the purpose of discussing and improving the Work, but
|
59 |
+
excluding communication that is conspicuously marked or otherwise
|
60 |
+
designated in writing by the copyright owner as "Not a Contribution."
|
61 |
+
|
62 |
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
63 |
+
on behalf of whom a Contribution has been received by Licensor and
|
64 |
+
subsequently incorporated within the Work.
|
65 |
+
|
66 |
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
67 |
+
this License, each Contributor hereby grants to You a perpetual,
|
68 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
69 |
+
copyright license to reproduce, prepare Derivative Works of,
|
70 |
+
publicly display, publicly perform, sublicense, and distribute the
|
71 |
+
Work and such Derivative Works in Source or Object form.
|
72 |
+
|
73 |
+
3. Grant of Patent License. Subject to the terms and conditions of
|
74 |
+
this License, each Contributor hereby grants to You a perpetual,
|
75 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
76 |
+
(except as stated in this section) patent license to make, have made,
|
77 |
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
78 |
+
where such license applies only to those patent claims licensable
|
79 |
+
by such Contributor that are necessarily infringed by their
|
80 |
+
Contribution(s) alone or by combination of their Contribution(s)
|
81 |
+
with the Work to which such Contribution(s) was submitted. If You
|
82 |
+
institute patent litigation against any entity (including a
|
83 |
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
84 |
+
or a Contribution incorporated within the Work constitutes direct
|
85 |
+
or contributory patent infringement, then any patent licenses
|
86 |
+
granted to You under this License for that Work shall terminate
|
87 |
+
as of the date such litigation is filed.
|
88 |
+
|
89 |
+
4. Redistribution. You may reproduce and distribute copies of the
|
90 |
+
Work or Derivative Works thereof in any medium, with or without
|
91 |
+
modifications, and in Source or Object form, provided that You
|
92 |
+
meet the following conditions:
|
93 |
+
|
94 |
+
(a) You must give any other recipients of the Work or
|
95 |
+
Derivative Works a copy of this License; and
|
96 |
+
|
97 |
+
(b) You must cause any modified files to carry prominent notices
|
98 |
+
stating that You changed the files; and
|
99 |
+
|
100 |
+
(c) You must retain, in the Source form of any Derivative Works
|
101 |
+
that You distribute, all copyright, patent, trademark, and
|
102 |
+
attribution notices from the Source form of the Work,
|
103 |
+
excluding those notices that do not pertain to any part of
|
104 |
+
the Derivative Works; and
|
105 |
+
|
106 |
+
(d) If the Work includes a "NOTICE" text file as part of its
|
107 |
+
distribution, then any Derivative Works that You distribute must
|
108 |
+
include a readable copy of the attribution notices contained
|
109 |
+
within such NOTICE file, excluding those notices that do not
|
110 |
+
pertain to any part of the Derivative Works, in at least one
|
111 |
+
of the following places: within a NOTICE text file distributed
|
112 |
+
as part of the Derivative Works; within the Source form or
|
113 |
+
documentation, if provided along with the Derivative Works; or,
|
114 |
+
within a display generated by the Derivative Works, if and
|
115 |
+
wherever such third-party notices normally appear. The contents
|
116 |
+
of the NOTICE file are for informational purposes only and
|
117 |
+
do not modify the License. You may add Your own attribution
|
118 |
+
notices within Derivative Works that You distribute, alongside
|
119 |
+
or as an addendum to the NOTICE text from the Work, provided
|
120 |
+
that such additional attribution notices cannot be construed
|
121 |
+
as modifying the License.
|
122 |
+
|
123 |
+
You may add Your own copyright statement to Your modifications and
|
124 |
+
may provide additional or different license terms and conditions
|
125 |
+
for use, reproduction, or distribution of Your modifications, or
|
126 |
+
for any such Derivative Works as a whole, provided Your use,
|
127 |
+
reproduction, and distribution of the Work otherwise complies with
|
128 |
+
the conditions stated in this License.
|
129 |
+
|
130 |
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
131 |
+
any Contribution intentionally submitted for inclusion in the Work
|
132 |
+
by You to the Licensor shall be under the terms and conditions of
|
133 |
+
this License, without any additional terms or conditions.
|
134 |
+
Notwithstanding the above, nothing herein shall supersede or modify
|
135 |
+
the terms of any separate license agreement you may have executed
|
136 |
+
with Licensor regarding such Contributions.
|
137 |
+
|
138 |
+
6. Trademarks. This License does not grant permission to use the trade
|
139 |
+
names, trademarks, service marks, or product names of the Licensor,
|
140 |
+
except as required for reasonable and customary use in describing the
|
141 |
+
origin of the Work and reproducing the content of the NOTICE file.
|
142 |
+
|
143 |
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
144 |
+
agreed to in writing, Licensor provides the Work (and each
|
145 |
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
146 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
147 |
+
implied, including, without limitation, any warranties or conditions
|
148 |
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
149 |
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
150 |
+
appropriateness of using or redistributing the Work and assume any
|
151 |
+
risks associated with Your exercise of permissions under this License.
|
152 |
+
|
153 |
+
8. Limitation of Liability. In no event and under no legal theory,
|
154 |
+
whether in tort (including negligence), contract, or otherwise,
|
155 |
+
unless required by applicable law (such as deliberate and grossly
|
156 |
+
negligent acts) or agreed to in writing, shall any Contributor be
|
157 |
+
liable to You for damages, including any direct, indirect, special,
|
158 |
+
incidental, or consequential damages of any character arising as a
|
159 |
+
result of this License or out of the use or inability to use the
|
160 |
+
Work (including but not limited to damages for loss of goodwill,
|
161 |
+
work stoppage, computer failure or malfunction, or any and all
|
162 |
+
other commercial damages or losses), even if such Contributor
|
163 |
+
has been advised of the possibility of such damages.
|
164 |
+
|
165 |
+
9. Accepting Warranty or Additional Liability. While redistributing
|
166 |
+
the Work or Derivative Works thereof, You may choose to offer,
|
167 |
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
168 |
+
or other liability obligations and/or rights consistent with this
|
169 |
+
License. However, in accepting such obligations, You may act only
|
170 |
+
on Your own behalf and on Your sole responsibility, not on behalf
|
171 |
+
of any other Contributor, and only if You agree to indemnify,
|
172 |
+
defend, and hold each Contributor harmless for any liability
|
173 |
+
incurred by, or claims asserted against, such Contributor by reason
|
174 |
+
of your accepting any such warranty or additional liability.
|
175 |
+
|
176 |
+
END OF TERMS AND CONDITIONS
|
177 |
+
|
178 |
+
APPENDIX: How to apply the Apache License to your work.
|
179 |
+
|
180 |
+
To apply the Apache License to your work, attach the following
|
181 |
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
182 |
+
replaced with your own identifying information. (Don't include
|
183 |
+
the brackets!) The text should be enclosed in the appropriate
|
184 |
+
comment syntax for the file format. We also recommend that a
|
185 |
+
file or class name and description of purpose be included on the
|
186 |
+
same "printed page" as the copyright notice for easier
|
187 |
+
identification within third-party archives.
|
188 |
+
|
189 |
+
Copyright [yyyy] [name of copyright owner]
|
190 |
+
|
191 |
+
Licensed under the Apache License, Version 2.0 (the "License");
|
192 |
+
you may not use this file except in compliance with the License.
|
193 |
+
You may obtain a copy of the License at
|
194 |
+
|
195 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
196 |
+
|
197 |
+
Unless required by applicable law or agreed to in writing, software
|
198 |
+
distributed under the License is distributed on an "AS IS" BASIS,
|
199 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
200 |
+
See the License for the specific language governing permissions and
|
201 |
+
limitations under the License.
|
202 |
+
|
203 |
+
|
vendor/google/apiclient-services/src/Google/Service/Gmail.php
CHANGED
@@ -1,1197 +1,1218 @@
|
|
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 |
-
* Service definition for Gmail (v1).
|
20 |
-
*
|
21 |
-
* <p>
|
22 |
-
* Access Gmail mailboxes including sending user email.</p>
|
23 |
-
*
|
24 |
-
* <p>
|
25 |
-
* For more information about this service, see the API
|
26 |
-
* <a href="https://developers.google.com/gmail/api/" target="_blank">Documentation</a>
|
27 |
-
* </p>
|
28 |
-
*
|
29 |
-
* @author Google, Inc.
|
30 |
-
*/
|
31 |
-
class Google_Service_Gmail extends Google_Service
|
32 |
-
{
|
33 |
-
/** Read,
|
34 |
-
const MAIL_GOOGLE_COM =
|
35 |
-
"https://mail.google.com/";
|
36 |
-
/** Manage drafts and send emails. */
|
37 |
-
const GMAIL_COMPOSE =
|
38 |
-
"https://www.googleapis.com/auth/gmail.compose";
|
39 |
-
/** Insert mail into your mailbox. */
|
40 |
-
const GMAIL_INSERT =
|
41 |
-
"https://www.googleapis.com/auth/gmail.insert";
|
42 |
-
/** Manage mailbox labels. */
|
43 |
-
const GMAIL_LABELS =
|
44 |
-
"https://www.googleapis.com/auth/gmail.labels";
|
45 |
-
/** View your email message metadata such as labels and headers, but not the email body. */
|
46 |
-
const GMAIL_METADATA =
|
47 |
-
"https://www.googleapis.com/auth/gmail.metadata";
|
48 |
-
/** View and modify but not delete your email. */
|
49 |
-
const GMAIL_MODIFY =
|
50 |
-
"https://www.googleapis.com/auth/gmail.modify";
|
51 |
-
/** View your email messages and settings. */
|
52 |
-
const GMAIL_READONLY =
|
53 |
-
"https://www.googleapis.com/auth/gmail.readonly";
|
54 |
-
/** Send email on your behalf. */
|
55 |
-
const GMAIL_SEND =
|
56 |
-
"https://www.googleapis.com/auth/gmail.send";
|
57 |
-
/** Manage your basic mail settings. */
|
58 |
-
const GMAIL_SETTINGS_BASIC =
|
59 |
-
"https://www.googleapis.com/auth/gmail.settings.basic";
|
60 |
-
/** Manage your sensitive mail settings, including who can manage your mail. */
|
61 |
-
const GMAIL_SETTINGS_SHARING =
|
62 |
-
"https://www.googleapis.com/auth/gmail.settings.sharing";
|
63 |
-
|
64 |
-
public $users;
|
65 |
-
public $users_drafts;
|
66 |
-
public $users_history;
|
67 |
-
public $users_labels;
|
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;
|
75 |
-
public $users_settings_sendAs_smimeInfo;
|
76 |
-
public $users_threads;
|
77 |
-
|
78 |
-
/**
|
79 |
-
* Constructs the internal representation of the Gmail service.
|
80 |
-
*
|
81 |
-
* @param Google_Client $client
|
82 |
-
*/
|
83 |
-
public function __construct(Google_Client $client)
|
84 |
-
{
|
85 |
-
parent::__construct($client);
|
86 |
-
$this->rootUrl = 'https://www.googleapis.com/';
|
87 |
-
$this->servicePath = 'gmail/v1/users/';
|
88 |
-
$this->
|
89 |
-
$this->
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
$this
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
'
|
100 |
-
'
|
101 |
-
|
102 |
-
|
103 |
-
'
|
104 |
-
'
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
'
|
110 |
-
'
|
111 |
-
|
112 |
-
|
113 |
-
'
|
114 |
-
'
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
'
|
120 |
-
'
|
121 |
-
|
122 |
-
|
123 |
-
'
|
124 |
-
'
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
$this
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
'
|
140 |
-
'
|
141 |
-
|
142 |
-
|
143 |
-
'
|
144 |
-
'
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
'
|
150 |
-
'
|
151 |
-
|
152 |
-
|
153 |
-
'
|
154 |
-
'
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
'
|
159 |
-
'
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
'
|
165 |
-
'
|
166 |
-
|
167 |
-
|
168 |
-
'
|
169 |
-
'
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
'
|
174 |
-
'
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
'
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
'
|
184 |
-
'
|
185 |
-
|
186 |
-
|
187 |
-
'
|
188 |
-
'
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
'
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
'
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
'
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
'
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
'
|
210 |
-
'
|
211 |
-
|
212 |
-
|
213 |
-
'
|
214 |
-
'
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
'
|
220 |
-
'
|
221 |
-
|
222 |
-
|
223 |
-
'
|
224 |
-
'
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
'
|
229 |
-
'
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
$this
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
'
|
245 |
-
'
|
246 |
-
|
247 |
-
|
248 |
-
'
|
249 |
-
'
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
'
|
254 |
-
'
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
'
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
'
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
'
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
'
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
$this
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
'
|
286 |
-
'
|
287 |
-
|
288 |
-
|
289 |
-
'
|
290 |
-
'
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
'
|
296 |
-
'
|
297 |
-
|
298 |
-
|
299 |
-
'
|
300 |
-
'
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
'
|
305 |
-
'
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
'
|
311 |
-
'
|
312 |
-
|
313 |
-
|
314 |
-
'
|
315 |
-
'
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
'
|
320 |
-
'
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
'
|
326 |
-
'
|
327 |
-
|
328 |
-
|
329 |
-
'
|
330 |
-
'
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
'
|
336 |
-
'
|
337 |
-
|
338 |
-
|
339 |
-
'
|
340 |
-
'
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
'
|
345 |
-
'
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
'
|
351 |
-
'
|
352 |
-
|
353 |
-
|
354 |
-
'
|
355 |
-
'
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
'
|
360 |
-
'
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
$this
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
'
|
376 |
-
'
|
377 |
-
|
378 |
-
|
379 |
-
'
|
380 |
-
'
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
'
|
386 |
-
'
|
387 |
-
|
388 |
-
|
389 |
-
'
|
390 |
-
'
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
'
|
396 |
-
'
|
397 |
-
|
398 |
-
|
399 |
-
'
|
400 |
-
'
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
'
|
405 |
-
'
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
'
|
411 |
-
'
|
412 |
-
|
413 |
-
|
414 |
-
'
|
415 |
-
'
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
'
|
420 |
-
'
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
'
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
'
|
429 |
-
'
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
'
|
435 |
-
'
|
436 |
-
|
437 |
-
|
438 |
-
'
|
439 |
-
'
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
'
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
'
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
'
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
'
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
'
|
461 |
-
'
|
462 |
-
|
463 |
-
|
464 |
-
'
|
465 |
-
'
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
'
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
'
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
'
|
479 |
-
'
|
480 |
-
|
481 |
-
|
482 |
-
'
|
483 |
-
'
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
'
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
'
|
492 |
-
'
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
'
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
'
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
'
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
'
|
510 |
-
'
|
511 |
-
|
512 |
-
|
513 |
-
'
|
514 |
-
'
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
'
|
519 |
-
'
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
'
|
525 |
-
'
|
526 |
-
|
527 |
-
|
528 |
-
'
|
529 |
-
'
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
'
|
535 |
-
'
|
536 |
-
|
537 |
-
|
538 |
-
'
|
539 |
-
'
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
'
|
544 |
-
'
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
'
|
550 |
-
'
|
551 |
-
|
552 |
-
|
553 |
-
'
|
554 |
-
'
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
'
|
559 |
-
'
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
$this
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
'
|
575 |
-
'
|
576 |
-
|
577 |
-
|
578 |
-
'
|
579 |
-
'
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
'
|
584 |
-
'
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
'
|
589 |
-
'
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
$this
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
'
|
605 |
-
'
|
606 |
-
|
607 |
-
|
608 |
-
'
|
609 |
-
'
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
'
|
615 |
-
'
|
616 |
-
|
617 |
-
|
618 |
-
'
|
619 |
-
'
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
'
|
625 |
-
'
|
626 |
-
|
627 |
-
|
628 |
-
'
|
629 |
-
'
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
'
|
635 |
-
'
|
636 |
-
|
637 |
-
|
638 |
-
'
|
639 |
-
'
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
'
|
645 |
-
'
|
646 |
-
|
647 |
-
|
648 |
-
'
|
649 |
-
'
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
'
|
655 |
-
'
|
656 |
-
|
657 |
-
|
658 |
-
'
|
659 |
-
'
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
'
|
665 |
-
'
|
666 |
-
|
667 |
-
|
668 |
-
'
|
669 |
-
'
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
'
|
675 |
-
'
|
676 |
-
|
677 |
-
|
678 |
-
'
|
679 |
-
'
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
'
|
695 |
-
'
|
696 |
-
|
697 |
-
|
698 |
-
'
|
699 |
-
'
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
'
|
729 |
-
'
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
'
|
755 |
-
'
|
756 |
-
|
757 |
-
|
758 |
-
'
|
759 |
-
'
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
'
|
789 |
-
'
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
'
|
815 |
-
'
|
816 |
-
|
817 |
-
|
818 |
-
'
|
819 |
-
'
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
'
|
849 |
-
'
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
'
|
875 |
-
'
|
876 |
-
|
877 |
-
|
878 |
-
'
|
879 |
-
'
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
|
906 |
-
|
907 |
-
|
908 |
-
'
|
909 |
-
'
|
910 |
-
|
911 |
-
|
912 |
-
|
913 |
-
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
-
|
918 |
-
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
'
|
929 |
-
'
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
'
|
949 |
-
'
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
'
|
964 |
-
'
|
965 |
-
|
966 |
-
|
967 |
-
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
'
|
984 |
-
'
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
'
|
1000 |
-
'
|
1001 |
-
|
1002 |
-
|
1003 |
-
'
|
1004 |
-
'
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
1008 |
-
'
|
1009 |
-
'
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
'
|
1014 |
-
'
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
'
|
1020 |
-
'
|
1021 |
-
|
1022 |
-
|
1023 |
-
'
|
1024 |
-
'
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
'
|
1029 |
-
'
|
1030 |
-
|
1031 |
-
|
1032 |
-
|
1033 |
-
|
1034 |
-
|
1035 |
-
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
1039 |
-
|
1040 |
-
|
1041 |
-
|
1042 |
-
|
1043 |
-
'
|
1044 |
-
'
|
1045 |
-
|
1046 |
-
|
1047 |
-
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
1058 |
-
'
|
1059 |
-
'
|
1060 |
-
|
1061 |
-
|
1062 |
-
|
1063 |
-
'
|
1064 |
-
'
|
1065 |
-
|
1066 |
-
|
1067 |
-
|
1068 |
-
|
1069 |
-
|
1070 |
-
|
1071 |
-
|
1072 |
-
|
1073 |
-
|
1074 |
-
|
1075 |
-
|
1076 |
-
|
1077 |
-
|
1078 |
-
|
1079 |
-
|
1080 |
-
|
1081 |
-
|
1082 |
-
|
1083 |
-
'
|
1084 |
-
'
|
1085 |
-
|
1086 |
-
|
1087 |
-
|
1088 |
-
|
1089 |
-
|
1090 |
-
|
1091 |
-
|
1092 |
-
|
1093 |
-
|
1094 |
-
|
1095 |
-
|
1096 |
-
|
1097 |
-
|
1098 |
-
|
1099 |
-
|
1100 |
-
|
1101 |
-
|
1102 |
-
|
1103 |
-
'
|
1104 |
-
'
|
1105 |
-
|
1106 |
-
|
1107 |
-
|
1108 |
-
'
|
1109 |
-
|
1110 |
-
|
1111 |
-
|
1112 |
-
|
1113 |
-
|
1114 |
-
|
1115 |
-
|
1116 |
-
|
1117 |
-
|
1118 |
-
|
1119 |
-
|
1120 |
-
|
1121 |
-
|
1122 |
-
|
1123 |
-
'
|
1124 |
-
|
1125 |
-
|
1126 |
-
|
1127 |
-
|
1128 |
-
|
1129 |
-
|
1130 |
-
|
1131 |
-
|
1132 |
-
'
|
1133 |
-
|
1134 |
-
|
1135 |
-
|
1136 |
-
|
1137 |
-
|
1138 |
-
|
1139 |
-
|
1140 |
-
|
1141 |
-
|
1142 |
-
|
1143 |
-
'
|
1144 |
-
'
|
1145 |
-
),
|
1146 |
-
|
1147 |
-
|
1148 |
-
|
1149 |
-
|
1150 |
-
|
1151 |
-
|
1152 |
-
'
|
1153 |
-
'
|
1154 |
-
|
1155 |
-
|
1156 |
-
|
1157 |
-
'
|
1158 |
-
|
1159 |
-
|
1160 |
-
|
1161 |
-
|
1162 |
-
|
1163 |
-
|
1164 |
-
|
1165 |
-
|
1166 |
-
|
1167 |
-
|
1168 |
-
|
1169 |
-
|
1170 |
-
|
1171 |
-
|
1172 |
-
|
1173 |
-
'
|
1174 |
-
'
|
1175 |
-
|
1176 |
-
|
1177 |
-
|
1178 |
-
|
1179 |
-
|
1180 |
-
|
1181 |
-
|
1182 |
-
|
1183 |
-
|
1184 |
-
|
1185 |
-
|
1186 |
-
|
1187 |
-
|
1188 |
-
'
|
1189 |
-
'
|
1190 |
-
|
1191 |
-
|
1192 |
-
|
1193 |
-
|
1194 |
-
|
1195 |
-
|
1196 |
-
|
1197 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
* Service definition for Gmail (v1).
|
20 |
+
*
|
21 |
+
* <p>
|
22 |
+
* Access Gmail mailboxes including sending user email.</p>
|
23 |
+
*
|
24 |
+
* <p>
|
25 |
+
* For more information about this service, see the API
|
26 |
+
* <a href="https://developers.google.com/gmail/api/" target="_blank">Documentation</a>
|
27 |
+
* </p>
|
28 |
+
*
|
29 |
+
* @author Google, Inc.
|
30 |
+
*/
|
31 |
+
class Google_Service_Gmail extends Google_Service
|
32 |
+
{
|
33 |
+
/** Read, compose, send, and permanently delete all your email from Gmail. */
|
34 |
+
const MAIL_GOOGLE_COM =
|
35 |
+
"https://mail.google.com/";
|
36 |
+
/** Manage drafts and send emails. */
|
37 |
+
const GMAIL_COMPOSE =
|
38 |
+
"https://www.googleapis.com/auth/gmail.compose";
|
39 |
+
/** Insert mail into your mailbox. */
|
40 |
+
const GMAIL_INSERT =
|
41 |
+
"https://www.googleapis.com/auth/gmail.insert";
|
42 |
+
/** Manage mailbox labels. */
|
43 |
+
const GMAIL_LABELS =
|
44 |
+
"https://www.googleapis.com/auth/gmail.labels";
|
45 |
+
/** View your email message metadata such as labels and headers, but not the email body. */
|
46 |
+
const GMAIL_METADATA =
|
47 |
+
"https://www.googleapis.com/auth/gmail.metadata";
|
48 |
+
/** View and modify but not delete your email. */
|
49 |
+
const GMAIL_MODIFY =
|
50 |
+
"https://www.googleapis.com/auth/gmail.modify";
|
51 |
+
/** View your email messages and settings. */
|
52 |
+
const GMAIL_READONLY =
|
53 |
+
"https://www.googleapis.com/auth/gmail.readonly";
|
54 |
+
/** Send email on your behalf. */
|
55 |
+
const GMAIL_SEND =
|
56 |
+
"https://www.googleapis.com/auth/gmail.send";
|
57 |
+
/** Manage your basic mail settings. */
|
58 |
+
const GMAIL_SETTINGS_BASIC =
|
59 |
+
"https://www.googleapis.com/auth/gmail.settings.basic";
|
60 |
+
/** Manage your sensitive mail settings, including who can manage your mail. */
|
61 |
+
const GMAIL_SETTINGS_SHARING =
|
62 |
+
"https://www.googleapis.com/auth/gmail.settings.sharing";
|
63 |
+
|
64 |
+
public $users;
|
65 |
+
public $users_drafts;
|
66 |
+
public $users_history;
|
67 |
+
public $users_labels;
|
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;
|
75 |
+
public $users_settings_sendAs_smimeInfo;
|
76 |
+
public $users_threads;
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Constructs the internal representation of the Gmail service.
|
80 |
+
*
|
81 |
+
* @param Google_Client $client
|
82 |
+
*/
|
83 |
+
public function __construct(Google_Client $client)
|
84 |
+
{
|
85 |
+
parent::__construct($client);
|
86 |
+
$this->rootUrl = 'https://www.googleapis.com/';
|
87 |
+
$this->servicePath = 'gmail/v1/users/';
|
88 |
+
$this->batchPath = 'batch/gmail/v1';
|
89 |
+
$this->version = 'v1';
|
90 |
+
$this->serviceName = 'gmail';
|
91 |
+
|
92 |
+
$this->users = new Google_Service_Gmail_Resource_Users(
|
93 |
+
$this,
|
94 |
+
$this->serviceName,
|
95 |
+
'users',
|
96 |
+
array(
|
97 |
+
'methods' => array(
|
98 |
+
'getProfile' => array(
|
99 |
+
'path' => '{userId}/profile',
|
100 |
+
'httpMethod' => 'GET',
|
101 |
+
'parameters' => array(
|
102 |
+
'userId' => array(
|
103 |
+
'location' => 'path',
|
104 |
+
'type' => 'string',
|
105 |
+
'required' => true,
|
106 |
+
),
|
107 |
+
),
|
108 |
+
),'stop' => array(
|
109 |
+
'path' => '{userId}/stop',
|
110 |
+
'httpMethod' => 'POST',
|
111 |
+
'parameters' => array(
|
112 |
+
'userId' => array(
|
113 |
+
'location' => 'path',
|
114 |
+
'type' => 'string',
|
115 |
+
'required' => true,
|
116 |
+
),
|
117 |
+
),
|
118 |
+
),'watch' => array(
|
119 |
+
'path' => '{userId}/watch',
|
120 |
+
'httpMethod' => 'POST',
|
121 |
+
'parameters' => array(
|
122 |
+
'userId' => array(
|
123 |
+
'location' => 'path',
|
124 |
+
'type' => 'string',
|
125 |
+
'required' => true,
|
126 |
+
),
|
127 |
+
),
|
128 |
+
),
|
129 |
+
)
|
130 |
+
)
|
131 |
+
);
|
132 |
+
$this->users_drafts = new Google_Service_Gmail_Resource_UsersDrafts(
|
133 |
+
$this,
|
134 |
+
$this->serviceName,
|
135 |
+
'drafts',
|
136 |
+
array(
|
137 |
+
'methods' => array(
|
138 |
+
'create' => array(
|
139 |
+
'path' => '{userId}/drafts',
|
140 |
+
'httpMethod' => 'POST',
|
141 |
+
'parameters' => array(
|
142 |
+
'userId' => array(
|
143 |
+
'location' => 'path',
|
144 |
+
'type' => 'string',
|
145 |
+
'required' => true,
|
146 |
+
),
|
147 |
+
),
|
148 |
+
),'delete' => array(
|
149 |
+
'path' => '{userId}/drafts/{id}',
|
150 |
+
'httpMethod' => 'DELETE',
|
151 |
+
'parameters' => array(
|
152 |
+
'userId' => array(
|
153 |
+
'location' => 'path',
|
154 |
+
'type' => 'string',
|
155 |
+
'required' => true,
|
156 |
+
),
|
157 |
+
'id' => array(
|
158 |
+
'location' => 'path',
|
159 |
+
'type' => 'string',
|
160 |
+
'required' => true,
|
161 |
+
),
|
162 |
+
),
|
163 |
+
),'get' => array(
|
164 |
+
'path' => '{userId}/drafts/{id}',
|
165 |
+
'httpMethod' => 'GET',
|
166 |
+
'parameters' => array(
|
167 |
+
'userId' => array(
|
168 |
+
'location' => 'path',
|
169 |
+
'type' => 'string',
|
170 |
+
'required' => true,
|
171 |
+
),
|
172 |
+
'id' => array(
|
173 |
+
'location' => 'path',
|
174 |
+
'type' => 'string',
|
175 |
+
'required' => true,
|
176 |
+
),
|
177 |
+
'format' => array(
|
178 |
+
'location' => 'query',
|
179 |
+
'type' => 'string',
|
180 |
+
),
|
181 |
+
),
|
182 |
+
),'list' => array(
|
183 |
+
'path' => '{userId}/drafts',
|
184 |
+
'httpMethod' => 'GET',
|
185 |
+
'parameters' => array(
|
186 |
+
'userId' => array(
|
187 |
+
'location' => 'path',
|
188 |
+
'type' => 'string',
|
189 |
+
'required' => true,
|
190 |
+
),
|
191 |
+
'includeSpamTrash' => array(
|
192 |
+
'location' => 'query',
|
193 |
+
'type' => 'boolean',
|
194 |
+
),
|
195 |
+
'maxResults' => array(
|
196 |
+
'location' => 'query',
|
197 |
+
'type' => 'integer',
|
198 |
+
),
|
199 |
+
'pageToken' => array(
|
200 |
+
'location' => 'query',
|
201 |
+
'type' => 'string',
|
202 |
+
),
|
203 |
+
'q' => array(
|
204 |
+
'location' => 'query',
|
205 |
+
'type' => 'string',
|
206 |
+
),
|
207 |
+
),
|
208 |
+
),'send' => array(
|
209 |
+
'path' => '{userId}/drafts/send',
|
210 |
+
'httpMethod' => 'POST',
|
211 |
+
'parameters' => array(
|
212 |
+
'userId' => array(
|
213 |
+
'location' => 'path',
|
214 |
+
'type' => 'string',
|
215 |
+
'required' => true,
|
216 |
+
),
|
217 |
+
),
|
218 |
+
),'update' => array(
|
219 |
+
'path' => '{userId}/drafts/{id}',
|
220 |
+
'httpMethod' => 'PUT',
|
221 |
+
'parameters' => array(
|
222 |
+
'userId' => array(
|
223 |
+
'location' => 'path',
|
224 |
+
'type' => 'string',
|
225 |
+
'required' => true,
|
226 |
+
),
|
227 |
+
'id' => array(
|
228 |
+
'location' => 'path',
|
229 |
+
'type' => 'string',
|
230 |
+
'required' => true,
|
231 |
+
),
|
232 |
+
),
|
233 |
+
),
|
234 |
+
)
|
235 |
+
)
|
236 |
+
);
|
237 |
+
$this->users_history = new Google_Service_Gmail_Resource_UsersHistory(
|
238 |
+
$this,
|
239 |
+
$this->serviceName,
|
240 |
+
'history',
|
241 |
+
array(
|
242 |
+
'methods' => array(
|
243 |
+
'list' => array(
|
244 |
+
'path' => '{userId}/history',
|
245 |
+
'httpMethod' => 'GET',
|
246 |
+
'parameters' => array(
|
247 |
+
'userId' => array(
|
248 |
+
'location' => 'path',
|
249 |
+
'type' => 'string',
|
250 |
+
'required' => true,
|
251 |
+
),
|
252 |
+
'historyTypes' => array(
|
253 |
+
'location' => 'query',
|
254 |
+
'type' => 'string',
|
255 |
+
'repeated' => true,
|
256 |
+
),
|
257 |
+
'labelId' => array(
|
258 |
+
'location' => 'query',
|
259 |
+
'type' => 'string',
|
260 |
+
),
|
261 |
+
'maxResults' => array(
|
262 |
+
'location' => 'query',
|
263 |
+
'type' => 'integer',
|
264 |
+
),
|
265 |
+
'pageToken' => array(
|
266 |
+
'location' => 'query',
|
267 |
+
'type' => 'string',
|
268 |
+
),
|
269 |
+
'startHistoryId' => array(
|
270 |
+
'location' => 'query',
|
271 |
+
'type' => 'string',
|
272 |
+
),
|
273 |
+
),
|
274 |
+
),
|
275 |
+
)
|
276 |
+
)
|
277 |
+
);
|
278 |
+
$this->users_labels = new Google_Service_Gmail_Resource_UsersLabels(
|
279 |
+
$this,
|
280 |
+
$this->serviceName,
|
281 |
+
'labels',
|
282 |
+
array(
|
283 |
+
'methods' => array(
|
284 |
+
'create' => array(
|
285 |
+
'path' => '{userId}/labels',
|
286 |
+
'httpMethod' => 'POST',
|
287 |
+
'parameters' => array(
|
288 |
+
'userId' => array(
|
289 |
+
'location' => 'path',
|
290 |
+
'type' => 'string',
|
291 |
+
'required' => true,
|
292 |
+
),
|
293 |
+
),
|
294 |
+
),'delete' => array(
|
295 |
+
'path' => '{userId}/labels/{id}',
|
296 |
+
'httpMethod' => 'DELETE',
|
297 |
+
'parameters' => array(
|
298 |
+
'userId' => array(
|
299 |
+
'location' => 'path',
|
300 |
+
'type' => 'string',
|
301 |
+
'required' => true,
|
302 |
+
),
|
303 |
+
'id' => array(
|
304 |
+
'location' => 'path',
|
305 |
+
'type' => 'string',
|
306 |
+
'required' => true,
|
307 |
+
),
|
308 |
+
),
|
309 |
+
),'get' => array(
|
310 |
+
'path' => '{userId}/labels/{id}',
|
311 |
+
'httpMethod' => 'GET',
|
312 |
+
'parameters' => array(
|
313 |
+
'userId' => array(
|
314 |
+
'location' => 'path',
|
315 |
+
'type' => 'string',
|
316 |
+
'required' => true,
|
317 |
+
),
|
318 |
+
'id' => array(
|
319 |
+
'location' => 'path',
|
320 |
+
'type' => 'string',
|
321 |
+
'required' => true,
|
322 |
+
),
|
323 |
+
),
|
324 |
+
),'list' => array(
|
325 |
+
'path' => '{userId}/labels',
|
326 |
+
'httpMethod' => 'GET',
|
327 |
+
'parameters' => array(
|
328 |
+
'userId' => array(
|
329 |
+
'location' => 'path',
|
330 |
+
'type' => 'string',
|
331 |
+
'required' => true,
|
332 |
+
),
|
333 |
+
),
|
334 |
+
),'patch' => array(
|
335 |
+
'path' => '{userId}/labels/{id}',
|
336 |
+
'httpMethod' => 'PATCH',
|
337 |
+
'parameters' => array(
|
338 |
+
'userId' => array(
|
339 |
+
'location' => 'path',
|
340 |
+
'type' => 'string',
|
341 |
+
'required' => true,
|
342 |
+
),
|
343 |
+
'id' => array(
|
344 |
+
'location' => 'path',
|
345 |
+
'type' => 'string',
|
346 |
+
'required' => true,
|
347 |
+
),
|
348 |
+
),
|
349 |
+
),'update' => array(
|
350 |
+
'path' => '{userId}/labels/{id}',
|
351 |
+
'httpMethod' => 'PUT',
|
352 |
+
'parameters' => array(
|
353 |
+
'userId' => array(
|
354 |
+
'location' => 'path',
|
355 |
+
'type' => 'string',
|
356 |
+
'required' => true,
|
357 |
+
),
|
358 |
+
'id' => array(
|
359 |
+
'location' => 'path',
|
360 |
+
'type' => 'string',
|
361 |
+
'required' => true,
|
362 |
+
),
|
363 |
+
),
|
364 |
+
),
|
365 |
+
)
|
366 |
+
)
|
367 |
+
);
|
368 |
+
$this->users_messages = new Google_Service_Gmail_Resource_UsersMessages(
|
369 |
+
$this,
|
370 |
+
$this->serviceName,
|
371 |
+
'messages',
|
372 |
+
array(
|
373 |
+
'methods' => array(
|
374 |
+
'batchDelete' => array(
|
375 |
+
'path' => '{userId}/messages/batchDelete',
|
376 |
+
'httpMethod' => 'POST',
|
377 |
+
'parameters' => array(
|
378 |
+
'userId' => array(
|
379 |
+
'location' => 'path',
|
380 |
+
'type' => 'string',
|
381 |
+
'required' => true,
|
382 |
+
),
|
383 |
+
),
|
384 |
+
),'batchModify' => array(
|
385 |
+
'path' => '{userId}/messages/batchModify',
|
386 |
+
'httpMethod' => 'POST',
|
387 |
+
'parameters' => array(
|
388 |
+
'userId' => array(
|
389 |
+
'location' => 'path',
|
390 |
+
'type' => 'string',
|
391 |
+
'required' => true,
|
392 |
+
),
|
393 |
+
),
|
394 |
+
),'delete' => array(
|
395 |
+
'path' => '{userId}/messages/{id}',
|
396 |
+
'httpMethod' => 'DELETE',
|
397 |
+
'parameters' => array(
|
398 |
+
'userId' => array(
|
399 |
+
'location' => 'path',
|
400 |
+
'type' => 'string',
|
401 |
+
'required' => true,
|
402 |
+
),
|
403 |
+
'id' => array(
|
404 |
+
'location' => 'path',
|
405 |
+
'type' => 'string',
|
406 |
+
'required' => true,
|
407 |
+
),
|
408 |
+
),
|
409 |
+
),'get' => array(
|
410 |
+
'path' => '{userId}/messages/{id}',
|
411 |
+
'httpMethod' => 'GET',
|
412 |
+
'parameters' => array(
|
413 |
+
'userId' => array(
|
414 |
+
'location' => 'path',
|
415 |
+
'type' => 'string',
|
416 |
+
'required' => true,
|
417 |
+
),
|
418 |
+
'id' => array(
|
419 |
+
'location' => 'path',
|
420 |
+
'type' => 'string',
|
421 |
+
'required' => true,
|
422 |
+
),
|
423 |
+
'format' => array(
|
424 |
+
'location' => 'query',
|
425 |
+
'type' => 'string',
|
426 |
+
),
|
427 |
+
'metadataHeaders' => array(
|
428 |
+
'location' => 'query',
|
429 |
+
'type' => 'string',
|
430 |
+
'repeated' => true,
|
431 |
+
),
|
432 |
+
),
|
433 |
+
),'import' => array(
|
434 |
+
'path' => '{userId}/messages/import',
|
435 |
+
'httpMethod' => 'POST',
|
436 |
+
'parameters' => array(
|
437 |
+
'userId' => array(
|
438 |
+
'location' => 'path',
|
439 |
+
'type' => 'string',
|
440 |
+
'required' => true,
|
441 |
+
),
|
442 |
+
'deleted' => array(
|
443 |
+
'location' => 'query',
|
444 |
+
'type' => 'boolean',
|
445 |
+
),
|
446 |
+
'internalDateSource' => array(
|
447 |
+
'location' => 'query',
|
448 |
+
'type' => 'string',
|
449 |
+
),
|
450 |
+
'neverMarkSpam' => array(
|
451 |
+
'location' => 'query',
|
452 |
+
'type' => 'boolean',
|
453 |
+
),
|
454 |
+
'processForCalendar' => array(
|
455 |
+
'location' => 'query',
|
456 |
+
'type' => 'boolean',
|
457 |
+
),
|
458 |
+
),
|
459 |
+
),'insert' => array(
|
460 |
+
'path' => '{userId}/messages',
|
461 |
+
'httpMethod' => 'POST',
|
462 |
+
'parameters' => array(
|
463 |
+
'userId' => array(
|
464 |
+
'location' => 'path',
|
465 |
+
'type' => 'string',
|
466 |
+
'required' => true,
|
467 |
+
),
|
468 |
+
'deleted' => array(
|
469 |
+
'location' => 'query',
|
470 |
+
'type' => 'boolean',
|
471 |
+
),
|
472 |
+
'internalDateSource' => array(
|
473 |
+
'location' => 'query',
|
474 |
+
'type' => 'string',
|
475 |
+
),
|
476 |
+
),
|
477 |
+
),'list' => array(
|
478 |
+
'path' => '{userId}/messages',
|
479 |
+
'httpMethod' => 'GET',
|
480 |
+
'parameters' => array(
|
481 |
+
'userId' => array(
|
482 |
+
'location' => 'path',
|
483 |
+
'type' => 'string',
|
484 |
+
'required' => true,
|
485 |
+
),
|
486 |
+
'includeSpamTrash' => array(
|
487 |
+
'location' => 'query',
|
488 |
+
'type' => 'boolean',
|
489 |
+
),
|
490 |
+
'labelIds' => array(
|
491 |
+
'location' => 'query',
|
492 |
+
'type' => 'string',
|
493 |
+
'repeated' => true,
|
494 |
+
),
|
495 |
+
'maxResults' => array(
|
496 |
+
'location' => 'query',
|
497 |
+
'type' => 'integer',
|
498 |
+
),
|
499 |
+
'pageToken' => array(
|
500 |
+
'location' => 'query',
|
501 |
+
'type' => 'string',
|
502 |
+
),
|
503 |
+
'q' => array(
|
504 |
+
'location' => 'query',
|
505 |
+
'type' => 'string',
|
506 |
+
),
|
507 |
+
),
|
508 |
+
),'modify' => array(
|
509 |
+
'path' => '{userId}/messages/{id}/modify',
|
510 |
+
'httpMethod' => 'POST',
|
511 |
+
'parameters' => array(
|
512 |
+
'userId' => array(
|
513 |
+
'location' => 'path',
|
514 |
+
'type' => 'string',
|
515 |
+
'required' => true,
|
516 |
+
),
|
517 |
+
'id' => array(
|
518 |
+
'location' => 'path',
|
519 |
+
'type' => 'string',
|
520 |
+
'required' => true,
|
521 |
+
),
|
522 |
+
),
|
523 |
+
),'send' => array(
|
524 |
+
'path' => '{userId}/messages/send',
|
525 |
+
'httpMethod' => 'POST',
|
526 |
+
'parameters' => array(
|
527 |
+
'userId' => array(
|
528 |
+
'location' => 'path',
|
529 |
+
'type' => 'string',
|
530 |
+
'required' => true,
|
531 |
+
),
|
532 |
+
),
|
533 |
+
),'trash' => array(
|
534 |
+
'path' => '{userId}/messages/{id}/trash',
|
535 |
+
'httpMethod' => 'POST',
|
536 |
+
'parameters' => array(
|
537 |
+
'userId' => array(
|
538 |
+
'location' => 'path',
|
539 |
+
'type' => 'string',
|
540 |
+
'required' => true,
|
541 |
+
),
|
542 |
+
'id' => array(
|
543 |
+
'location' => 'path',
|
544 |
+
'type' => 'string',
|
545 |
+
'required' => true,
|
546 |
+
),
|
547 |
+
),
|
548 |
+
),'untrash' => array(
|
549 |
+
'path' => '{userId}/messages/{id}/untrash',
|
550 |
+
'httpMethod' => 'POST',
|
551 |
+
'parameters' => array(
|
552 |
+
'userId' => array(
|
553 |
+
'location' => 'path',
|
554 |
+
'type' => 'string',
|
555 |
+
'required' => true,
|
556 |
+
),
|
557 |
+
'id' => array(
|
558 |
+
'location' => 'path',
|
559 |
+
'type' => 'string',
|
560 |
+
'required' => true,
|
561 |
+
),
|
562 |
+
),
|
563 |
+
),
|
564 |
+
)
|
565 |
+
)
|
566 |
+
);
|
567 |
+
$this->users_messages_attachments = new Google_Service_Gmail_Resource_UsersMessagesAttachments(
|
568 |
+
$this,
|
569 |
+
$this->serviceName,
|
570 |
+
'attachments',
|
571 |
+
array(
|
572 |
+
'methods' => array(
|
573 |
+
'get' => array(
|
574 |
+
'path' => '{userId}/messages/{messageId}/attachments/{id}',
|
575 |
+
'httpMethod' => 'GET',
|
576 |
+
'parameters' => array(
|
577 |
+
'userId' => array(
|
578 |
+
'location' => 'path',
|
579 |
+
'type' => 'string',
|
580 |
+
'required' => true,
|
581 |
+
),
|
582 |
+
'messageId' => array(
|
583 |
+
'location' => 'path',
|
584 |
+
'type' => 'string',
|
585 |
+
'required' => true,
|
586 |
+
),
|
587 |
+
'id' => array(
|
588 |
+
'location' => 'path',
|
589 |
+
'type' => 'string',
|
590 |
+
'required' => true,
|
591 |
+
),
|
592 |
+
),
|
593 |
+
),
|
594 |
+
)
|
595 |
+
)
|
596 |
+
);
|
597 |
+
$this->users_settings = new Google_Service_Gmail_Resource_UsersSettings(
|
598 |
+
$this,
|
599 |
+
$this->serviceName,
|
600 |
+
'settings',
|
601 |
+
array(
|
602 |
+
'methods' => array(
|
603 |
+
'getAutoForwarding' => array(
|
604 |
+
'path' => '{userId}/settings/autoForwarding',
|
605 |
+
'httpMethod' => 'GET',
|
606 |
+
'parameters' => array(
|
607 |
+
'userId' => array(
|
608 |
+
'location' => 'path',
|
609 |
+
'type' => 'string',
|
610 |
+
'required' => true,
|
611 |
+
),
|
612 |
+
),
|
613 |
+
),'getImap' => array(
|
614 |
+
'path' => '{userId}/settings/imap',
|
615 |
+
'httpMethod' => 'GET',
|
616 |
+
'parameters' => array(
|
617 |
+
'userId' => array(
|
618 |
+
'location' => 'path',
|
619 |
+
'type' => 'string',
|
620 |
+
'required' => true,
|
621 |
+
),
|
622 |
+
),
|
623 |
+
),'getLanguage' => array(
|
624 |
+
'path' => '{userId}/settings/language',
|
625 |
+
'httpMethod' => 'GET',
|
626 |
+
'parameters' => array(
|
627 |
+
'userId' => array(
|
628 |
+
'location' => 'path',
|
629 |
+
'type' => 'string',
|
630 |
+
'required' => true,
|
631 |
+
),
|
632 |
+
),
|
633 |
+
),'getPop' => array(
|
634 |
+
'path' => '{userId}/settings/pop',
|
635 |
+
'httpMethod' => 'GET',
|
636 |
+
'parameters' => array(
|
637 |
+
'userId' => array(
|
638 |
+
'location' => 'path',
|
639 |
+
'type' => 'string',
|
640 |
+
'required' => true,
|
641 |
+
),
|
642 |
+
),
|
643 |
+
),'getVacation' => array(
|
644 |
+
'path' => '{userId}/settings/vacation',
|
645 |
+
'httpMethod' => 'GET',
|
646 |
+
'parameters' => array(
|
647 |
+
'userId' => array(
|
648 |
+
'location' => 'path',
|
649 |
+
'type' => 'string',
|
650 |
+
'required' => true,
|
651 |
+
),
|
652 |
+
),
|
653 |
+
),'updateAutoForwarding' => array(
|
654 |
+
'path' => '{userId}/settings/autoForwarding',
|
655 |
+
'httpMethod' => 'PUT',
|
656 |
+
'parameters' => array(
|
657 |
+
'userId' => array(
|
658 |
+
'location' => 'path',
|
659 |
+
'type' => 'string',
|
660 |
+
'required' => true,
|
661 |
+
),
|
662 |
+
),
|
663 |
+
),'updateImap' => array(
|
664 |
+
'path' => '{userId}/settings/imap',
|
665 |
+
'httpMethod' => 'PUT',
|
666 |
+
'parameters' => array(
|
667 |
+
'userId' => array(
|
668 |
+
'location' => 'path',
|
669 |
+
'type' => 'string',
|
670 |
+
'required' => true,
|
671 |
+
),
|
672 |
+
),
|
673 |
+
),'updateLanguage' => array(
|
674 |
+
'path' => '{userId}/settings/language',
|
675 |
+
'httpMethod' => 'PUT',
|
676 |
+
'parameters' => array(
|
677 |
+
'userId' => array(
|
678 |
+
'location' => 'path',
|
679 |
+
'type' => 'string',
|
680 |
+
'required' => true,
|
681 |
+
),
|
682 |
+
),
|
683 |
+
),'updatePop' => array(
|
684 |
+
'path' => '{userId}/settings/pop',
|
685 |
+
'httpMethod' => 'PUT',
|
686 |
+
'parameters' => array(
|
687 |
+
'userId' => array(
|
688 |
+
'location' => 'path',
|
689 |
+
'type' => 'string',
|
690 |
+
'required' => true,
|
691 |
+
),
|
692 |
+
),
|
693 |
+
),'updateVacation' => array(
|
694 |
+
'path' => '{userId}/settings/vacation',
|
695 |
+
'httpMethod' => 'PUT',
|
696 |
+
'parameters' => array(
|
697 |
+
'userId' => array(
|
698 |
+
'location' => 'path',
|
699 |
+
'type' => 'string',
|
700 |
+
'required' => true,
|
701 |
+
),
|
702 |
+
),
|
703 |
+
),
|
704 |
+
)
|
705 |
+
)
|
706 |
+
);
|
707 |
+
$this->users_settings_delegates = new Google_Service_Gmail_Resource_UsersSettingsDelegates(
|
708 |
+
$this,
|
709 |
+
$this->serviceName,
|
710 |
+
'delegates',
|
711 |
+
array(
|
712 |
+
'methods' => array(
|
713 |
+
'create' => array(
|
714 |
+
'path' => '{userId}/settings/delegates',
|
715 |
+
'httpMethod' => 'POST',
|
716 |
+
'parameters' => array(
|
717 |
+
'userId' => array(
|
718 |
+
'location' => 'path',
|
719 |
+
'type' => 'string',
|
720 |
+
'required' => true,
|
721 |
+
),
|
722 |
+
),
|
723 |
+
),'delete' => array(
|
724 |
+
'path' => '{userId}/settings/delegates/{delegateEmail}',
|
725 |
+
'httpMethod' => 'DELETE',
|
726 |
+
'parameters' => array(
|
727 |
+
'userId' => array(
|
728 |
+
'location' => 'path',
|
729 |
+
'type' => 'string',
|
730 |
+
'required' => true,
|
731 |
+
),
|
732 |
+
'delegateEmail' => array(
|
733 |
+
'location' => 'path',
|
734 |
+
'type' => 'string',
|
735 |
+
'required' => true,
|
736 |
+
),
|
737 |
+
),
|
738 |
+
),'get' => array(
|
739 |
+
'path' => '{userId}/settings/delegates/{delegateEmail}',
|
740 |
+
'httpMethod' => 'GET',
|
741 |
+
'parameters' => array(
|
742 |
+
'userId' => array(
|
743 |
+
'location' => 'path',
|
744 |
+
'type' => 'string',
|
745 |
+
'required' => true,
|
746 |
+
),
|
747 |
+
'delegateEmail' => array(
|
748 |
+
'location' => 'path',
|
749 |
+
'type' => 'string',
|
750 |
+
'required' => true,
|
751 |
+
),
|
752 |
+
),
|
753 |
+
),'list' => array(
|
754 |
+
'path' => '{userId}/settings/delegates',
|
755 |
+
'httpMethod' => 'GET',
|
756 |
+
'parameters' => array(
|
757 |
+
'userId' => array(
|
758 |
+
'location' => 'path',
|
759 |
+
'type' => 'string',
|
760 |
+
'required' => true,
|
761 |
+
),
|
762 |
+
),
|
763 |
+
),
|
764 |
+
)
|
765 |
+
)
|
766 |
+
);
|
767 |
+
$this->users_settings_filters = new Google_Service_Gmail_Resource_UsersSettingsFilters(
|
768 |
+
$this,
|
769 |
+
$this->serviceName,
|
770 |
+
'filters',
|
771 |
+
array(
|
772 |
+
'methods' => array(
|
773 |
+
'create' => array(
|
774 |
+
'path' => '{userId}/settings/filters',
|
775 |
+
'httpMethod' => 'POST',
|
776 |
+
'parameters' => array(
|
777 |
+
'userId' => array(
|
778 |
+
'location' => 'path',
|
779 |
+
'type' => 'string',
|
780 |
+
'required' => true,
|
781 |
+
),
|
782 |
+
),
|
783 |
+
),'delete' => array(
|
784 |
+
'path' => '{userId}/settings/filters/{id}',
|
785 |
+
'httpMethod' => 'DELETE',
|
786 |
+
'parameters' => array(
|
787 |
+
'userId' => array(
|
788 |
+
'location' => 'path',
|
789 |
+
'type' => 'string',
|
790 |
+
'required' => true,
|
791 |
+
),
|
792 |
+
'id' => array(
|
793 |
+
'location' => 'path',
|
794 |
+
'type' => 'string',
|
795 |
+
'required' => true,
|
796 |
+
),
|
797 |
+
),
|
798 |
+
),'get' => array(
|
799 |
+
'path' => '{userId}/settings/filters/{id}',
|
800 |
+
'httpMethod' => 'GET',
|
801 |
+
'parameters' => array(
|
802 |
+
'userId' => array(
|
803 |
+
'location' => 'path',
|
804 |
+
'type' => 'string',
|
805 |
+
'required' => true,
|
806 |
+
),
|
807 |
+
'id' => array(
|
808 |
+
'location' => 'path',
|
809 |
+
'type' => 'string',
|
810 |
+
'required' => true,
|
811 |
+
),
|
812 |
+
),
|
813 |
+
),'list' => array(
|
814 |
+
'path' => '{userId}/settings/filters',
|
815 |
+
'httpMethod' => 'GET',
|
816 |
+
'parameters' => array(
|
817 |
+
'userId' => array(
|
818 |
+
'location' => 'path',
|
819 |
+
'type' => 'string',
|
820 |
+
'required' => true,
|
821 |
+
),
|
822 |
+
),
|
823 |
+
),
|
824 |
+
)
|
825 |
+
)
|
826 |
+
);
|
827 |
+
$this->users_settings_forwardingAddresses = new Google_Service_Gmail_Resource_UsersSettingsForwardingAddresses(
|
828 |
+
$this,
|
829 |
+
$this->serviceName,
|
830 |
+
'forwardingAddresses',
|
831 |
+
array(
|
832 |
+
'methods' => array(
|
833 |
+
'create' => array(
|
834 |
+
'path' => '{userId}/settings/forwardingAddresses',
|
835 |
+
'httpMethod' => 'POST',
|
836 |
+
'parameters' => array(
|
837 |
+
'userId' => array(
|
838 |
+
'location' => 'path',
|
839 |
+
'type' => 'string',
|
840 |
+
'required' => true,
|
841 |
+
),
|
842 |
+
),
|
843 |
+
),'delete' => array(
|
844 |
+
'path' => '{userId}/settings/forwardingAddresses/{forwardingEmail}',
|
845 |
+
'httpMethod' => 'DELETE',
|
846 |
+
'parameters' => array(
|
847 |
+
'userId' => array(
|
848 |
+
'location' => 'path',
|
849 |
+
'type' => 'string',
|
850 |
+
'required' => true,
|
851 |
+
),
|
852 |
+
'forwardingEmail' => array(
|
853 |
+
'location' => 'path',
|
854 |
+
'type' => 'string',
|
855 |
+
'required' => true,
|
856 |
+
),
|
857 |
+
),
|
858 |
+
),'get' => array(
|
859 |
+
'path' => '{userId}/settings/forwardingAddresses/{forwardingEmail}',
|
860 |
+
'httpMethod' => 'GET',
|
861 |
+
'parameters' => array(
|
862 |
+
'userId' => array(
|
863 |
+
'location' => 'path',
|
864 |
+
'type' => 'string',
|
865 |
+
'required' => true,
|
866 |
+
),
|
867 |
+
'forwardingEmail' => array(
|
868 |
+
'location' => 'path',
|
869 |
+
'type' => 'string',
|
870 |
+
'required' => true,
|
871 |
+
),
|
872 |
+
),
|
873 |
+
),'list' => array(
|
874 |
+
'path' => '{userId}/settings/forwardingAddresses',
|
875 |
+
'httpMethod' => 'GET',
|
876 |
+
'parameters' => array(
|
877 |
+
'userId' => array(
|
878 |
+
'location' => 'path',
|
879 |
+
'type' => 'string',
|
880 |
+
'required' => true,
|
881 |
+
),
|
882 |
+
),
|
883 |
+
),
|
884 |
+
)
|
885 |
+
)
|
886 |
+
);
|
887 |
+
$this->users_settings_sendAs = new Google_Service_Gmail_Resource_UsersSettingsSendAs(
|
888 |
+
$this,
|
889 |
+
$this->serviceName,
|
890 |
+
'sendAs',
|
891 |
+
array(
|
892 |
+
'methods' => array(
|
893 |
+
'create' => array(
|
894 |
+
'path' => '{userId}/settings/sendAs',
|
895 |
+
'httpMethod' => 'POST',
|
896 |
+
'parameters' => array(
|
897 |
+
'userId' => array(
|
898 |
+
'location' => 'path',
|
899 |
+
'type' => 'string',
|
900 |
+
'required' => true,
|
901 |
+
),
|
902 |
+
),
|
903 |
+
),'delete' => array(
|
904 |
+
'path' => '{userId}/settings/sendAs/{sendAsEmail}',
|
905 |
+
'httpMethod' => 'DELETE',
|
906 |
+
'parameters' => array(
|
907 |
+
'userId' => array(
|
908 |
+
'location' => 'path',
|
909 |
+
'type' => 'string',
|
910 |
+
'required' => true,
|
911 |
+
),
|
912 |
+
'sendAsEmail' => array(
|
913 |
+
'location' => 'path',
|
914 |
+
'type' => 'string',
|
915 |
+
'required' => true,
|
916 |
+
),
|
917 |
+
),
|
918 |
+
),'get' => array(
|
919 |
+
'path' => '{userId}/settings/sendAs/{sendAsEmail}',
|
920 |
+
'httpMethod' => 'GET',
|
921 |
+
'parameters' => array(
|
922 |
+
'userId' => array(
|
923 |
+
'location' => 'path',
|
924 |
+
'type' => 'string',
|
925 |
+
'required' => true,
|
926 |
+
),
|
927 |
+
'sendAsEmail' => array(
|
928 |
+
'location' => 'path',
|
929 |
+
'type' => 'string',
|
930 |
+
'required' => true,
|
931 |
+
),
|
932 |
+
),
|
933 |
+
),'list' => array(
|
934 |
+
'path' => '{userId}/settings/sendAs',
|
935 |
+
'httpMethod' => 'GET',
|
936 |
+
'parameters' => array(
|
937 |
+
'userId' => array(
|
938 |
+
'location' => 'path',
|
939 |
+
'type' => 'string',
|
940 |
+
'required' => true,
|
941 |
+
),
|
942 |
+
),
|
943 |
+
),'patch' => array(
|
944 |
+
'path' => '{userId}/settings/sendAs/{sendAsEmail}',
|
945 |
+
'httpMethod' => 'PATCH',
|
946 |
+
'parameters' => array(
|
947 |
+
'userId' => array(
|
948 |
+
'location' => 'path',
|
949 |
+
'type' => 'string',
|
950 |
+
'required' => true,
|
951 |
+
),
|
952 |
+
'sendAsEmail' => array(
|
953 |
+
'location' => 'path',
|
954 |
+
'type' => 'string',
|
955 |
+
'required' => true,
|
956 |
+
),
|
957 |
+
),
|
958 |
+
),'update' => array(
|
959 |
+
'path' => '{userId}/settings/sendAs/{sendAsEmail}',
|
960 |
+
'httpMethod' => 'PUT',
|
961 |
+
'parameters' => array(
|
962 |
+
'userId' => array(
|
963 |
+
'location' => 'path',
|
964 |
+
'type' => 'string',
|
965 |
+
'required' => true,
|
966 |
+
),
|
967 |
+
'sendAsEmail' => array(
|
968 |
+
'location' => 'path',
|
969 |
+
'type' => 'string',
|
970 |
+
'required' => true,
|
971 |
+
),
|
972 |
+
),
|
973 |
+
),'verify' => array(
|
974 |
+
'path' => '{userId}/settings/sendAs/{sendAsEmail}/verify',
|
975 |
+
'httpMethod' => 'POST',
|
976 |
+
'parameters' => array(
|
977 |
+
'userId' => array(
|
978 |
+
'location' => 'path',
|
979 |
+
'type' => 'string',
|
980 |
+
'required' => true,
|
981 |
+
),
|
982 |
+
'sendAsEmail' => array(
|
983 |
+
'location' => 'path',
|
984 |
+
'type' => 'string',
|
985 |
+
'required' => true,
|
986 |
+
),
|
987 |
+
),
|
988 |
+
),
|
989 |
+
)
|
990 |
+
)
|
991 |
+
);
|
992 |
+
$this->users_settings_sendAs_smimeInfo = new Google_Service_Gmail_Resource_UsersSettingsSendAsSmimeInfo(
|
993 |
+
$this,
|
994 |
+
$this->serviceName,
|
995 |
+
'smimeInfo',
|
996 |
+
array(
|
997 |
+
'methods' => array(
|
998 |
+
'delete' => array(
|
999 |
+
'path' => '{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}',
|
1000 |
+
'httpMethod' => 'DELETE',
|
1001 |
+
'parameters' => array(
|
1002 |
+
'userId' => array(
|
1003 |
+
'location' => 'path',
|
1004 |
+
'type' => 'string',
|
1005 |
+
'required' => true,
|
1006 |
+
),
|
1007 |
+
'sendAsEmail' => array(
|
1008 |
+
'location' => 'path',
|
1009 |
+
'type' => 'string',
|
1010 |
+
'required' => true,
|
1011 |
+
),
|
1012 |
+
'id' => array(
|
1013 |
+
'location' => 'path',
|
1014 |
+
'type' => 'string',
|
1015 |
+
'required' => true,
|
1016 |
+
),
|
1017 |
+
),
|
1018 |
+
),'get' => array(
|
1019 |
+
'path' => '{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}',
|
1020 |
+
'httpMethod' => 'GET',
|
1021 |
+
'parameters' => array(
|
1022 |
+
'userId' => array(
|
1023 |
+
'location' => 'path',
|
1024 |
+
'type' => 'string',
|
1025 |
+
'required' => true,
|
1026 |
+
),
|
1027 |
+
'sendAsEmail' => array(
|
1028 |
+
'location' => 'path',
|
1029 |
+
'type' => 'string',
|
1030 |
+
'required' => true,
|
1031 |
+
),
|
1032 |
+
'id' => array(
|
1033 |
+
'location' => 'path',
|
1034 |
+
'type' => 'string',
|
1035 |
+
'required' => true,
|
1036 |
+
),
|
1037 |
+
),
|
1038 |
+
),'insert' => array(
|
1039 |
+
'path' => '{userId}/settings/sendAs/{sendAsEmail}/smimeInfo',
|
1040 |
+
'httpMethod' => 'POST',
|
1041 |
+
'parameters' => array(
|
1042 |
+
'userId' => array(
|
1043 |
+
'location' => 'path',
|
1044 |
+
'type' => 'string',
|
1045 |
+
'required' => true,
|
1046 |
+
),
|
1047 |
+
'sendAsEmail' => array(
|
1048 |
+
'location' => 'path',
|
1049 |
+
'type' => 'string',
|
1050 |
+
'required' => true,
|
1051 |
+
),
|
1052 |
+
),
|
1053 |
+
),'list' => array(
|
1054 |
+
'path' => '{userId}/settings/sendAs/{sendAsEmail}/smimeInfo',
|
1055 |
+
'httpMethod' => 'GET',
|
1056 |
+
'parameters' => array(
|
1057 |
+
'userId' => array(
|
1058 |
+
'location' => 'path',
|
1059 |
+
'type' => 'string',
|
1060 |
+
'required' => true,
|
1061 |
+
),
|
1062 |
+
'sendAsEmail' => array(
|
1063 |
+
'location' => 'path',
|
1064 |
+
'type' => 'string',
|
1065 |
+
'required' => true,
|
1066 |
+
),
|
1067 |
+
),
|
1068 |
+
),'setDefault' => array(
|
1069 |
+
'path' => '{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}/setDefault',
|
1070 |
+
'httpMethod' => 'POST',
|
1071 |
+
'parameters' => array(
|
1072 |
+
'userId' => array(
|
1073 |
+
'location' => 'path',
|
1074 |
+
'type' => 'string',
|
1075 |
+
'required' => true,
|
1076 |
+
),
|
1077 |
+
'sendAsEmail' => array(
|
1078 |
+
'location' => 'path',
|
1079 |
+
'type' => 'string',
|
1080 |
+
'required' => true,
|
1081 |
+
),
|
1082 |
+
'id' => array(
|
1083 |
+
'location' => 'path',
|
1084 |
+
'type' => 'string',
|
1085 |
+
'required' => true,
|
1086 |
+
),
|
1087 |
+
),
|
1088 |
+
),
|
1089 |
+
)
|
1090 |
+
)
|
1091 |
+
);
|
1092 |
+
$this->users_threads = new Google_Service_Gmail_Resource_UsersThreads(
|
1093 |
+
$this,
|
1094 |
+
$this->serviceName,
|
1095 |
+
'threads',
|
1096 |
+
array(
|
1097 |
+
'methods' => array(
|
1098 |
+
'delete' => array(
|
1099 |
+
'path' => '{userId}/threads/{id}',
|
1100 |
+
'httpMethod' => 'DELETE',
|
1101 |
+
'parameters' => array(
|
1102 |
+
'userId' => array(
|
1103 |
+
'location' => 'path',
|
1104 |
+
'type' => 'string',
|
1105 |
+
'required' => true,
|
1106 |
+
),
|
1107 |
+
'id' => array(
|
1108 |
+
'location' => 'path',
|
1109 |
+
'type' => 'string',
|
1110 |
+
'required' => true,
|
1111 |
+
),
|
1112 |
+
),
|
1113 |
+
),'get' => array(
|
1114 |
+
'path' => '{userId}/threads/{id}',
|
1115 |
+
'httpMethod' => 'GET',
|
1116 |
+
'parameters' => array(
|
1117 |
+
'userId' => array(
|
1118 |
+
'location' => 'path',
|
1119 |
+
'type' => 'string',
|
1120 |
+
'required' => true,
|
1121 |
+
),
|
1122 |
+
'id' => array(
|
1123 |
+
'location' => 'path',
|
1124 |
+
'type' => 'string',
|
1125 |
+
'required' => true,
|
1126 |
+
),
|
1127 |
+
'format' => array(
|
1128 |
+
'location' => 'query',
|
1129 |
+
'type' => 'string',
|
1130 |
+
),
|
1131 |
+
'metadataHeaders' => array(
|
1132 |
+
'location' => 'query',
|
1133 |
+
'type' => 'string',
|
1134 |
+
'repeated' => true,
|
1135 |
+
),
|
1136 |
+
),
|
1137 |
+
),'list' => array(
|
1138 |
+
'path' => '{userId}/threads',
|
1139 |
+
'httpMethod' => 'GET',
|
1140 |
+
'parameters' => array(
|
1141 |
+
'userId' => array(
|
1142 |
+
'location' => 'path',
|
1143 |
+
'type' => 'string',
|
1144 |
+
'required' => true,
|
1145 |
+
),
|
1146 |
+
'includeSpamTrash' => array(
|
1147 |
+
'location' => 'query',
|
1148 |
+
'type' => 'boolean',
|
1149 |
+
),
|
1150 |
+
'labelIds' => array(
|
1151 |
+
'location' => 'query',
|
1152 |
+
'type' => 'string',
|
1153 |
+
'repeated' => true,
|
1154 |
+
),
|
1155 |
+
'maxResults' => array(
|
1156 |
+
'location' => 'query',
|
1157 |
+
'type' => 'integer',
|
1158 |
+
),
|
1159 |
+
'pageToken' => array(
|
1160 |
+
'location' => 'query',
|
1161 |
+
'type' => 'string',
|
1162 |
+
),
|
1163 |
+
'q' => array(
|
1164 |
+
'location' => 'query',
|
1165 |
+
'type' => 'string',
|
1166 |
+
),
|
1167 |
+
),
|
1168 |
+
),'modify' => array(
|
1169 |
+
'path' => '{userId}/threads/{id}/modify',
|
1170 |
+
'httpMethod' => 'POST',
|
1171 |
+
'parameters' => array(
|
1172 |
+
'userId' => array(
|
1173 |
+
'location' => 'path',
|
1174 |
+
'type' => 'string',
|
1175 |
+
'required' => true,
|
1176 |
+
),
|
1177 |
+
'id' => array(
|
1178 |
+
'location' => 'path',
|
1179 |
+
'type' => 'string',
|
1180 |
+
'required' => true,
|
1181 |
+
),
|
1182 |
+
),
|
1183 |
+
),'trash' => array(
|
1184 |
+
'path' => '{userId}/threads/{id}/trash',
|
1185 |
+
'httpMethod' => 'POST',
|
1186 |
+
'parameters' => array(
|
1187 |
+
'userId' => array(
|
1188 |
+
'location' => 'path',
|
1189 |
+
'type' => 'string',
|
1190 |
+
'required' => true,
|
1191 |
+
),
|
1192 |
+
'id' => array(
|
1193 |
+
'location' => 'path',
|
1194 |
+
'type' => 'string',
|
1195 |
+
'required' => true,
|
1196 |
+
),
|
1197 |
+
),
|
1198 |
+
),'untrash' => array(
|
1199 |
+
'path' => '{userId}/threads/{id}/untrash',
|
1200 |
+
'httpMethod' => 'POST',
|
1201 |
+
'parameters' => array(
|
1202 |
+
'userId' => array(
|
1203 |
+
'location' => 'path',
|
1204 |
+
'type' => 'string',
|
1205 |
+
'required' => true,
|
1206 |
+
),
|
1207 |
+
'id' => array(
|
1208 |
+
'location' => 'path',
|
1209 |
+
'type' => 'string',
|
1210 |
+
'required' => true,
|
1211 |
+
),
|
1212 |
+
),
|
1213 |
+
),
|
1214 |
+
)
|
1215 |
+
)
|
1216 |
+
);
|
1217 |
+
}
|
1218 |
+
}
|
vendor/google/apiclient-services/src/Google/Service/Gmail/AutoForwarding.php
CHANGED
@@ -1,48 +1,48 @@
|
|
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_AutoForwarding extends Google_Model
|
19 |
-
{
|
20 |
-
public $disposition;
|
21 |
-
public $emailAddress;
|
22 |
-
public $enabled;
|
23 |
-
|
24 |
-
public function setDisposition($disposition)
|
25 |
-
{
|
26 |
-
$this->disposition = $disposition;
|
27 |
-
}
|
28 |
-
public function getDisposition()
|
29 |
-
{
|
30 |
-
return $this->disposition;
|
31 |
-
}
|
32 |
-
public function setEmailAddress($emailAddress)
|
33 |
-
{
|
34 |
-
$this->emailAddress = $emailAddress;
|
35 |
-
}
|
36 |
-
public function getEmailAddress()
|
37 |
-
{
|
38 |
-
return $this->emailAddress;
|
39 |
-
}
|
40 |
-
public function setEnabled($enabled)
|
41 |
-
{
|
42 |
-
$this->enabled = $enabled;
|
43 |
-
}
|
44 |
-
public function getEnabled()
|
45 |
-
{
|
46 |
-
return $this->enabled;
|
47 |
-
}
|
48 |
-
}
|
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_AutoForwarding extends Google_Model
|
19 |
+
{
|
20 |
+
public $disposition;
|
21 |
+
public $emailAddress;
|
22 |
+
public $enabled;
|
23 |
+
|
24 |
+
public function setDisposition($disposition)
|
25 |
+
{
|
26 |
+
$this->disposition = $disposition;
|
27 |
+
}
|
28 |
+
public function getDisposition()
|
29 |
+
{
|
30 |
+
return $this->disposition;
|
31 |
+
}
|
32 |
+
public function setEmailAddress($emailAddress)
|
33 |
+
{
|
34 |
+
$this->emailAddress = $emailAddress;
|
35 |
+
}
|
36 |
+
public function getEmailAddress()
|
37 |
+
{
|
38 |
+
return $this->emailAddress;
|
39 |
+
}
|
40 |
+
public function setEnabled($enabled)
|
41 |
+
{
|
42 |
+
$this->enabled = $enabled;
|
43 |
+
}
|
44 |
+
public function getEnabled()
|
45 |
+
{
|
46 |
+
return $this->enabled;
|
47 |
+
}
|
48 |
+
}
|
vendor/google/apiclient-services/src/Google/Service/Gmail/BatchDeleteMessagesRequest.php
CHANGED
@@ -1,31 +1,31 @@
|
|
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_BatchDeleteMessagesRequest extends Google_Collection
|
19 |
-
{
|
20 |
-
protected $collection_key = 'ids';
|
21 |
-
public $ids;
|
22 |
-
|
23 |
-
public function setIds($ids)
|
24 |
-
{
|
25 |
-
$this->ids = $ids;
|
26 |
-
}
|
27 |
-
public function getIds()
|
28 |
-
{
|
29 |
-
return $this->ids;
|
30 |
-
}
|
31 |
-
}
|
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_BatchDeleteMessagesRequest extends Google_Collection
|
19 |
+
{
|
20 |
+
protected $collection_key = 'ids';
|
21 |
+
public $ids;
|
22 |
+
|
23 |
+
public function setIds($ids)
|
24 |
+
{
|
25 |
+
$this->ids = $ids;
|
26 |
+
}
|
27 |
+
public function getIds()
|
28 |
+
{
|
29 |
+
return $this->ids;
|
30 |
+
}
|
31 |
+
}
|
vendor/google/apiclient-services/src/Google/Service/Gmail/BatchModifyMessagesRequest.php
CHANGED
@@ -1,49 +1,49 @@
|
|
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_BatchModifyMessagesRequest extends Google_Collection
|
19 |
-
{
|
20 |
-
protected $collection_key = 'removeLabelIds';
|
21 |
-
public $addLabelIds;
|
22 |
-
public $ids;
|
23 |
-
public $removeLabelIds;
|
24 |
-
|
25 |
-
public function setAddLabelIds($addLabelIds)
|
26 |
-
{
|
27 |
-
$this->addLabelIds = $addLabelIds;
|
28 |
-
}
|
29 |
-
public function getAddLabelIds()
|
30 |
-
{
|
31 |
-
return $this->addLabelIds;
|
32 |
-
}
|
33 |
-
public function setIds($ids)
|
34 |
-
{
|
35 |
-
$this->ids = $ids;
|
36 |
-
}
|
37 |
-
public function getIds()
|
38 |
-
{
|
39 |
-
return $this->ids;
|
40 |
-
}
|
41 |
-
public function setRemoveLabelIds($removeLabelIds)
|
42 |
-
{
|
43 |
-
$this->removeLabelIds = $removeLabelIds;
|
44 |
-
}
|
45 |
-
public function getRemoveLabelIds()
|
46 |
-
{
|
47 |
-
return $this->removeLabelIds;
|
48 |
-
}
|
49 |
-
}
|
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_BatchModifyMessagesRequest extends Google_Collection
|
19 |
+
{
|
20 |
+
protected $collection_key = 'removeLabelIds';
|
21 |
+
public $addLabelIds;
|
22 |
+
public $ids;
|
23 |
+
public $removeLabelIds;
|
24 |
+
|
25 |
+
public function setAddLabelIds($addLabelIds)
|
26 |
+
{
|
27 |
+
$this->addLabelIds = $addLabelIds;
|
28 |
+
}
|
29 |
+
public function getAddLabelIds()
|
30 |
+
{
|
31 |
+
return $this->addLabelIds;
|
32 |
+
}
|
33 |
+
public function setIds($ids)
|
34 |
+
{
|
35 |
+
$this->ids = $ids;
|
36 |
+
}
|
37 |
+
public function getIds()
|
38 |
+
{
|
39 |
+
return $this->ids;
|
40 |
+
}
|
41 |
+
public function setRemoveLabelIds($removeLabelIds)
|
42 |
+
{
|
43 |
+
$this->removeLabelIds = $removeLabelIds;
|
44 |
+
}
|
45 |
+
public function getRemoveLabelIds()
|
46 |
+
{
|
47 |
+
return $this->removeLabelIds;
|
48 |
+
}
|
49 |
+
}
|
vendor/google/apiclient-services/src/Google/Service/Gmail/Delegate.php
CHANGED
@@ -1,39 +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 |
-
}
|
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/Draft.php
CHANGED
@@ -1,46 +1,46 @@
|
|
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_Draft extends Google_Model
|
19 |
-
{
|
20 |
-
public $id;
|
21 |
-
protected $messageType = 'Google_Service_Gmail_Message';
|
22 |
-
protected $messageDataType = '';
|
23 |
-
|
24 |
-
public function setId($id)
|
25 |
-
{
|
26 |
-
$this->id = $id;
|
27 |
-
}
|
28 |
-
public function getId()
|
29 |
-
{
|
30 |
-
return $this->id;
|
31 |
-
}
|
32 |
-
/**
|
33 |
-
* @param Google_Service_Gmail_Message
|
34 |
-
*/
|
35 |
-
public function setMessage(Google_Service_Gmail_Message $message)
|
36 |
-
{
|
37 |
-
$this->message = $message;
|
38 |
-
}
|
39 |
-
/**
|
40 |
-
* @return Google_Service_Gmail_Message
|
41 |
-
*/
|
42 |
-
public function getMessage()
|
43 |
-
{
|
44 |
-
return $this->message;
|
45 |
-
}
|
46 |
-
}
|
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_Draft extends Google_Model
|
19 |
+
{
|
20 |
+
public $id;
|
21 |
+
protected $messageType = 'Google_Service_Gmail_Message';
|
22 |
+
protected $messageDataType = '';
|
23 |
+
|
24 |
+
public function setId($id)
|
25 |
+
{
|
26 |
+
$this->id = $id;
|
27 |
+
}
|
28 |
+
public function getId()
|
29 |
+
{
|
30 |
+
return $this->id;
|
31 |
+
}
|
32 |
+
/**
|
33 |
+
* @param Google_Service_Gmail_Message
|
34 |
+
*/
|
35 |
+
public function setMessage(Google_Service_Gmail_Message $message)
|
36 |
+
{
|
37 |
+
$this->message = $message;
|
38 |
+
}
|
39 |
+
/**
|
40 |
+
* @return Google_Service_Gmail_Message
|
41 |
+
*/
|
42 |
+
public function getMessage()
|
43 |
+
{
|
44 |
+
return $this->message;
|
45 |
+
}
|
46 |
+
}
|
vendor/google/apiclient-services/src/Google/Service/Gmail/Filter.php
CHANGED
@@ -1,62 +1,62 @@
|
|
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_Filter extends Google_Model
|
19 |
-
{
|
20 |
-
protected $actionType = 'Google_Service_Gmail_FilterAction';
|
21 |
-
protected $actionDataType = '';
|
22 |
-
protected $criteriaType = 'Google_Service_Gmail_FilterCriteria';
|
23 |
-
protected $criteriaDataType = '';
|
24 |
-
public $id;
|
25 |
-
|
26 |
-
/**
|
27 |
-
* @param Google_Service_Gmail_FilterAction
|
28 |
-
*/
|
29 |
-
public function setAction(Google_Service_Gmail_FilterAction $action)
|
30 |
-
{
|
31 |
-
$this->action = $action;
|
32 |
-
}
|
33 |
-
/**
|
34 |
-
* @return Google_Service_Gmail_FilterAction
|
35 |
-
*/
|
36 |
-
public function getAction()
|
37 |
-
{
|
38 |
-
return $this->action;
|
39 |
-
}
|
40 |
-
/**
|
41 |
-
* @param Google_Service_Gmail_FilterCriteria
|
42 |
-
*/
|
43 |
-
public function setCriteria(Google_Service_Gmail_FilterCriteria $criteria)
|
44 |
-
{
|
45 |
-
$this->criteria = $criteria;
|
46 |
-
}
|
47 |
-
/**
|
48 |
-
* @return Google_Service_Gmail_FilterCriteria
|
49 |
-
*/
|
50 |
-
public function getCriteria()
|
51 |
-
{
|
52 |
-
return $this->criteria;
|
53 |
-
}
|
54 |
-
public function setId($id)
|
55 |
-
{
|
56 |
-
$this->id = $id;
|
57 |
-
}
|
58 |
-
public function getId()
|
59 |
-
{
|
60 |
-
return $this->id;
|
61 |
-
}
|
62 |
-
}
|
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_Filter extends Google_Model
|
19 |
+
{
|
20 |
+
protected $actionType = 'Google_Service_Gmail_FilterAction';
|
21 |
+
protected $actionDataType = '';
|
22 |
+
protected $criteriaType = 'Google_Service_Gmail_FilterCriteria';
|
23 |
+
protected $criteriaDataType = '';
|
24 |
+
public $id;
|
25 |
+
|
26 |
+
/**
|
27 |
+
* @param Google_Service_Gmail_FilterAction
|
28 |
+
*/
|
29 |
+
public function setAction(Google_Service_Gmail_FilterAction $action)
|
30 |
+
{
|
31 |
+
$this->action = $action;
|
32 |
+
}
|
33 |
+
/**
|
34 |
+
* @return Google_Service_Gmail_FilterAction
|
35 |
+
*/
|
36 |
+
public function getAction()
|
37 |
+
{
|
38 |
+
return $this->action;
|
39 |
+
}
|
40 |
+
/**
|
41 |
+
* @param Google_Service_Gmail_FilterCriteria
|
42 |
+
*/
|
43 |
+
public function setCriteria(Google_Service_Gmail_FilterCriteria $criteria)
|
44 |
+
{
|
45 |
+
$this->criteria = $criteria;
|
46 |
+
}
|
47 |
+
/**
|
48 |
+
* @return Google_Service_Gmail_FilterCriteria
|
49 |
+
*/
|
50 |
+
public function getCriteria()
|
51 |
+
{
|
52 |
+
return $this->criteria;
|
53 |
+
}
|
54 |
+
public function setId($id)
|
55 |
+
{
|
56 |
+
$this->id = $id;
|
57 |
+
}
|
58 |
+
public function getId()
|
59 |
+
{
|
60 |
+
return $this->id;
|
61 |
+
}
|
62 |
+
}
|
vendor/google/apiclient-services/src/Google/Service/Gmail/FilterAction.php
CHANGED
@@ -1,49 +1,49 @@
|
|
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_FilterAction extends Google_Collection
|
19 |
-
{
|
20 |
-
protected $collection_key = 'removeLabelIds';
|
21 |
-
public $addLabelIds;
|
22 |
-
public $forward;
|
23 |
-
public $removeLabelIds;
|
24 |
-
|
25 |
-
public function setAddLabelIds($addLabelIds)
|
26 |
-
{
|
27 |
-
$this->addLabelIds = $addLabelIds;
|
28 |
-
}
|
29 |
-
public function getAddLabelIds()
|
30 |
-
{
|
31 |
-
return $this->addLabelIds;
|
32 |
-
}
|
33 |
-
public function setForward($forward)
|
34 |
-
{
|
35 |
-
$this->forward = $forward;
|
36 |
-
}
|
37 |
-
public function getForward()
|
38 |
-
{
|
39 |
-
return $this->forward;
|
40 |
-
}
|
41 |
-
public function setRemoveLabelIds($removeLabelIds)
|
42 |
-
{
|
43 |
-
$this->removeLabelIds = $removeLabelIds;
|
44 |
-
}
|
45 |
-
public function getRemoveLabelIds()
|
46 |
-
{
|
47 |
-
return $this->removeLabelIds;
|
48 |
-
}
|
49 |
-
}
|
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_FilterAction extends Google_Collection
|
19 |
+
{
|
20 |
+
protected $collection_key = 'removeLabelIds';
|
21 |
+
public $addLabelIds;
|
22 |
+
public $forward;
|
23 |
+
public $removeLabelIds;
|
24 |
+
|
25 |
+
public function setAddLabelIds($addLabelIds)
|
26 |
+
{
|
27 |
+
$this->addLabelIds = $addLabelIds;
|
28 |
+
}
|
29 |
+
public function getAddLabelIds()
|
30 |
+
{
|
31 |
+
return $this->addLabelIds;
|
32 |
+
}
|
33 |
+
public function setForward($forward)
|
34 |
+
{
|
35 |
+
$this->forward = $forward;
|
36 |
+
}
|
37 |
+
public function getForward()
|
38 |
+
{
|
39 |
+
return $this->forward;
|
40 |
+
}
|
41 |
+
public function setRemoveLabelIds($removeLabelIds)
|
42 |
+
{
|
43 |
+
$this->removeLabelIds = $removeLabelIds;
|
44 |
+
}
|
45 |
+
public function getRemoveLabelIds()
|
46 |
+
{
|
47 |
+
return $this->removeLabelIds;
|
48 |
+
}
|
49 |
+
}
|
vendor/google/apiclient-services/src/Google/Service/Gmail/FilterCriteria.php
CHANGED
@@ -1,102 +1,102 @@
|
|
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_FilterCriteria extends Google_Model
|
19 |
-
{
|
20 |
-
public $excludeChats;
|
21 |
-
public $from;
|
22 |
-
public $hasAttachment;
|
23 |
-
public $negatedQuery;
|
24 |
-
public $query;
|
25 |
-
public $size;
|
26 |
-
public $sizeComparison;
|
27 |
-
public $subject;
|
28 |
-
public $to;
|
29 |
-
|
30 |
-
public function setExcludeChats($excludeChats)
|
31 |
-
{
|
32 |
-
$this->excludeChats = $excludeChats;
|
33 |
-
}
|
34 |
-
public function getExcludeChats()
|
35 |
-
{
|
36 |
-
return $this->excludeChats;
|
37 |
-
}
|
38 |
-
public function setFrom($from)
|
39 |
-
{
|
40 |
-
$this->from = $from;
|
41 |
-
}
|
42 |
-
public function getFrom()
|
43 |
-
{
|
44 |
-
return $this->from;
|
45 |
-
}
|
46 |
-
public function setHasAttachment($hasAttachment)
|
47 |
-
{
|
48 |
-
$this->hasAttachment = $hasAttachment;
|
49 |
-
}
|
50 |
-
public function getHasAttachment()
|
51 |
-
{
|
52 |
-
return $this->hasAttachment;
|
53 |
-
}
|
54 |
-
public function setNegatedQuery($negatedQuery)
|
55 |
-
{
|
56 |
-
$this->negatedQuery = $negatedQuery;
|
57 |
-
}
|
58 |
-
public function getNegatedQuery()
|
59 |
-
{
|
60 |
-
return $this->negatedQuery;
|
61 |
-
}
|
62 |
-
public function setQuery($query)
|
63 |
-
{
|
64 |
-
$this->query = $query;
|
65 |
-
}
|
66 |
-
public function getQuery()
|
67 |
-
{
|
68 |
-
return $this->query;
|
69 |
-
}
|
70 |
-
public function setSize($size)
|
71 |
-
{
|
72 |
-
$this->size = $size;
|
73 |
-
}
|
74 |
-
public function getSize()
|
75 |
-
{
|
76 |
-
return $this->size;
|
77 |
-
}
|
78 |
-
public function setSizeComparison($sizeComparison)
|
79 |
-
{
|
80 |
-
$this->sizeComparison = $sizeComparison;
|
81 |
-
}
|
82 |
-
public function getSizeComparison()
|
83 |
-
{
|
84 |
-
return $this->sizeComparison;
|
85 |
-
}
|
86 |
-
public function setSubject($subject)
|
87 |
-
{
|
88 |
-
$this->subject = $subject;
|
89 |
-
}
|
90 |
-
public function getSubject()
|
91 |
-
{
|
92 |
-
return $this->subject;
|
93 |
-
}
|
94 |
-
public function setTo($to)
|
95 |
-
{
|
96 |
-
$this->to = $to;
|
97 |
-
}
|
98 |
-
public function getTo()
|
99 |
-
{
|
100 |
-
return $this->to;
|
101 |
-
}
|
102 |
-
}
|
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_FilterCriteria extends Google_Model
|
19 |
+
{
|
20 |
+
public $excludeChats;
|
21 |
+
public $from;
|
22 |
+
public $hasAttachment;
|
23 |
+
public $negatedQuery;
|
24 |
+
public $query;
|
25 |
+
public $size;
|
26 |
+
public $sizeComparison;
|
27 |
+
public $subject;
|
28 |
+
public $to;
|
29 |
+
|
30 |
+
public function setExcludeChats($excludeChats)
|
31 |
+
{
|
32 |
+
$this->excludeChats = $excludeChats;
|
33 |
+
}
|
34 |
+
public function getExcludeChats()
|
35 |
+
{
|
36 |
+
return $this->excludeChats;
|
37 |
+
}
|
38 |
+
public function setFrom($from)
|
39 |
+
{
|
40 |
+
$this->from = $from;
|
41 |
+
}
|
42 |
+
public function getFrom()
|
43 |
+
{
|
44 |
+
return $this->from;
|
45 |
+
}
|
46 |
+
public function setHasAttachment($hasAttachment)
|
47 |
+
{
|
48 |
+
$this->hasAttachment = $hasAttachment;
|
49 |
+
}
|
50 |
+
public function getHasAttachment()
|
51 |
+
{
|
52 |
+
return $this->hasAttachment;
|
53 |
+
}
|
54 |
+
public function setNegatedQuery($negatedQuery)
|
55 |
+
{
|
56 |
+
$this->negatedQuery = $negatedQuery;
|
57 |
+
}
|
58 |
+
public function getNegatedQuery()
|
59 |
+
{
|
60 |
+
return $this->negatedQuery;
|
61 |
+
}
|
62 |
+
public function setQuery($query)
|
63 |
+
{
|
64 |
+
$this->query = $query;
|
65 |
+
}
|
66 |
+
public function getQuery()
|
67 |
+
{
|
68 |
+
return $this->query;
|
69 |
+
}
|
70 |
+
public function setSize($size)
|
71 |
+
{
|
72 |
+
$this->size = $size;
|
73 |
+
}
|
74 |
+
public function getSize()
|
75 |
+
{
|
76 |
+
return $this->size;
|
77 |
+
}
|
78 |
+
public function setSizeComparison($sizeComparison)
|
79 |
+
{
|
80 |
+
$this->sizeComparison = $sizeComparison;
|
81 |
+
}
|
82 |
+
public function getSizeComparison()
|
83 |
+
{
|
84 |
+
return $this->sizeComparison;
|
85 |
+
}
|
86 |
+
public function setSubject($subject)
|
87 |
+
{
|
88 |
+
$this->subject = $subject;
|
89 |
+
}
|
90 |
+
public function getSubject()
|
91 |
+
{
|
92 |
+
return $this->subject;
|
93 |
+
}
|
94 |
+
public function setTo($to)
|
95 |
+
{
|
96 |
+
$this->to = $to;
|
97 |
+
}
|
98 |
+
public function getTo()
|
99 |
+
{
|
100 |
+
return $this->to;
|
101 |
+
}
|
102 |
+
}
|
vendor/google/apiclient-services/src/Google/Service/Gmail/ForwardingAddress.php
CHANGED
@@ -1,39 +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_ForwardingAddress extends Google_Model
|
19 |
-
{
|
20 |
-
public $forwardingEmail;
|
21 |
-
public $verificationStatus;
|
22 |
-
|
23 |
-
public function setForwardingEmail($forwardingEmail)
|
24 |
-
{
|
25 |
-
$this->forwardingEmail = $forwardingEmail;
|
26 |
-
}
|
27 |
-
public function getForwardingEmail()
|
28 |
-
{
|
29 |
-
return $this->forwardingEmail;
|
30 |
-
}
|
31 |
-
public function setVerificationStatus($verificationStatus)
|
32 |
-
{
|
33 |
-
$this->verificationStatus = $verificationStatus;
|
34 |
-
}
|
35 |
-
public function getVerificationStatus()
|
36 |
-
{
|
37 |
-
return $this->verificationStatus;
|
38 |
-
}
|
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_ForwardingAddress extends Google_Model
|
19 |
+
{
|
20 |
+
public $forwardingEmail;
|
21 |
+
public $verificationStatus;
|
22 |
+
|
23 |
+
public function setForwardingEmail($forwardingEmail)
|
24 |
+
{
|
25 |
+
$this->forwardingEmail = $forwardingEmail;
|
26 |
+
}
|
27 |
+
public function getForwardingEmail()
|
28 |
+
{
|
29 |
+
return $this->forwardingEmail;
|
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/History.php
CHANGED
@@ -1,111 +1,111 @@
|
|
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_History extends Google_Collection
|
19 |
-
{
|
20 |
-
protected $collection_key = 'messagesDeleted';
|
21 |
-
public $id;
|
22 |
-
protected $labelsAddedType = 'Google_Service_Gmail_HistoryLabelAdded';
|
23 |
-
protected $labelsAddedDataType = 'array';
|
24 |
-
protected $labelsRemovedType = 'Google_Service_Gmail_HistoryLabelRemoved';
|
25 |
-
protected $labelsRemovedDataType = 'array';
|
26 |
-
protected $messagesType = 'Google_Service_Gmail_Message';
|
27 |
-
protected $messagesDataType = 'array';
|
28 |
-
protected $messagesAddedType = 'Google_Service_Gmail_HistoryMessageAdded';
|
29 |
-
protected $messagesAddedDataType = 'array';
|
30 |
-
protected $messagesDeletedType = 'Google_Service_Gmail_HistoryMessageDeleted';
|
31 |
-
protected $messagesDeletedDataType = 'array';
|
32 |
-
|
33 |
-
public function setId($id)
|
34 |
-
{
|
35 |
-
$this->id = $id;
|
36 |
-
}
|
37 |
-
public function getId()
|
38 |
-
{
|
39 |
-
return $this->id;
|
40 |
-
}
|
41 |
-
/**
|
42 |
-
* @param Google_Service_Gmail_HistoryLabelAdded
|
43 |
-
*/
|
44 |
-
public function setLabelsAdded($labelsAdded)
|
45 |
-
{
|
46 |
-
$this->labelsAdded = $labelsAdded;
|
47 |
-
}
|
48 |
-
/**
|
49 |
-
* @return Google_Service_Gmail_HistoryLabelAdded
|
50 |
-
*/
|
51 |
-
public function getLabelsAdded()
|
52 |
-
{
|
53 |
-
return $this->labelsAdded;
|
54 |
-
}
|
55 |
-
/**
|
56 |
-
* @param Google_Service_Gmail_HistoryLabelRemoved
|
57 |
-
*/
|
58 |
-
public function setLabelsRemoved($labelsRemoved)
|
59 |
-
{
|
60 |
-
$this->labelsRemoved = $labelsRemoved;
|
61 |
-
}
|
62 |
-
/**
|
63 |
-
* @return Google_Service_Gmail_HistoryLabelRemoved
|
64 |
-
*/
|
65 |
-
public function getLabelsRemoved()
|
66 |
-
{
|
67 |
-
return $this->labelsRemoved;
|
68 |
-
}
|
69 |
-
/**
|
70 |
-
* @param Google_Service_Gmail_Message
|
71 |
-
*/
|
72 |
-
public function setMessages($messages)
|
73 |
-
{
|
74 |
-
$this->messages = $messages;
|
75 |
-
}
|
76 |
-
/**
|
77 |
-
* @return Google_Service_Gmail_Message
|
78 |
-
*/
|
79 |
-
public function getMessages()
|
80 |
-
{
|
81 |
-
return $this->messages;
|
82 |
-
}
|
83 |
-
/**
|
84 |
-
* @param Google_Service_Gmail_HistoryMessageAdded
|
85 |
-
*/
|
86 |
-
public function setMessagesAdded($messagesAdded)
|
87 |
-
{
|
88 |
-
$this->messagesAdded = $messagesAdded;
|
89 |
-
}
|
90 |
-
/**
|
91 |
-
* @return Google_Service_Gmail_HistoryMessageAdded
|
92 |
-
*/
|
93 |
-
public function getMessagesAdded()
|
94 |
-
{
|
95 |
-
return $this->messagesAdded;
|
96 |
-
}
|
97 |
-
/**
|
98 |
-
* @param Google_Service_Gmail_HistoryMessageDeleted
|
99 |
-
*/
|
100 |
-
public function setMessagesDeleted($messagesDeleted)
|
101 |
-
{
|
102 |
-
$this->messagesDeleted = $messagesDeleted;
|
103 |
-
}
|
104 |
-
/**
|
105 |
-
* @return Google_Service_Gmail_HistoryMessageDeleted
|
106 |
-
*/
|
107 |
-
public function getMessagesDeleted()
|
108 |
-
{
|
109 |
-
return $this->messagesDeleted;
|
110 |
-
}
|
111 |
-
}
|
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_History extends Google_Collection
|
19 |
+
{
|
20 |
+
protected $collection_key = 'messagesDeleted';
|
21 |
+
public $id;
|
22 |
+
protected $labelsAddedType = 'Google_Service_Gmail_HistoryLabelAdded';
|
23 |
+
protected $labelsAddedDataType = 'array';
|
24 |
+
protected $labelsRemovedType = 'Google_Service_Gmail_HistoryLabelRemoved';
|
25 |
+
protected $labelsRemovedDataType = 'array';
|
26 |
+
protected $messagesType = 'Google_Service_Gmail_Message';
|
27 |
+
protected $messagesDataType = 'array';
|
28 |
+
protected $messagesAddedType = 'Google_Service_Gmail_HistoryMessageAdded';
|
29 |
+
protected $messagesAddedDataType = 'array';
|
30 |
+
protected $messagesDeletedType = 'Google_Service_Gmail_HistoryMessageDeleted';
|
31 |
+
protected $messagesDeletedDataType = 'array';
|
32 |
+
|
33 |
+
public function setId($id)
|
34 |
+
{
|
35 |
+
$this->id = $id;
|
36 |
+
}
|
37 |
+
public function getId()
|
38 |
+
{
|
39 |
+
return $this->id;
|
40 |
+
}
|
41 |
+
/**
|
42 |
+
* @param Google_Service_Gmail_HistoryLabelAdded
|
43 |
+
*/
|
44 |
+
public function setLabelsAdded($labelsAdded)
|
45 |
+
{
|
46 |
+
$this->labelsAdded = $labelsAdded;
|
47 |
+
}
|
48 |
+
/**
|
49 |
+
* @return Google_Service_Gmail_HistoryLabelAdded
|
50 |
+
*/
|
51 |
+
public function getLabelsAdded()
|
52 |
+
{
|
53 |
+
return $this->labelsAdded;
|
54 |
+
}
|
55 |
+
/**
|
56 |
+
* @param Google_Service_Gmail_HistoryLabelRemoved
|
57 |
+
*/
|
58 |
+
public function setLabelsRemoved($labelsRemoved)
|
59 |
+
{
|
60 |
+
$this->labelsRemoved = $labelsRemoved;
|
61 |
+
}
|
62 |
+
/**
|
63 |
+
* @return Google_Service_Gmail_HistoryLabelRemoved
|
64 |
+
*/
|
65 |
+
public function getLabelsRemoved()
|
66 |
+
{
|
67 |
+
return $this->labelsRemoved;
|
68 |
+
}
|
69 |
+
/**
|
70 |
+
* @param Google_Service_Gmail_Message
|
71 |
+
*/
|
72 |
+
public function setMessages($messages)
|
73 |
+
{
|
74 |
+
$this->messages = $messages;
|
75 |
+
}
|
76 |
+
/**
|
77 |
+
* @return Google_Service_Gmail_Message
|
78 |
+
*/
|
79 |
+
public function getMessages()
|
80 |
+
{
|
81 |
+
return $this->messages;
|
82 |
+
}
|
83 |
+
/**
|
84 |
+
* @param Google_Service_Gmail_HistoryMessageAdded
|
85 |
+
*/
|
86 |
+
public function setMessagesAdded($messagesAdded)
|
87 |
+
{
|
88 |
+
$this->messagesAdded = $messagesAdded;
|
89 |
+
}
|
90 |
+
/**
|
91 |
+
* @return Google_Service_Gmail_HistoryMessageAdded
|
92 |
+
*/
|
93 |
+
public function getMessagesAdded()
|
94 |
+
{
|
95 |
+
return $this->messagesAdded;
|
96 |
+
}
|
97 |
+
/**
|
98 |
+
* @param Google_Service_Gmail_HistoryMessageDeleted
|
99 |
+
*/
|
100 |
+
public function setMessagesDeleted($messagesDeleted)
|
101 |
+
{
|
102 |
+
$this->messagesDeleted = $messagesDeleted;
|
103 |
+
}
|
104 |
+
/**
|
105 |
+
* @return Google_Service_Gmail_HistoryMessageDeleted
|
106 |
+
*/
|
107 |
+
public function getMessagesDeleted()
|
108 |
+
{
|
109 |
+
return $this->messagesDeleted;
|
110 |
+
}
|
111 |
+
}
|
vendor/google/apiclient-services/src/Google/Service/Gmail/HistoryLabelAdded.php
CHANGED
@@ -1,47 +1,47 @@
|
|
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_HistoryLabelAdded extends Google_Collection
|
19 |
-
{
|
20 |
-
protected $collection_key = 'labelIds';
|
21 |
-
public $labelIds;
|
22 |
-
protected $messageType = 'Google_Service_Gmail_Message';
|
23 |
-
protected $messageDataType = '';
|
24 |
-
|
25 |
-
public function setLabelIds($labelIds)
|
26 |
-
{
|
27 |
-
$this->labelIds = $labelIds;
|
28 |
-
}
|
29 |
-
public function getLabelIds()
|
30 |
-
{
|
31 |
-
return $this->labelIds;
|
32 |
-
}
|
33 |
-
/**
|
34 |
-
* @param Google_Service_Gmail_Message
|
35 |
-
*/
|
36 |
-
public function setMessage(Google_Service_Gmail_Message $message)
|
37 |
-
{
|
38 |
-
$this->message = $message;
|
39 |
-
}
|
40 |
-
/**
|
41 |
-
* @return Google_Service_Gmail_Message
|
42 |
-
*/
|
43 |
-
public function getMessage()
|
44 |
-
{
|
45 |
-
return $this->message;
|
46 |
-
}
|
47 |
-
}
|
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_HistoryLabelAdded extends Google_Collection
|
19 |
+
{
|
20 |
+
protected $collection_key = 'labelIds';
|
21 |
+
public $labelIds;
|
22 |
+
protected $messageType = 'Google_Service_Gmail_Message';
|
23 |
+
protected $messageDataType = '';
|
24 |
+
|
25 |
+
public function setLabelIds($labelIds)
|
26 |
+
{
|
27 |
+
$this->labelIds = $labelIds;
|
28 |
+
}
|
29 |
+
public function getLabelIds()
|
30 |
+
{
|
31 |
+
return $this->labelIds;
|
32 |
+
}
|
33 |
+
/**
|
34 |
+
* @param Google_Service_Gmail_Message
|
35 |
+
*/
|
36 |
+
public function setMessage(Google_Service_Gmail_Message $message)
|
37 |
+
{
|
38 |
+
$this->message = $message;
|
39 |
+
}
|
40 |
+
/**
|
41 |
+
* @return Google_Service_Gmail_Message
|
42 |
+
*/
|
43 |
+
public function getMessage()
|
44 |
+
{
|
45 |
+
return $this->message;
|
46 |
+
}
|
47 |
+
}
|
vendor/google/apiclient-services/src/Google/Service/Gmail/HistoryLabelRemoved.php
CHANGED
@@ -1,47 +1,47 @@
|
|
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_HistoryLabelRemoved extends Google_Collection
|
19 |
-
{
|
20 |
-
protected $collection_key = 'labelIds';
|
21 |
-
public $labelIds;
|
22 |
-
protected $messageType = 'Google_Service_Gmail_Message';
|
23 |
-
protected $messageDataType = '';
|
24 |
-
|
25 |
-
public function setLabelIds($labelIds)
|
26 |
-
{
|
27 |
-
$this->labelIds = $labelIds;
|
28 |
-
}
|
29 |
-
public function getLabelIds()
|
30 |
-
{
|
31 |
-
return $this->labelIds;
|
32 |
-
}
|
33 |
-
/**
|
34 |
-
* @param Google_Service_Gmail_Message
|
35 |
-
*/
|
36 |
-
public function setMessage(Google_Service_Gmail_Message $message)
|
37 |
-
{
|
38 |
-
$this->message = $message;
|
39 |
-
}
|
40 |
-
/**
|
41 |
-
* @return Google_Service_Gmail_Message
|
42 |
-
*/
|
43 |
-
public function getMessage()
|
44 |
-
{
|
45 |
-
return $this->message;
|
46 |
-
}
|
47 |
-
}
|
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_HistoryLabelRemoved extends Google_Collection
|
19 |
+
{
|
20 |
+
protected $collection_key = 'labelIds';
|
21 |
+
public $labelIds;
|
22 |
+
protected $messageType = 'Google_Service_Gmail_Message';
|
23 |
+
protected $messageDataType = '';
|
24 |
+
|
25 |
+
public function setLabelIds($labelIds)
|
26 |
+
{
|
27 |
+
$this->labelIds = $labelIds;
|
28 |
+
}
|
29 |
+
public function getLabelIds()
|
30 |
+
{
|
31 |
+
return $this->labelIds;
|
32 |
+
}
|
33 |
+
/**
|
34 |
+
* @param Google_Service_Gmail_Message
|
35 |
+
*/
|
36 |
+
public function setMessage(Google_Service_Gmail_Message $message)
|
37 |
+
{
|
38 |
+
$this->message = $message;
|
39 |
+
}
|
40 |
+
/**
|
41 |
+
* @return Google_Service_Gmail_Message
|
42 |
+
*/
|
43 |
+
public function getMessage()
|
44 |
+
{
|
45 |
+
return $this->message;
|
46 |
+
}
|
47 |
+
}
|
vendor/google/apiclient-services/src/Google/Service/Gmail/HistoryMessageAdded.php
CHANGED
@@ -1,37 +1,37 @@
|
|
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_HistoryMessageAdded extends Google_Model
|
19 |
-
{
|
20 |
-
protected $messageType = 'Google_Service_Gmail_Message';
|
21 |
-
protected $messageDataType = '';
|
22 |
-
|
23 |
-
/**
|
24 |
-
* @param Google_Service_Gmail_Message
|
25 |
-
*/
|
26 |
-
public function setMessage(Google_Service_Gmail_Message $message)
|
27 |
-
{
|
28 |
-
$this->message = $message;
|
29 |
-
}
|
30 |
-
/**
|
31 |
-
* @return Google_Service_Gmail_Message
|
32 |
-
*/
|
33 |
-
public function getMessage()
|
34 |
-
{
|
35 |
-
return $this->message;
|
36 |
-
}
|
37 |
-
}
|
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_HistoryMessageAdded extends Google_Model
|
19 |
+
{
|
20 |
+
protected $messageType = 'Google_Service_Gmail_Message';
|
21 |
+
protected $messageDataType = '';
|
22 |
+
|
23 |
+
/**
|
24 |
+
* @param Google_Service_Gmail_Message
|
25 |
+
*/
|
26 |
+
public function setMessage(Google_Service_Gmail_Message $message)
|
27 |
+
{
|
28 |
+
$this->message = $message;
|
29 |
+
}
|
30 |
+
/**
|
31 |
+
* @return Google_Service_Gmail_Message
|
32 |
+
*/
|
33 |
+
public function getMessage()
|
34 |
+
{
|
35 |
+
return $this->message;
|
36 |
+
}
|
37 |
+
}
|
vendor/google/apiclient-services/src/Google/Service/Gmail/HistoryMessageDeleted.php
CHANGED
@@ -1,37 +1,37 @@
|
|
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_HistoryMessageDeleted extends Google_Model
|
19 |
-
{
|
20 |
-
protected $messageType = 'Google_Service_Gmail_Message';
|
21 |
-
protected $messageDataType = '';
|
22 |
-
|
23 |
-
/**
|
24 |
-
* @param Google_Service_Gmail_Message
|
25 |
-
*/
|
26 |
-
public function setMessage(Google_Service_Gmail_Message $message)
|
27 |
-
{
|
28 |
-
$this->message = $message;
|
29 |
-
}
|
30 |
-
/**
|
31 |
-
* @return Google_Service_Gmail_Message
|
32 |
-
*/
|
33 |
-
public function getMessage()
|
34 |
-
{
|
35 |
-
return $this->message;
|
36 |
-
}
|
37 |
-
}
|
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_HistoryMessageDeleted extends Google_Model
|
19 |
+
{
|
20 |
+
protected $messageType = 'Google_Service_Gmail_Message';
|
21 |
+
protected $messageDataType = '';
|
22 |
+
|
23 |
+
/**
|
24 |
+
* @param Google_Service_Gmail_Message
|
25 |
+
*/
|
26 |
+
public function setMessage(Google_Service_Gmail_Message $message)
|
27 |
+
{
|
28 |
+
$this->message = $message;
|
29 |
+
}
|
30 |
+
/**
|
31 |
+
* @return Google_Service_Gmail_Message
|
32 |
+
*/
|
33 |
+
public function getMessage()
|
34 |
+
{
|
35 |
+
return $this->message;
|
36 |
+
}
|
37 |
+
}
|
vendor/google/apiclient-services/src/Google/Service/Gmail/ImapSettings.php
CHANGED
@@ -1,57 +1,57 @@
|
|
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_ImapSettings extends Google_Model
|
19 |
-
{
|
20 |
-
public $autoExpunge;
|
21 |
-
public $enabled;
|
22 |
-
public $expungeBehavior;
|
23 |
-
public $maxFolderSize;
|
24 |
-
|
25 |
-
public function setAutoExpunge($autoExpunge)
|
26 |
-
{
|
27 |
-
$this->autoExpunge = $autoExpunge;
|
28 |
-
}
|
29 |
-
public function getAutoExpunge()
|
30 |
-
{
|
31 |
-
return $this->autoExpunge;
|
32 |
-
}
|
33 |
-
public function setEnabled($enabled)
|
34 |
-
{
|
35 |
-
$this->enabled = $enabled;
|
36 |
-
}
|
37 |
-
public function getEnabled()
|
38 |
-
{
|
39 |
-
return $this->enabled;
|
40 |
-
}
|
41 |
-
public function setExpungeBehavior($expungeBehavior)
|
42 |
-
{
|
43 |
-
$this->expungeBehavior = $expungeBehavior;
|
44 |
-
}
|
45 |
-
public function getExpungeBehavior()
|
46 |
-
{
|
47 |
-
return $this->expungeBehavior;
|
48 |
-
}
|
49 |
-
public function setMaxFolderSize($maxFolderSize)
|
50 |
-
{
|
51 |
-
$this->maxFolderSize = $maxFolderSize;
|
52 |
-
}
|
53 |
-
public function getMaxFolderSize()
|
54 |
-
{
|
55 |
-
return $this->maxFolderSize;
|
56 |
-
}
|
57 |
-
}
|
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_ImapSettings extends Google_Model
|
19 |
+
{
|
20 |
+
public $autoExpunge;
|
21 |
+
public $enabled;
|
22 |
+
public $expungeBehavior;
|
23 |
+
public $maxFolderSize;
|
24 |
+
|
25 |
+
public function setAutoExpunge($autoExpunge)
|
26 |
+
{
|
27 |
+
$this->autoExpunge = $autoExpunge;
|
28 |
+
}
|
29 |
+
public function getAutoExpunge()
|
30 |
+
{
|
31 |
+
return $this->autoExpunge;
|
32 |
+
}
|
33 |
+
public function setEnabled($enabled)
|
34 |
+
{
|
35 |
+
$this->enabled = $enabled;
|
36 |
+
}
|
37 |
+
public function getEnabled()
|
38 |
+
{
|
39 |
+
return $this->enabled;
|
40 |
+
}
|
41 |
+
public function setExpungeBehavior($expungeBehavior)
|
42 |
+
{
|
43 |
+
$this->expungeBehavior = $expungeBehavior;
|
44 |
+
}
|
45 |
+
public function getExpungeBehavior()
|
46 |
+
{
|
47 |
+
return $this->expungeBehavior;
|
48 |
+
}
|
49 |
+
public function setMaxFolderSize($maxFolderSize)
|
50 |
+
{
|
51 |
+
$this->maxFolderSize = $maxFolderSize;
|
52 |
+
}
|
53 |
+
public function getMaxFolderSize()
|
54 |
+
{
|
55 |
+
return $this->maxFolderSize;
|
56 |
+
}
|
57 |
+
}
|
vendor/google/apiclient-services/src/Google/Service/Gmail/Label.php
CHANGED
@@ -1,118 +1,118 @@
|
|
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_Label extends Google_Model
|
19 |
-
{
|
20 |
-
protected $colorType = 'Google_Service_Gmail_LabelColor';
|
21 |
-
protected $colorDataType = '';
|
22 |
-
public $id;
|
23 |
-
public $labelListVisibility;
|
24 |
-
public $messageListVisibility;
|
25 |
-
public $messagesTotal;
|
26 |
-
public $messagesUnread;
|
27 |
-
public $name;
|
28 |
-
public $threadsTotal;
|
29 |
-
public $threadsUnread;
|
30 |
-
public $type;
|
31 |
-
|
32 |
-
/**
|
33 |
-
* @param Google_Service_Gmail_LabelColor
|
34 |
-
*/
|
35 |
-
public function setColor(Google_Service_Gmail_LabelColor $color)
|
36 |
-
{
|
37 |
-
$this->color = $color;
|
38 |
-
}
|
39 |
-
/**
|
40 |
-
* @return Google_Service_Gmail_LabelColor
|
41 |
-
*/
|
42 |
-
public function getColor()
|
43 |
-
{
|
44 |
-
return $this->color;
|
45 |
-
}
|
46 |
-
public function setId($id)
|
47 |
-
{
|
48 |
-
$this->id = $id;
|
49 |
-
}
|
50 |
-
public function getId()
|
51 |
-
{
|
52 |
-
return $this->id;
|
53 |
-
}
|
54 |
-
public function setLabelListVisibility($labelListVisibility)
|
55 |
-
{
|
56 |
-
$this->labelListVisibility = $labelListVisibility;
|
57 |
-
}
|
58 |
-
public function getLabelListVisibility()
|
59 |
-
{
|
60 |
-
return $this->labelListVisibility;
|
61 |
-
}
|
62 |
-
public function setMessageListVisibility($messageListVisibility)
|
63 |
-
{
|
64 |
-
$this->messageListVisibility = $messageListVisibility;
|
65 |
-
}
|
66 |
-
public function getMessageListVisibility()
|
67 |
-
{
|
68 |
-
return $this->messageListVisibility;
|
69 |
-
}
|
70 |
-
public function setMessagesTotal($messagesTotal)
|
71 |
-
{
|
72 |
-
$this->messagesTotal = $messagesTotal;
|
73 |
-
}
|
74 |
-
public function getMessagesTotal()
|
75 |
-
{
|
76 |
-
return $this->messagesTotal;
|
77 |
-
}
|
78 |
-
public function setMessagesUnread($messagesUnread)
|
79 |
-
{
|
80 |
-
$this->messagesUnread = $messagesUnread;
|
81 |
-
}
|
82 |
-
public function getMessagesUnread()
|
83 |
-
{
|
84 |
-
return $this->messagesUnread;
|
85 |
-
}
|
86 |
-
public function setName($name)
|
87 |
-
{
|
88 |
-
$this->name = $name;
|
89 |
-
}
|
90 |
-
public function getName()
|
91 |
-
{
|
92 |
-
return $this->name;
|
93 |
-
}
|
94 |
-
public function setThreadsTotal($threadsTotal)
|
95 |
-
{
|
96 |
-
$this->threadsTotal = $threadsTotal;
|
97 |
-
}
|
98 |
-
public function getThreadsTotal()
|
99 |
-
{
|
100 |
-
return $this->threadsTotal;
|
101 |
-
}
|
102 |
-
public function setThreadsUnread($threadsUnread)
|
103 |
-
{
|
104 |
-
$this->threadsUnread = $threadsUnread;
|
105 |
-
}
|
106 |
-
public function getThreadsUnread()
|
107 |
-
{
|
108 |
-
return $this->threadsUnread;
|
109 |
-
}
|
110 |
-
public function setType($type)
|
111 |
-
{
|
112 |
-
$this->type = $type;
|
113 |
-
}
|
114 |
-
public function getType()
|
115 |
-
{
|
116 |
-
return $this->type;
|
117 |
-
}
|
118 |
-
}
|
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_Label extends Google_Model
|
19 |
+
{
|
20 |
+
protected $colorType = 'Google_Service_Gmail_LabelColor';
|
21 |
+
protected $colorDataType = '';
|
22 |
+
public $id;
|
23 |
+
public $labelListVisibility;
|
24 |
+
public $messageListVisibility;
|
25 |
+
public $messagesTotal;
|
26 |
+
public $messagesUnread;
|
27 |
+
public $name;
|
28 |
+
public $threadsTotal;
|
29 |
+
public $threadsUnread;
|
30 |
+
public $type;
|
31 |
+
|
32 |
+
/**
|
33 |
+
* @param Google_Service_Gmail_LabelColor
|
34 |
+
*/
|
35 |
+
public function setColor(Google_Service_Gmail_LabelColor $color)
|
36 |
+
{
|
37 |
+
$this->color = $color;
|
38 |
+
}
|
39 |
+
/**
|
40 |
+
* @return Google_Service_Gmail_LabelColor
|
41 |
+
*/
|
42 |
+
public function getColor()
|
43 |
+
{
|
44 |
+
return $this->color;
|
45 |
+
}
|
46 |
+
public function setId($id)
|
47 |
+
{
|
48 |
+
$this->id = $id;
|
49 |
+
}
|
50 |
+
public function getId()
|
51 |
+
{
|
52 |
+
return $this->id;
|
53 |
+
}
|
54 |
+
public function setLabelListVisibility($labelListVisibility)
|
55 |
+
{
|
56 |
+
$this->labelListVisibility = $labelListVisibility;
|
57 |
+
}
|
58 |
+
public function getLabelListVisibility()
|
59 |
+
{
|
60 |
+
return $this->labelListVisibility;
|
61 |
+
}
|
62 |
+
public function setMessageListVisibility($messageListVisibility)
|
63 |
+
{
|
64 |
+
$this->messageListVisibility = $messageListVisibility;
|
65 |
+
}
|
66 |
+
public function getMessageListVisibility()
|
67 |
+
{
|
68 |
+
return $this->messageListVisibility;
|
69 |
+
}
|
70 |
+
public function setMessagesTotal($messagesTotal)
|
71 |
+
{
|
72 |
+
$this->messagesTotal = $messagesTotal;
|
73 |
+
}
|
74 |
+
public function getMessagesTotal()
|
75 |
+
{
|
76 |
+
return $this->messagesTotal;
|
77 |
+
}
|
78 |
+
public function setMessagesUnread($messagesUnread)
|
79 |
+
{
|
80 |
+
$this->messagesUnread = $messagesUnread;
|
81 |
+
}
|
82 |
+
public function getMessagesUnread()
|
83 |
+
{
|
84 |
+
return $this->messagesUnread;
|
85 |
+
}
|
86 |
+
public function setName($name)
|
87 |
+
{
|
88 |
+
$this->name = $name;
|
89 |
+
}
|
90 |
+
public function getName()
|
91 |
+
{
|
92 |
+
return $this->name;
|
93 |
+
}
|
94 |
+
public function setThreadsTotal($threadsTotal)
|
95 |
+
{
|
96 |
+
$this->threadsTotal = $threadsTotal;
|
97 |
+
}
|
98 |
+
public function getThreadsTotal()
|
99 |
+
{
|
100 |
+
return $this->threadsTotal;
|
101 |
+
}
|
102 |
+
public function setThreadsUnread($threadsUnread)
|
103 |
+
{
|
104 |
+
$this->threadsUnread = $threadsUnread;
|
105 |
+
}
|
106 |
+
public function getThreadsUnread()
|
107 |
+
{
|
108 |
+
return $this->threadsUnread;
|
109 |
+
}
|
110 |
+
public function setType($type)
|
111 |
+
{
|
112 |
+
$this->type = $type;
|
113 |
+
}
|
114 |
+
public function getType()
|
115 |
+
{
|
116 |
+
return $this->type;
|
117 |
+
}
|
118 |
+
}
|
vendor/google/apiclient-services/src/Google/Service/Gmail/LabelColor.php
CHANGED
@@ -1,39 +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_LabelColor extends Google_Model
|
19 |
-
{
|
20 |
-
public $backgroundColor;
|
21 |
-
public $textColor;
|
22 |
-
|
23 |
-
public function setBackgroundColor($backgroundColor)
|
24 |
-
{
|
25 |
-
$this->backgroundColor = $backgroundColor;
|
26 |
-
}
|
27 |
-
public function getBackgroundColor()
|
28 |
-
{
|
29 |
-
return $this->backgroundColor;
|
30 |
-
}
|
31 |
-
public function setTextColor($textColor)
|
32 |
-
{
|
33 |
-
$this->textColor = $textColor;
|
34 |
-
}
|
35 |
-
public function getTextColor()
|
36 |
-
{
|
37 |
-
return $this->textColor;
|
38 |
-
}
|
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_LabelColor extends Google_Model
|
19 |
+
{
|
20 |
+
public $backgroundColor;
|
21 |
+
public $textColor;
|
22 |
+
|
23 |
+
public function setBackgroundColor($backgroundColor)
|
24 |
+
{
|
25 |
+
$this->backgroundColor = $backgroundColor;
|
26 |
+
}
|
27 |
+
public function getBackgroundColor()
|
28 |
+
{
|
29 |
+
return $this->backgroundColor;
|
30 |
+
}
|
31 |
+
public function setTextColor($textColor)
|
32 |
+
{
|
33 |
+
$this->textColor = $textColor;
|
34 |
+
}
|
35 |
+
public function getTextColor()
|
36 |
+
{
|
37 |
+
return $this->textColor;
|
38 |
+
}
|
39 |
+
}
|
vendor/google/apiclient-services/src/Google/Service/Gmail/LanguageSettings.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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_LanguageSettings extends Google_Model
|
19 |
+
{
|
20 |
+
public $displayLanguage;
|
21 |
+
|
22 |
+
public function setDisplayLanguage($displayLanguage)
|
23 |
+
{
|
24 |
+
$this->displayLanguage = $displayLanguage;
|
25 |
+
}
|
26 |
+
public function getDisplayLanguage()
|
27 |
+
{
|
28 |
+
return $this->displayLanguage;
|
29 |
+
}
|
30 |
+
}
|
vendor/google/apiclient-services/src/Google/Service/Gmail/ListDelegatesResponse.php
CHANGED
@@ -1,38 +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 |
-
}
|
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/ListDraftsResponse.php
CHANGED
@@ -1,56 +1,56 @@
|
|
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_ListDraftsResponse extends Google_Collection
|
19 |
-
{
|
20 |
-
protected $collection_key = 'drafts';
|
21 |
-
protected $draftsType = 'Google_Service_Gmail_Draft';
|
22 |
-
protected $draftsDataType = 'array';
|
23 |
-
public $nextPageToken;
|
24 |
-
public $resultSizeEstimate;
|
25 |
-
|
26 |
-
/**
|
27 |
-
* @param Google_Service_Gmail_Draft
|
28 |
-
*/
|
29 |
-
public function setDrafts($drafts)
|
30 |
-
{
|
31 |
-
$this->drafts = $drafts;
|
32 |
-
}
|
33 |
-
/**
|
34 |
-
* @return Google_Service_Gmail_Draft
|
35 |
-
*/
|
36 |
-
public function getDrafts()
|
37 |
-
{
|
38 |
-
return $this->drafts;
|
39 |
-
}
|
40 |
-
public function setNextPageToken($nextPageToken)
|
41 |
-
{
|
42 |
-
$this->nextPageToken = $nextPageToken;
|
43 |
-
}
|
44 |
-
public function getNextPageToken()
|
45 |
-
{
|
46 |
-
return $this->nextPageToken;
|
47 |
-
}
|
48 |
-
public function setResultSizeEstimate($resultSizeEstimate)
|
49 |
-
{
|
50 |
-
$this->resultSizeEstimate = $resultSizeEstimate;
|
51 |
-
}
|
52 |
-
public function getResultSizeEstimate()
|
53 |
-
{
|
54 |
-
return $this->resultSizeEstimate;
|
55 |
-
}
|
56 |
-
}
|
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_ListDraftsResponse extends Google_Collection
|
19 |
+
{
|
20 |
+
protected $collection_key = 'drafts';
|
21 |
+
protected $draftsType = 'Google_Service_Gmail_Draft';
|
22 |
+
protected $draftsDataType = 'array';
|
23 |
+
public $nextPageToken;
|
24 |
+
public $resultSizeEstimate;
|
25 |
+
|
26 |
+
/**
|
27 |
+
* @param Google_Service_Gmail_Draft
|
28 |
+
*/
|
29 |
+
public function setDrafts($drafts)
|
30 |
+
{
|
31 |
+
$this->drafts = $drafts;
|
32 |
+
}
|
33 |
+
/**
|
34 |
+
* @return Google_Service_Gmail_Draft
|
35 |
+
*/
|
36 |
+
public function getDrafts()
|
37 |
+
{
|
38 |
+
return $this->drafts;
|
39 |
+
}
|
40 |
+
public function setNextPageToken($nextPageToken)
|
41 |
+
{
|
42 |
+
$this->nextPageToken = $nextPageToken;
|
43 |
+
}
|
44 |
+
public function getNextPageToken()
|
45 |
+
{
|
46 |
+
return $this->nextPageToken;
|
47 |
+
}
|
48 |
+
public function setResultSizeEstimate($resultSizeEstimate)
|
49 |
+
{
|
50 |
+
$this->resultSizeEstimate = $resultSizeEstimate;
|
51 |
+
}
|
52 |
+
public function getResultSizeEstimate()
|
53 |
+
{
|
54 |
+
return $this->resultSizeEstimate;
|
55 |
+
}
|
56 |
+
}
|
vendor/google/apiclient-services/src/Google/Service/Gmail/ListFiltersResponse.php
CHANGED
@@ -1,38 +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_ListFiltersResponse extends Google_Collection
|
19 |
-
{
|
20 |
-
protected $collection_key = 'filter';
|
21 |
-
protected $filterType = 'Google_Service_Gmail_Filter';
|
22 |
-
protected $filterDataType = 'array';
|
23 |
-
|
24 |
-
/**
|
25 |
-
* @param Google_Service_Gmail_Filter
|
26 |
-
*/
|
27 |
-
public function setFilter($filter)
|
28 |
-
{
|
29 |
-
$this->filter = $filter;
|
30 |
-
}
|
31 |
-
/**
|
32 |
-
* @return Google_Service_Gmail_Filter
|
33 |
-
*/
|
34 |
-
public function getFilter()
|
35 |
-
{
|
36 |
-
return $this->filter;
|
37 |
-
}
|
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_ListFiltersResponse extends Google_Collection
|
19 |
+
{
|
20 |
+
protected $collection_key = 'filter';
|
21 |
+
protected $filterType = 'Google_Service_Gmail_Filter';
|
22 |
+
protected $filterDataType = 'array';
|
23 |
+
|
24 |
+
/**
|
25 |
+
* @param Google_Service_Gmail_Filter
|
26 |
+
*/
|
27 |
+
public function setFilter($filter)
|
28 |
+
{
|
29 |
+
$this->filter = $filter;
|
30 |
+
}
|
31 |
+
/**
|
32 |
+
* @return Google_Service_Gmail_Filter
|
33 |
+
*/
|
34 |
+
public function getFilter()
|
35 |
+
{
|
36 |
+
return $this->filter;
|
37 |
+
}
|
38 |
+
}
|
vendor/google/apiclient-services/src/Google/Service/Gmail/ListForwardingAddressesResponse.php
CHANGED
@@ -1,38 +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_ListForwardingAddressesResponse extends Google_Collection
|
19 |
-
{
|
20 |
-
protected $collection_key = 'forwardingAddresses';
|
21 |
-
protected $forwardingAddressesType = 'Google_Service_Gmail_ForwardingAddress';
|
22 |
-
protected $forwardingAddressesDataType = 'array';
|
23 |
-
|
24 |
-
/**
|
25 |
-
* @param Google_Service_Gmail_ForwardingAddress
|
26 |
-
*/
|
27 |
-
public function setForwardingAddresses($forwardingAddresses)
|
28 |
-
{
|
29 |
-
$this->forwardingAddresses = $forwardingAddresses;
|
30 |
-
}
|
31 |
-
/**
|
32 |
-
* @return Google_Service_Gmail_ForwardingAddress
|
33 |
-
*/
|
34 |
-
public function getForwardingAddresses()
|
35 |
-
{
|
36 |
-
return $this->forwardingAddresses;
|
37 |
-
}
|
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_ListForwardingAddressesResponse extends Google_Collection
|
19 |
+
{
|
20 |
+
protected $collection_key = 'forwardingAddresses';
|
21 |
+
protected $forwardingAddressesType = 'Google_Service_Gmail_ForwardingAddress';
|
22 |
+
protected $forwardingAddressesDataType = 'array';
|
23 |
+
|
24 |
+
/**
|
25 |
+
* @param Google_Service_Gmail_ForwardingAddress
|
26 |
+
*/
|
27 |
+
public function setForwardingAddresses($forwardingAddresses)
|
28 |
+
{
|
29 |
+
$this->forwardingAddresses = $forwardingAddresses;
|
30 |
+
}
|
31 |
+
/**
|
32 |
+
* @return Google_Service_Gmail_ForwardingAddress
|
33 |
+
*/
|
34 |
+
public function getForwardingAddresses()
|
35 |
+
{
|
36 |
+
return $this->forwardingAddresses;
|
37 |
+
}
|
38 |
+
}
|
vendor/google/apiclient-services/src/Google/Service/Gmail/ListHistoryResponse.php
CHANGED
@@ -1,56 +1,56 @@
|
|
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_ListHistoryResponse extends Google_Collection
|
19 |
-
{
|
20 |
-
protected $collection_key = 'history';
|
21 |
-
protected $historyType = 'Google_Service_Gmail_History';
|
22 |
-
protected $historyDataType = 'array';
|
23 |
-
public $historyId;
|
24 |
-
public $nextPageToken;
|
25 |
-
|
26 |
-
/**
|
27 |
-
* @param Google_Service_Gmail_History
|
28 |
-
*/
|
29 |
-
public function setHistory($history)
|
30 |
-
{
|
31 |
-
$this->history = $history;
|
32 |
-
}
|
33 |
-
/**
|
34 |
-
* @return Google_Service_Gmail_History
|
35 |
-
*/
|
36 |
-
public function getHistory()
|
37 |
-
{
|
38 |
-
return $this->history;
|
39 |
-
}
|
40 |
-
public function setHistoryId($historyId)
|
41 |
-
{
|
42 |
-
$this->historyId = $historyId;
|
43 |
-
}
|
44 |
-
public function getHistoryId()
|
45 |
-
{
|
46 |
-
return $this->historyId;
|
47 |
-
}
|
48 |
-
public function setNextPageToken($nextPageToken)
|
49 |
-
{
|
50 |
-
$this->nextPageToken = $nextPageToken;
|
51 |
-
}
|
52 |
-
public function getNextPageToken()
|
53 |
-
{
|
54 |
-
return $this->nextPageToken;
|
55 |
-
}
|
56 |
-
}
|
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_ListHistoryResponse extends Google_Collection
|
19 |
+
{
|
20 |
+
protected $collection_key = 'history';
|
21 |
+
protected $historyType = 'Google_Service_Gmail_History';
|
22 |
+
protected $historyDataType = 'array';
|
23 |
+
public $historyId;
|
24 |
+
public $nextPageToken;
|
25 |
+
|
26 |
+
/**
|
27 |
+
* @param Google_Service_Gmail_History
|
28 |
+
*/
|
29 |
+
public function setHistory($history)
|
30 |
+
{
|
31 |
+
$this->history = $history;
|
32 |
+
}
|
33 |
+
/**
|
34 |
+
* @return Google_Service_Gmail_History
|
35 |
+
*/
|
36 |
+
public function getHistory()
|
37 |
+
{
|
38 |
+
return $this->history;
|
39 |
+
}
|
40 |
+
public function setHistoryId($historyId)
|
41 |
+
{
|
42 |
+
$this->historyId = $historyId;
|
43 |
+
}
|
44 |
+
public function getHistoryId()
|
45 |
+
{
|
46 |
+
return $this->historyId;
|
47 |
+
}
|
48 |
+
public function setNextPageToken($nextPageToken)
|
49 |
+
{
|
50 |
+
$this->nextPageToken = $nextPageToken;
|
51 |
+
}
|
52 |
+
public function getNextPageToken()
|
53 |
+
{
|
54 |
+
return $this->nextPageToken;
|
55 |
+
}
|
56 |
+
}
|
vendor/google/apiclient-services/src/Google/Service/Gmail/ListLabelsResponse.php
CHANGED
@@ -1,38 +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_ListLabelsResponse extends Google_Collection
|
19 |
-
{
|
20 |
-
protected $collection_key = 'labels';
|
21 |
-
protected $labelsType = 'Google_Service_Gmail_Label';
|
22 |
-
protected $labelsDataType = 'array';
|
23 |
-
|
24 |
-
/**
|
25 |
-
* @param Google_Service_Gmail_Label
|
26 |
-
*/
|
27 |
-
public function setLabels($labels)
|
28 |
-
{
|
29 |
-
$this->labels = $labels;
|
30 |
-
}
|
31 |
-
/**
|
32 |
-
* @return Google_Service_Gmail_Label
|
33 |
-
*/
|
34 |
-
public function getLabels()
|
35 |
-
{
|
36 |
-
return $this->labels;
|
37 |
-
}
|
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_ListLabelsResponse extends Google_Collection
|
19 |
+
{
|
20 |
+
protected $collection_key = 'labels';
|
21 |
+
protected $labelsType = 'Google_Service_Gmail_Label';
|
22 |
+
protected $labelsDataType = 'array';
|
23 |
+
|
24 |
+
/**
|
25 |
+
* @param Google_Service_Gmail_Label
|
26 |
+
*/
|
27 |
+
public function setLabels($labels)
|
28 |
+
{
|
29 |
+
$this->labels = $labels;
|
30 |
+
}
|
31 |
+
/**
|
32 |
+
* @return Google_Service_Gmail_Label
|
33 |
+
*/
|
34 |
+
public function getLabels()
|
35 |
+
{
|
36 |
+
return $this->labels;
|
37 |
+
}
|
38 |
+
}
|
vendor/google/apiclient-services/src/Google/Service/Gmail/ListMessagesResponse.php
CHANGED
@@ -1,56 +1,56 @@
|
|
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_ListMessagesResponse extends Google_Collection
|
19 |
-
{
|
20 |
-
protected $collection_key = 'messages';
|
21 |
-
protected $messagesType = 'Google_Service_Gmail_Message';
|
22 |
-
protected $messagesDataType = 'array';
|
23 |
-
public $nextPageToken;
|
24 |
-
public $resultSizeEstimate;
|
25 |
-
|
26 |
-
/**
|
27 |
-
* @param Google_Service_Gmail_Message
|
28 |
-
*/
|
29 |
-
public function setMessages($messages)
|
30 |
-
{
|
31 |
-
$this->messages = $messages;
|
32 |
-
}
|
33 |
-
/**
|
34 |
-
* @return Google_Service_Gmail_Message
|
35 |
-
*/
|
36 |
-
public function getMessages()
|
37 |
-
{
|
38 |
-
return $this->messages;
|
39 |
-
}
|
40 |
-
public function setNextPageToken($nextPageToken)
|
41 |
-
{
|
42 |
-
$this->nextPageToken = $nextPageToken;
|
43 |
-
}
|
44 |
-
public function getNextPageToken()
|
45 |
-
{
|
46 |
-
return $this->nextPageToken;
|
47 |
-
}
|
48 |
-
public function setResultSizeEstimate($resultSizeEstimate)
|
49 |
-
{
|
50 |
-
$this->resultSizeEstimate = $resultSizeEstimate;
|
51 |
-
}
|
52 |
-
public function getResultSizeEstimate()
|
53 |
-
{
|
54 |
-
return $this->resultSizeEstimate;
|
55 |
-
}
|
56 |
-
}
|
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_ListMessagesResponse extends Google_Collection
|
19 |
+
{
|
20 |
+
protected $collection_key = 'messages';
|
21 |
+
protected $messagesType = 'Google_Service_Gmail_Message';
|
22 |
+
protected $messagesDataType = 'array';
|
23 |
+
public $nextPageToken;
|
24 |
+
public $resultSizeEstimate;
|
25 |
+
|
26 |
+
/**
|
27 |
+
* @param Google_Service_Gmail_Message
|
28 |
+
*/
|
29 |
+
public function setMessages($messages)
|
30 |
+
{
|
31 |
+
$this->messages = $messages;
|
32 |
+
}
|
33 |
+
/**
|
34 |
+
* @return Google_Service_Gmail_Message
|
35 |
+
*/
|
36 |
+
public function getMessages()
|
37 |
+
{
|
38 |
+
return $this->messages;
|
39 |
+
}
|
40 |
+
public function setNextPageToken($nextPageToken)
|
41 |
+
{
|
42 |
+
$this->nextPageToken = $nextPageToken;
|
43 |
+
}
|
44 |
+
public function getNextPageToken()
|
45 |
+
{
|
46 |
+
return $this->nextPageToken;
|
47 |
+
}
|
48 |
+
public function setResultSizeEstimate($resultSizeEstimate)
|
49 |
+
{
|
50 |
+
$this->resultSizeEstimate = $resultSizeEstimate;
|
51 |
+
}
|
52 |
+
public function getResultSizeEstimate()
|
53 |
+
{
|
54 |
+
return $this->resultSizeEstimate;
|
55 |
+
}
|
56 |
+
}
|
vendor/google/apiclient-services/src/Google/Service/Gmail/ListSendAsResponse.php
CHANGED
@@ -1,38 +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_ListSendAsResponse extends Google_Collection
|
19 |
-
{
|
20 |
-
protected $collection_key = 'sendAs';
|
21 |
-
protected $sendAsType = 'Google_Service_Gmail_SendAs';
|
22 |
-
protected $sendAsDataType = 'array';
|
23 |
-
|
24 |
-
/**
|
25 |
-
* @param Google_Service_Gmail_SendAs
|
26 |
-
*/
|
27 |
-
public function setSendAs($sendAs)
|
28 |
-
{
|
29 |
-
$this->sendAs = $sendAs;
|
30 |
-
}
|
31 |
-
/**
|
32 |
-
* @return Google_Service_Gmail_SendAs
|
33 |
-
*/
|
34 |
-
public function getSendAs()
|
35 |
-
{
|
36 |
-
return $this->sendAs;
|
37 |
-
}
|
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_ListSendAsResponse extends Google_Collection
|
19 |
+
{
|
20 |
+
protected $collection_key = 'sendAs';
|
21 |
+
protected $sendAsType = 'Google_Service_Gmail_SendAs';
|
22 |
+
protected $sendAsDataType = 'array';
|
23 |
+
|
24 |
+
/**
|
25 |
+
* @param Google_Service_Gmail_SendAs
|
26 |
+
*/
|
27 |
+
public function setSendAs($sendAs)
|
28 |
+
{
|
29 |
+
$this->sendAs = $sendAs;
|
30 |
+
}
|
31 |
+
/**
|
32 |
+
* @return Google_Service_Gmail_SendAs
|
33 |
+
*/
|
34 |
+
public function getSendAs()
|
35 |
+
{
|
36 |
+
return $this->sendAs;
|
37 |
+
}
|
38 |
+
}
|
vendor/google/apiclient-services/src/Google/Service/Gmail/ListSmimeInfoResponse.php
CHANGED
@@ -1,38 +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_ListSmimeInfoResponse extends Google_Collection
|
19 |
-
{
|
20 |
-
protected $collection_key = 'smimeInfo';
|
21 |
-
protected $smimeInfoType = 'Google_Service_Gmail_SmimeInfo';
|
22 |
-
protected $smimeInfoDataType = 'array';
|
23 |
-
|
24 |
-
/**
|
25 |
-
* @param Google_Service_Gmail_SmimeInfo
|
26 |
-
*/
|
27 |
-
public function setSmimeInfo($smimeInfo)
|
28 |
-
{
|
29 |
-
$this->smimeInfo = $smimeInfo;
|
30 |
-
}
|
31 |
-
/**
|
32 |
-
* @return Google_Service_Gmail_SmimeInfo
|
33 |
-
*/
|
34 |
-
public function getSmimeInfo()
|
35 |
-
{
|
36 |
-
return $this->smimeInfo;
|
37 |
-
}
|
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_ListSmimeInfoResponse extends Google_Collection
|
19 |
+
{
|
20 |
+
protected $collection_key = 'smimeInfo';
|
21 |
+
protected $smimeInfoType = 'Google_Service_Gmail_SmimeInfo';
|
22 |
+
protected $smimeInfoDataType = 'array';
|
23 |
+
|
24 |
+
/**
|
25 |
+
* @param Google_Service_Gmail_SmimeInfo
|
26 |
+
*/
|
27 |
+
public function setSmimeInfo($smimeInfo)
|
28 |
+
{
|
29 |
+
$this->smimeInfo = $smimeInfo;
|
30 |
+
}
|
31 |
+
/**
|
32 |
+
* @return Google_Service_Gmail_SmimeInfo
|
33 |
+
*/
|
34 |
+
public function getSmimeInfo()
|
35 |
+
{
|
36 |
+
return $this->smimeInfo;
|
37 |
+
}
|
38 |
+
}
|
vendor/google/apiclient-services/src/Google/Service/Gmail/ListThreadsResponse.php
CHANGED
@@ -1,56 +1,56 @@
|
|
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_ListThreadsResponse extends Google_Collection
|
19 |
-
{
|
20 |
-
protected $collection_key = 'threads';
|
21 |
-
public $nextPageToken;
|
22 |
-
public $resultSizeEstimate;
|
23 |
-
protected $threadsType = 'Google_Service_Gmail_Thread';
|
24 |
-
protected $threadsDataType = 'array';
|
25 |
-
|
26 |
-
public function setNextPageToken($nextPageToken)
|
27 |
-
{
|
28 |
-
$this->nextPageToken = $nextPageToken;
|
29 |
-
}
|
30 |
-
public function getNextPageToken()
|
31 |
-
{
|
32 |
-
return $this->nextPageToken;
|
33 |
-
}
|
34 |
-
public function setResultSizeEstimate($resultSizeEstimate)
|
35 |
-
{
|
36 |
-
$this->resultSizeEstimate = $resultSizeEstimate;
|
37 |
-
}
|
38 |
-
public function getResultSizeEstimate()
|
39 |
-
{
|
40 |
-
return $this->resultSizeEstimate;
|
41 |
-
}
|
42 |
-
/**
|
43 |
-
* @param Google_Service_Gmail_Thread
|
44 |
-
*/
|
45 |
-
public function setThreads($threads)
|
46 |
-
{
|
47 |
-
$this->threads = $threads;
|
48 |
-
}
|
49 |
-
/**
|
50 |
-
* @return Google_Service_Gmail_Thread
|
51 |
-
*/
|
52 |
-
public function getThreads()
|
53 |
-
{
|
54 |
-
return $this->threads;
|
55 |
-
}
|
56 |
-
}
|
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_ListThreadsResponse extends Google_Collection
|
19 |
+
{
|
20 |
+
protected $collection_key = 'threads';
|
21 |
+
public $nextPageToken;
|
22 |
+
public $resultSizeEstimate;
|
23 |
+
protected $threadsType = 'Google_Service_Gmail_Thread';
|
24 |
+
protected $threadsDataType = 'array';
|
25 |
+
|
26 |
+
public function setNextPageToken($nextPageToken)
|
27 |
+
{
|
28 |
+
$this->nextPageToken = $nextPageToken;
|
29 |
+
}
|
30 |
+
public function getNextPageToken()
|
31 |
+
{
|
32 |
+
return $this->nextPageToken;
|
33 |
+
}
|
34 |
+
public function setResultSizeEstimate($resultSizeEstimate)
|
35 |
+
{
|
36 |
+
$this->resultSizeEstimate = $resultSizeEstimate;
|
37 |
+
}
|
38 |
+
public function getResultSizeEstimate()
|
39 |
+
{
|
40 |
+
return $this->resultSizeEstimate;
|
41 |
+
}
|
42 |
+
/**
|
43 |
+
* @param Google_Service_Gmail_Thread
|
44 |
+
*/
|
45 |
+
public function setThreads($threads)
|
46 |
+
{
|
47 |
+
$this->threads = $threads;
|
48 |
+
}
|
49 |
+
/**
|
50 |
+
* @return Google_Service_Gmail_Thread
|
51 |
+
*/
|
52 |
+
public function getThreads()
|
53 |
+
{
|
54 |
+
return $this->threads;
|
55 |
+
}
|
56 |
+
}
|
vendor/google/apiclient-services/src/Google/Service/Gmail/Message.php
CHANGED
@@ -1,110 +1,110 @@
|
|
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_Message extends Google_Collection
|
19 |
-
{
|
20 |
-
protected $collection_key = 'labelIds';
|
21 |
-
public $historyId;
|
22 |
-
public $id;
|
23 |
-
public $internalDate;
|
24 |
-
public $labelIds;
|
25 |
-
protected $payloadType = 'Google_Service_Gmail_MessagePart';
|
26 |
-
protected $payloadDataType = '';
|
27 |
-
public $raw;
|
28 |
-
public $sizeEstimate;
|
29 |
-
public $snippet;
|
30 |
-
public $threadId;
|
31 |
-
|
32 |
-
public function setHistoryId($historyId)
|
33 |
-
{
|
34 |
-
$this->historyId = $historyId;
|
35 |
-
}
|
36 |
-
public function getHistoryId()
|
37 |
-
{
|
38 |
-
return $this->historyId;
|
39 |
-
}
|
40 |
-
public function setId($id)
|
41 |
-
{
|
42 |
-
$this->id = $id;
|
43 |
-
}
|
44 |
-
public function getId()
|
45 |
-
{
|
46 |
-
return $this->id;
|
47 |
-
}
|
48 |
-
public function setInternalDate($internalDate)
|
49 |
-
{
|
50 |
-
$this->internalDate = $internalDate;
|
51 |
-
}
|
52 |
-
public function getInternalDate()
|
53 |
-
{
|
54 |
-
return $this->internalDate;
|
55 |
-
}
|
56 |
-
public function setLabelIds($labelIds)
|
57 |
-
{
|
58 |
-
$this->labelIds = $labelIds;
|
59 |
-
}
|
60 |
-
public function getLabelIds()
|
61 |
-
{
|
62 |
-
return $this->labelIds;
|
63 |
-
}
|
64 |
-
/**
|
65 |
-
* @param Google_Service_Gmail_MessagePart
|
66 |
-
*/
|
67 |
-
public function setPayload(Google_Service_Gmail_MessagePart $payload)
|
68 |
-
{
|
69 |
-
$this->payload = $payload;
|
70 |
-
}
|
71 |
-
/**
|
72 |
-
* @return Google_Service_Gmail_MessagePart
|
73 |
-
*/
|
74 |
-
public function getPayload()
|
75 |
-
{
|
76 |
-
return $this->payload;
|
77 |
-
}
|
78 |
-
public function setRaw($raw)
|
79 |
-
{
|
80 |
-
$this->raw = $raw;
|
81 |
-
}
|
82 |
-
public function getRaw()
|
83 |
-
{
|
84 |
-
return $this->raw;
|
85 |
-
}
|
86 |
-
public function setSizeEstimate($sizeEstimate)
|
87 |
-
{
|
88 |
-
$this->sizeEstimate = $sizeEstimate;
|
89 |
-
}
|
90 |
-
public function getSizeEstimate()
|
91 |
-
{
|
92 |
-
return $this->sizeEstimate;
|
93 |
-
}
|
94 |
-
public function setSnippet($snippet)
|
95 |
-
{
|
96 |
-
$this->snippet = $snippet;
|
97 |
-
}
|
98 |
-
public function getSnippet()
|
99 |
-
{
|
100 |
-
return $this->snippet;
|
101 |
-
}
|
102 |
-
public function setThreadId($threadId)
|
103 |
-
{
|
104 |
-
$this->threadId = $threadId;
|
105 |
-
}
|
106 |
-
public function getThreadId()
|
107 |
-
{
|
108 |
-
return $this->threadId;
|
109 |
-
}
|
110 |
-
}
|
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_Message extends Google_Collection
|
19 |
+
{
|
20 |
+
protected $collection_key = 'labelIds';
|
21 |
+
public $historyId;
|
22 |
+
public $id;
|
23 |
+
public $internalDate;
|
24 |
+
public $labelIds;
|
25 |
+
protected $payloadType = 'Google_Service_Gmail_MessagePart';
|
26 |
+
protected $payloadDataType = '';
|
27 |
+
public $raw;
|
28 |
+
public $sizeEstimate;
|
29 |
+
public $snippet;
|
30 |
+
public $threadId;
|
31 |
+
|
32 |
+
public function setHistoryId($historyId)
|
33 |
+
{
|
34 |
+
$this->historyId = $historyId;
|
35 |
+
}
|
36 |
+
public function getHistoryId()
|
37 |
+
{
|
38 |
+
return $this->historyId;
|
39 |
+
}
|
40 |
+
public function setId($id)
|
41 |
+
{
|
42 |
+
$this->id = $id;
|
43 |
+
}
|
44 |
+
public function getId()
|
45 |
+
{
|
46 |
+
return $this->id;
|
47 |
+
}
|
48 |
+
public function setInternalDate($internalDate)
|
49 |
+
{
|
50 |
+
$this->internalDate = $internalDate;
|
51 |
+
}
|
52 |
+
public function getInternalDate()
|
53 |
+
{
|
54 |
+
return $this->internalDate;
|
55 |
+
}
|
56 |
+
public function setLabelIds($labelIds)
|
57 |
+
{
|
58 |
+
$this->labelIds = $labelIds;
|
59 |
+
}
|
60 |
+
public function getLabelIds()
|
61 |
+
{
|
62 |
+
return $this->labelIds;
|
63 |
+
}
|
64 |
+
/**
|
65 |
+
* @param Google_Service_Gmail_MessagePart
|
66 |
+
*/
|
67 |
+
public function setPayload(Google_Service_Gmail_MessagePart $payload)
|
68 |
+
{
|
69 |
+
$this->payload = $payload;
|
70 |
+
}
|
71 |
+
/**
|
72 |
+
* @return Google_Service_Gmail_MessagePart
|
73 |
+
*/
|
74 |
+
public function getPayload()
|
75 |
+
{
|
76 |
+
return $this->payload;
|
77 |
+
}
|
78 |
+
public function setRaw($raw)
|
79 |
+
{
|
80 |
+
$this->raw = $raw;
|
81 |
+
}
|
82 |
+
public function getRaw()
|
83 |
+
{
|
84 |
+
return $this->raw;
|
85 |
+
}
|
86 |
+
public function setSizeEstimate($sizeEstimate)
|
87 |
+
{
|
88 |
+
$this->sizeEstimate = $sizeEstimate;
|
89 |
+
}
|
90 |
+
public function getSizeEstimate()
|
91 |
+
{
|
92 |
+
return $this->sizeEstimate;
|
93 |
+
}
|
94 |
+
public function setSnippet($snippet)
|
95 |
+
{
|
96 |
+
$this->snippet = $snippet;
|
97 |
+
}
|
98 |
+
public function getSnippet()
|
99 |
+
{
|
100 |
+
return $this->snippet;
|
101 |
+
}
|
102 |
+
public function setThreadId($threadId)
|
103 |
+
{
|
104 |
+
$this->threadId = $threadId;
|
105 |
+
}
|
106 |
+
public function getThreadId()
|
107 |
+
{
|
108 |
+
return $this->threadId;
|
109 |
+
}
|
110 |
+
}
|
vendor/google/apiclient-services/src/Google/Service/Gmail/MessagePart.php
CHANGED
@@ -1,97 +1,97 @@
|
|
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_MessagePart extends Google_Collection
|
19 |
-
{
|
20 |
-
protected $collection_key = 'parts';
|
21 |
-
protected $bodyType = 'Google_Service_Gmail_MessagePartBody';
|
22 |
-
protected $bodyDataType = '';
|
23 |
-
public $filename;
|
24 |
-
protected $headersType = 'Google_Service_Gmail_MessagePartHeader';
|
25 |
-
protected $headersDataType = 'array';
|
26 |
-
public $mimeType;
|
27 |
-
public $partId;
|
28 |
-
protected $partsType = 'Google_Service_Gmail_MessagePart';
|
29 |
-
protected $partsDataType = 'array';
|
30 |
-
|
31 |
-
/**
|
32 |
-
* @param Google_Service_Gmail_MessagePartBody
|
33 |
-
*/
|
34 |
-
public function setBody(Google_Service_Gmail_MessagePartBody $body)
|
35 |
-
{
|
36 |
-
$this->body = $body;
|
37 |
-
}
|
38 |
-
/**
|
39 |
-
* @return Google_Service_Gmail_MessagePartBody
|
40 |
-
*/
|
41 |
-
public function getBody()
|
42 |
-
{
|
43 |
-
return $this->body;
|
44 |
-
}
|
45 |
-
public function setFilename($filename)
|
46 |
-
{
|
47 |
-
$this->filename = $filename;
|
48 |
-
}
|
49 |
-
public function getFilename()
|
50 |
-
{
|
51 |
-
return $this->filename;
|
52 |
-
}
|
53 |
-
/**
|
54 |
-
* @param Google_Service_Gmail_MessagePartHeader
|
55 |
-
*/
|
56 |
-
public function setHeaders($headers)
|
57 |
-
{
|
58 |
-
$this->headers = $headers;
|
59 |
-
}
|
60 |
-
/**
|
61 |
-
* @return Google_Service_Gmail_MessagePartHeader
|
62 |
-
*/
|
63 |
-
public function getHeaders()
|
64 |
-
{
|
65 |
-
return $this->headers;
|
66 |
-
}
|
67 |
-
public function setMimeType($mimeType)
|
68 |
-
{
|
69 |
-
$this->mimeType = $mimeType;
|
70 |
-
}
|
71 |
-
public function getMimeType()
|
72 |
-
{
|
73 |
-
return $this->mimeType;
|
74 |
-
}
|
75 |
-
public function setPartId($partId)
|
76 |
-
{
|
77 |
-
$this->partId = $partId;
|
78 |
-
}
|
79 |
-
public function getPartId()
|
80 |
-
{
|
81 |
-
return $this->partId;
|
82 |
-
}
|
83 |
-
/**
|
84 |
-
* @param Google_Service_Gmail_MessagePart
|
85 |
-
*/
|
86 |
-
public function setParts($parts)
|
87 |
-
{
|
88 |
-
$this->parts = $parts;
|
89 |
-
}
|
90 |
-
/**
|
91 |
-
* @return Google_Service_Gmail_MessagePart
|
92 |
-
*/
|
93 |
-
public function getParts()
|
94 |
-
{
|
95 |
-
return $this->parts;
|
96 |
-
}
|
97 |
-
}
|
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_MessagePart extends Google_Collection
|
19 |
+
{
|
20 |
+
protected $collection_key = 'parts';
|
21 |
+
protected $bodyType = 'Google_Service_Gmail_MessagePartBody';
|
22 |
+
protected $bodyDataType = '';
|
23 |
+
public $filename;
|
24 |
+
protected $headersType = 'Google_Service_Gmail_MessagePartHeader';
|
25 |
+
protected $headersDataType = 'array';
|
26 |
+
public $mimeType;
|
27 |
+
public $partId;
|
28 |
+
protected $partsType = 'Google_Service_Gmail_MessagePart';
|
29 |
+
protected $partsDataType = 'array';
|
30 |
+
|
31 |
+
/**
|
32 |
+
* @param Google_Service_Gmail_MessagePartBody
|
33 |
+
*/
|
34 |
+
public function setBody(Google_Service_Gmail_MessagePartBody $body)
|
35 |
+
{
|
36 |
+
$this->body = $body;
|
37 |
+
}
|
38 |
+
/**
|
39 |
+
* @return Google_Service_Gmail_MessagePartBody
|
40 |
+
*/
|
41 |
+
public function getBody()
|
42 |
+
{
|
43 |
+
return $this->body;
|
44 |
+
}
|
45 |
+
public function setFilename($filename)
|
46 |
+
{
|
47 |
+
$this->filename = $filename;
|
48 |
+
}
|
49 |
+
public function getFilename()
|
50 |
+
{
|
51 |
+
return $this->filename;
|
52 |
+
}
|
53 |
+
/**
|
54 |
+
* @param Google_Service_Gmail_MessagePartHeader
|
55 |
+
*/
|
56 |
+
public function setHeaders($headers)
|
57 |
+
{
|
58 |
+
$this->headers = $headers;
|
59 |
+
}
|
60 |
+
/**
|
61 |
+
* @return Google_Service_Gmail_MessagePartHeader
|
62 |
+
*/
|
63 |
+
public function getHeaders()
|
64 |
+
{
|
65 |
+
return $this->headers;
|
66 |
+
}
|
67 |
+
public function setMimeType($mimeType)
|
68 |
+
{
|
69 |
+
$this->mimeType = $mimeType;
|
70 |
+
}
|
71 |
+
public function getMimeType()
|
72 |
+
{
|
73 |
+
return $this->mimeType;
|
74 |
+
}
|
75 |
+
public function setPartId($partId)
|
76 |
+
{
|
77 |
+
$this->partId = $partId;
|
78 |
+
}
|
79 |
+
public function getPartId()
|
80 |
+
{
|
81 |
+
return $this->partId;
|
82 |
+
}
|
83 |
+
/**
|
84 |
+
* @param Google_Service_Gmail_MessagePart
|
85 |
+
*/
|
86 |
+
public function setParts($parts)
|
87 |
+
{
|
88 |
+
$this->parts = $parts;
|
89 |
+
}
|
90 |
+
/**
|
91 |
+
* @return Google_Service_Gmail_MessagePart
|
92 |
+
*/
|
93 |
+
public function getParts()
|
94 |
+
{
|
95 |
+
return $this->parts;
|
96 |
+
}
|
97 |
+
}
|
vendor/google/apiclient-services/src/Google/Service/Gmail/MessagePartBody.php
CHANGED
@@ -1,48 +1,48 @@
|
|
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_MessagePartBody extends Google_Model
|
19 |
-
{
|
20 |
-
public $attachmentId;
|
21 |
-
public $data;
|
22 |
-
public $size;
|
23 |
-
|
24 |
-
public function setAttachmentId($attachmentId)
|
25 |
-
{
|
26 |
-
$this->attachmentId = $attachmentId;
|
27 |
-
}
|
28 |
-
public function getAttachmentId()
|
29 |
-
{
|
30 |
-
return $this->attachmentId;
|
31 |
-
}
|
32 |
-
public function setData($data)
|
33 |
-
{
|
34 |
-
$this->data = $data;
|
35 |
-
}
|
36 |
-
public function getData()
|
37 |
-
{
|
38 |
-
return $this->data;
|
39 |
-
}
|
40 |
-
public function setSize($size)
|
41 |
-
{
|
42 |
-
$this->size = $size;
|
43 |
-
}
|
44 |
-
public function getSize()
|
45 |
-
{
|
46 |
-
return $this->size;
|
47 |
-
}
|
48 |
-
}
|
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_MessagePartBody extends Google_Model
|
19 |
+
{
|
20 |
+
public $attachmentId;
|
21 |
+
public $data;
|
22 |
+
public $size;
|
23 |
+
|
24 |
+
public function setAttachmentId($attachmentId)
|
25 |
+
{
|
26 |
+
$this->attachmentId = $attachmentId;
|
27 |
+
}
|
28 |
+
public function getAttachmentId()
|
29 |
+
{
|
30 |
+
return $this->attachmentId;
|
31 |
+
}
|
32 |
+
public function setData($data)
|
33 |
+
{
|
34 |
+
$this->data = $data;
|
35 |
+
}
|
36 |
+
public function getData()
|
37 |
+
{
|
38 |
+
return $this->data;
|
39 |
+
}
|
40 |
+
public function setSize($size)
|
41 |
+
{
|
42 |
+
$this->size = $size;
|
43 |
+
}
|
44 |
+
public function getSize()
|
45 |
+
{
|
46 |
+
return $this->size;
|
47 |
+
}
|
48 |
+
}
|
vendor/google/apiclient-services/src/Google/Service/Gmail/MessagePartHeader.php
CHANGED
@@ -1,39 +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_MessagePartHeader extends Google_Model
|
19 |
-
{
|
20 |
-
public $name;
|
21 |
-
public $value;
|
22 |
-
|
23 |
-
public function setName($name)
|
24 |
-
{
|
25 |
-
$this->name = $name;
|
26 |
-
}
|
27 |
-
public function getName()
|
28 |
-
{
|
29 |
-
return $this->name;
|
30 |
-
}
|
31 |
-
public function setValue($value)
|
32 |
-
{
|
33 |
-
$this->value = $value;
|
34 |
-
}
|
35 |
-
public function getValue()
|
36 |
-
{
|
37 |
-
return $this->value;
|
38 |
-
}
|
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_MessagePartHeader extends Google_Model
|
19 |
+
{
|
20 |
+
public $name;
|
21 |
+
public $value;
|
22 |
+
|
23 |
+
public function setName($name)
|
24 |
+
{
|
25 |
+
$this->name = $name;
|
26 |
+
}
|
27 |
+
public function getName()
|
28 |
+
{
|
29 |
+
return $this->name;
|
30 |
+
}
|
31 |
+
public function setValue($value)
|
32 |
+
{
|
33 |
+
$this->value = $value;
|
34 |
+
}
|
35 |
+
public function getValue()
|
36 |
+
{
|
37 |
+
return $this->value;
|
38 |
+
}
|
39 |
+
}
|
vendor/google/apiclient-services/src/Google/Service/Gmail/ModifyMessageRequest.php
CHANGED
@@ -1,40 +1,40 @@
|
|
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_ModifyMessageRequest extends Google_Collection
|
19 |
-
{
|
20 |
-
protected $collection_key = 'removeLabelIds';
|
21 |
-
public $addLabelIds;
|
22 |
-
public $removeLabelIds;
|
23 |
-
|
24 |
-
public function setAddLabelIds($addLabelIds)
|
25 |
-
{
|
26 |
-
$this->addLabelIds = $addLabelIds;
|
27 |
-
}
|
28 |
-
public function getAddLabelIds()
|
29 |
-
{
|
30 |
-
return $this->addLabelIds;
|
31 |
-
}
|
32 |
-
public function setRemoveLabelIds($removeLabelIds)
|
33 |
-
{
|
34 |
-
$this->removeLabelIds = $removeLabelIds;
|
35 |
-
}
|
36 |
-
public function getRemoveLabelIds()
|
37 |
-
{
|
38 |
-
return $this->removeLabelIds;
|
39 |
-
}
|
40 |
-
}
|
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_ModifyMessageRequest extends Google_Collection
|
19 |
+
{
|
20 |
+
protected $collection_key = 'removeLabelIds';
|
21 |
+
public $addLabelIds;
|
22 |
+
public $removeLabelIds;
|
23 |
+
|
24 |
+
public function setAddLabelIds($addLabelIds)
|
25 |
+
{
|
26 |
+
$this->addLabelIds = $addLabelIds;
|
27 |
+
}
|
28 |
+
public function getAddLabelIds()
|
29 |
+
{
|
30 |
+
return $this->addLabelIds;
|
31 |
+
}
|
32 |
+
public function setRemoveLabelIds($removeLabelIds)
|
33 |
+
{
|
34 |
+
$this->removeLabelIds = $removeLabelIds;
|
35 |
+
}
|
36 |
+
public function getRemoveLabelIds()
|
37 |
+
{
|
38 |
+
return $this->removeLabelIds;
|
39 |
+
}
|
40 |
+
}
|
vendor/google/apiclient-services/src/Google/Service/Gmail/ModifyThreadRequest.php
CHANGED
@@ -1,40 +1,40 @@
|
|
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_ModifyThreadRequest extends Google_Collection
|
19 |
-
{
|
20 |
-
protected $collection_key = 'removeLabelIds';
|
21 |
-
public $addLabelIds;
|
22 |
-
public $removeLabelIds;
|
23 |
-
|
24 |
-
public function setAddLabelIds($addLabelIds)
|
25 |
-
{
|
26 |
-
$this->addLabelIds = $addLabelIds;
|
27 |
-
}
|
28 |
-
public function getAddLabelIds()
|
29 |
-
{
|
30 |
-
return $this->addLabelIds;
|
31 |
-
}
|
32 |
-
public function setRemoveLabelIds($removeLabelIds)
|
33 |
-
{
|
34 |
-
$this->removeLabelIds = $removeLabelIds;
|
35 |
-
}
|
36 |
-
public function getRemoveLabelIds()
|
37 |
-
{
|
38 |
-
return $this->removeLabelIds;
|
39 |
-
}
|
40 |
-
}
|
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_ModifyThreadRequest extends Google_Collection
|
19 |
+
{
|
20 |
+
protected $collection_key = 'removeLabelIds';
|
21 |
+
public $addLabelIds;
|
22 |
+
public $removeLabelIds;
|
23 |
+
|
24 |
+
public function setAddLabelIds($addLabelIds)
|
25 |
+
{
|
26 |
+
$this->addLabelIds = $addLabelIds;
|
27 |
+
}
|
28 |
+
public function getAddLabelIds()
|
29 |
+
{
|
30 |
+
return $this->addLabelIds;
|
31 |
+
}
|
32 |
+
public function setRemoveLabelIds($removeLabelIds)
|
33 |
+
{
|
34 |
+
$this->removeLabelIds = $removeLabelIds;
|
35 |
+
}
|
36 |
+
public function getRemoveLabelIds()
|
37 |
+
{
|
38 |
+
return $this->removeLabelIds;
|
39 |
+
}
|
40 |
+
}
|
vendor/google/apiclient-services/src/Google/Service/Gmail/PopSettings.php
CHANGED
@@ -1,39 +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_PopSettings extends Google_Model
|
19 |
-
{
|
20 |
-
public $accessWindow;
|
21 |
-
public $disposition;
|
22 |
-
|
23 |
-
public function setAccessWindow($accessWindow)
|
24 |
-
{
|
25 |
-
$this->accessWindow = $accessWindow;
|
26 |
-
}
|
27 |
-
public function getAccessWindow()
|
28 |
-
{
|
29 |
-
return $this->accessWindow;
|
30 |
-
}
|
31 |
-
public function setDisposition($disposition)
|
32 |
-
{
|
33 |
-
$this->disposition = $disposition;
|
34 |
-
}
|
35 |
-
public function getDisposition()
|
36 |
-
{
|
37 |
-
return $this->disposition;
|
38 |
-
}
|
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_PopSettings extends Google_Model
|
19 |
+
{
|
20 |
+
public $accessWindow;
|
21 |
+
public $disposition;
|
22 |
+
|
23 |
+
public function setAccessWindow($accessWindow)
|
24 |
+
{
|
25 |
+
$this->accessWindow = $accessWindow;
|
26 |
+
}
|
27 |
+
public function getAccessWindow()
|
28 |
+
{
|
29 |
+
return $this->accessWindow;
|
30 |
+
}
|
31 |
+
public function setDisposition($disposition)
|
32 |
+
{
|
33 |
+
$this->disposition = $disposition;
|
34 |
+
}
|
35 |
+
public function getDisposition()
|
36 |
+
{
|
37 |
+
return $this->disposition;
|
38 |
+
}
|
39 |
+
}
|
vendor/google/apiclient-services/src/Google/Service/Gmail/Profile.php
CHANGED
@@ -1,57 +1,57 @@
|
|
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_Profile extends Google_Model
|
19 |
-
{
|
20 |
-
public $emailAddress;
|
21 |
-
public $historyId;
|
22 |
-
public $messagesTotal;
|
23 |
-
public $threadsTotal;
|
24 |
-
|
25 |
-
public function setEmailAddress($emailAddress)
|
26 |
-
{
|
27 |
-
$this->emailAddress = $emailAddress;
|
28 |
-
}
|
29 |
-
public function getEmailAddress()
|
30 |
-
{
|
31 |
-
return $this->emailAddress;
|
32 |
-
}
|
33 |
-
public function setHistoryId($historyId)
|
34 |
-
{
|
35 |
-
$this->historyId = $historyId;
|
36 |
-
}
|
37 |
-
public function getHistoryId()
|
38 |
-
{
|
39 |
-
return $this->historyId;
|
40 |
-
}
|
41 |
-
public function setMessagesTotal($messagesTotal)
|
42 |
-
{
|
43 |
-
$this->messagesTotal = $messagesTotal;
|
44 |
-
}
|
45 |
-
public function getMessagesTotal()
|
46 |
-
{
|
47 |
-
return $this->messagesTotal;
|
48 |
-
}
|
49 |
-
public function setThreadsTotal($threadsTotal)
|
50 |
-
{
|
51 |
-
$this->threadsTotal = $threadsTotal;
|
52 |
-
}
|
53 |
-
public function getThreadsTotal()
|
54 |
-
{
|
55 |
-
return $this->threadsTotal;
|
56 |
-
}
|
57 |
-
}
|
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_Profile extends Google_Model
|
19 |
+
{
|
20 |
+
public $emailAddress;
|
21 |
+
public $historyId;
|
22 |
+
public $messagesTotal;
|
23 |
+
public $threadsTotal;
|
24 |
+
|
25 |
+
public function setEmailAddress($emailAddress)
|
26 |
+
{
|
27 |
+
$this->emailAddress = $emailAddress;
|
28 |
+
}
|
29 |
+
public function getEmailAddress()
|
30 |
+
{
|
31 |
+
return $this->emailAddress;
|
32 |
+
}
|
33 |
+
public function setHistoryId($historyId)
|
34 |
+
{
|
35 |
+
$this->historyId = $historyId;
|
36 |
+
}
|
37 |
+
public function getHistoryId()
|
38 |
+
{
|
39 |
+
return $this->historyId;
|
40 |
+
}
|
41 |
+
public function setMessagesTotal($messagesTotal)
|
42 |
+
{
|
43 |
+
$this->messagesTotal = $messagesTotal;
|
44 |
+
}
|
45 |
+
public function getMessagesTotal()
|
46 |
+
{
|
47 |
+
return $this->messagesTotal;
|
48 |
+
}
|
49 |
+
public function setThreadsTotal($threadsTotal)
|
50 |
+
{
|
51 |
+
$this->threadsTotal = $threadsTotal;
|
52 |
+
}
|
53 |
+
public function getThreadsTotal()
|
54 |
+
{
|
55 |
+
return $this->threadsTotal;
|
56 |
+
}
|
57 |
+
}
|
vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/Users.php
CHANGED
@@ -1,71 +1,71 @@
|
|
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 "users" collection of methods.
|
20 |
-
* Typical usage is:
|
21 |
-
* <code>
|
22 |
-
* $gmailService = new Google_Service_Gmail(...);
|
23 |
-
* $users = $gmailService->users;
|
24 |
-
* </code>
|
25 |
-
*/
|
26 |
-
class Google_Service_Gmail_Resource_Users extends Google_Service_Resource
|
27 |
-
{
|
28 |
-
/**
|
29 |
-
* Gets the current user's Gmail profile. (users.getProfile)
|
30 |
-
*
|
31 |
-
* @param string $userId The user's email address. The special value me can be
|
32 |
-
* used to indicate the authenticated user.
|
33 |
-
* @param array $optParams Optional parameters.
|
34 |
-
* @return Google_Service_Gmail_Profile
|
35 |
-
*/
|
36 |
-
public function getProfile($userId, $optParams = array())
|
37 |
-
{
|
38 |
-
$params = array('userId' => $userId);
|
39 |
-
$params = array_merge($params, $optParams);
|
40 |
-
return $this->call('getProfile', array($params), "Google_Service_Gmail_Profile");
|
41 |
-
}
|
42 |
-
/**
|
43 |
-
* Stop receiving push notifications for the given user mailbox. (users.stop)
|
44 |
-
*
|
45 |
-
* @param string $userId The user's email address. The special value me can be
|
46 |
-
* used to indicate the authenticated user.
|
47 |
-
* @param array $optParams Optional parameters.
|
48 |
-
*/
|
49 |
-
public function stop($userId, $optParams = array())
|
50 |
-
{
|
51 |
-
$params = array('userId' => $userId);
|
52 |
-
$params = array_merge($params, $optParams);
|
53 |
-
return $this->call('stop', array($params));
|
54 |
-
}
|
55 |
-
/**
|
56 |
-
* Set up or update a push notification watch on the given user mailbox.
|
57 |
-
* (users.watch)
|
58 |
-
*
|
59 |
-
* @param string $userId The user's email address. The special value me can be
|
60 |
-
* used to indicate the authenticated user.
|
61 |
-
* @param Google_Service_Gmail_WatchRequest $postBody
|
62 |
-
* @param array $optParams Optional parameters.
|
63 |
-
* @return Google_Service_Gmail_WatchResponse
|
64 |
-
*/
|
65 |
-
public function watch($userId, Google_Service_Gmail_WatchRequest $postBody, $optParams = array())
|
66 |
-
{
|
67 |
-
$params = array('userId' => $userId, 'postBody' => $postBody);
|
68 |
-
$params = array_merge($params, $optParams);
|
69 |
-
return $this->call('watch', array($params), "Google_Service_Gmail_WatchResponse");
|
70 |
-
}
|
71 |
-
}
|
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 "users" collection of methods.
|
20 |
+
* Typical usage is:
|
21 |
+
* <code>
|
22 |
+
* $gmailService = new Google_Service_Gmail(...);
|
23 |
+
* $users = $gmailService->users;
|
24 |
+
* </code>
|
25 |
+
*/
|
26 |
+
class Google_Service_Gmail_Resource_Users extends Google_Service_Resource
|
27 |
+
{
|
28 |
+
/**
|
29 |
+
* Gets the current user's Gmail profile. (users.getProfile)
|
30 |
+
*
|
31 |
+
* @param string $userId The user's email address. The special value me can be
|
32 |
+
* used to indicate the authenticated user.
|
33 |
+
* @param array $optParams Optional parameters.
|
34 |
+
* @return Google_Service_Gmail_Profile
|
35 |
+
*/
|
36 |
+
public function getProfile($userId, $optParams = array())
|
37 |
+
{
|
38 |
+
$params = array('userId' => $userId);
|
39 |
+
$params = array_merge($params, $optParams);
|
40 |
+
return $this->call('getProfile', array($params), "Google_Service_Gmail_Profile");
|
41 |
+
}
|
42 |
+
/**
|
43 |
+
* Stop receiving push notifications for the given user mailbox. (users.stop)
|
44 |
+
*
|
45 |
+
* @param string $userId The user's email address. The special value me can be
|
46 |
+
* used to indicate the authenticated user.
|
47 |
+
* @param array $optParams Optional parameters.
|
48 |
+
*/
|
49 |
+
public function stop($userId, $optParams = array())
|
50 |
+
{
|
51 |
+
$params = array('userId' => $userId);
|
52 |
+
$params = array_merge($params, $optParams);
|
53 |
+
return $this->call('stop', array($params));
|
54 |
+
}
|
55 |
+
/**
|
56 |
+
* Set up or update a push notification watch on the given user mailbox.
|
57 |
+
* (users.watch)
|
58 |
+
*
|
59 |
+
* @param string $userId The user's email address. The special value me can be
|
60 |
+
* used to indicate the authenticated user.
|
61 |
+
* @param Google_Service_Gmail_WatchRequest $postBody
|
62 |
+
* @param array $optParams Optional parameters.
|
63 |
+
* @return Google_Service_Gmail_WatchResponse
|
64 |
+
*/
|
65 |
+
public function watch($userId, Google_Service_Gmail_WatchRequest $postBody, $optParams = array())
|
66 |
+
{
|
67 |
+
$params = array('userId' => $userId, 'postBody' => $postBody);
|
68 |
+
$params = array_merge($params, $optParams);
|
69 |
+
return $this->call('watch', array($params), "Google_Service_Gmail_WatchResponse");
|
70 |
+
}
|
71 |
+
}
|
vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersDrafts.php
CHANGED
@@ -1,130 +1,130 @@
|
|
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 "drafts" collection of methods.
|
20 |
-
* Typical usage is:
|
21 |
-
* <code>
|
22 |
-
* $gmailService = new Google_Service_Gmail(...);
|
23 |
-
* $drafts = $gmailService->drafts;
|
24 |
-
* </code>
|
25 |
-
*/
|
26 |
-
class Google_Service_Gmail_Resource_UsersDrafts extends Google_Service_Resource
|
27 |
-
{
|
28 |
-
/**
|
29 |
-
* Creates a new draft with the DRAFT label. (drafts.create)
|
30 |
-
*
|
31 |
-
* @param string $userId The user's email address. The special value me can be
|
32 |
-
* used to indicate the authenticated user.
|
33 |
-
* @param Google_Service_Gmail_Draft $postBody
|
34 |
-
* @param array $optParams Optional parameters.
|
35 |
-
* @return Google_Service_Gmail_Draft
|
36 |
-
*/
|
37 |
-
public function create($userId, Google_Service_Gmail_Draft $postBody, $optParams = array())
|
38 |
-
{
|
39 |
-
$params = array('userId' => $userId, 'postBody' => $postBody);
|
40 |
-
$params = array_merge($params, $optParams);
|
41 |
-
return $this->call('create', array($params), "Google_Service_Gmail_Draft");
|
42 |
-
}
|
43 |
-
/**
|
44 |
-
* Immediately and permanently deletes the specified draft. Does not simply
|
45 |
-
* trash it. (drafts.delete)
|
46 |
-
*
|
47 |
-
* @param string $userId The user's email address. The special value me can be
|
48 |
-
* used to indicate the authenticated user.
|
49 |
-
* @param string $id The ID of the draft to delete.
|
50 |
-
* @param array $optParams Optional parameters.
|
51 |
-
*/
|
52 |
-
public function delete($userId, $id, $optParams = array())
|
53 |
-
{
|
54 |
-
$params = array('userId' => $userId, 'id' => $id);
|
55 |
-
$params = array_merge($params, $optParams);
|
56 |
-
return $this->call('delete', array($params));
|
57 |
-
}
|
58 |
-
/**
|
59 |
-
* Gets the specified draft. (drafts.get)
|
60 |
-
*
|
61 |
-
* @param string $userId The user's email address. The special value me can be
|
62 |
-
* used to indicate the authenticated user.
|
63 |
-
* @param string $id The ID of the draft to retrieve.
|
64 |
-
* @param array $optParams Optional parameters.
|
65 |
-
*
|
66 |
-
* @opt_param string format The format to return the draft in.
|
67 |
-
* @return Google_Service_Gmail_Draft
|
68 |
-
*/
|
69 |
-
public function get($userId, $id, $optParams = array())
|
70 |
-
{
|
71 |
-
$params = array('userId' => $userId, 'id' => $id);
|
72 |
-
$params = array_merge($params, $optParams);
|
73 |
-
return $this->call('get', array($params), "Google_Service_Gmail_Draft");
|
74 |
-
}
|
75 |
-
/**
|
76 |
-
* Lists the drafts in the user's mailbox. (drafts.listUsersDrafts)
|
77 |
-
*
|
78 |
-
* @param string $userId The user's email address. The special value me can be
|
79 |
-
* used to indicate the authenticated user.
|
80 |
-
* @param array $optParams Optional parameters.
|
81 |
-
*
|
82 |
-
* @opt_param bool includeSpamTrash Include drafts from SPAM and TRASH in the
|
83 |
-
* results.
|
84 |
-
* @opt_param string maxResults Maximum number of drafts to return.
|
85 |
-
* @opt_param string pageToken Page token to retrieve a specific page of results
|
86 |
-
* in the list.
|
87 |
-
* @opt_param string q Only return draft messages matching the specified query.
|
88 |
-
* Supports the same query format as the Gmail search box. For example,
|
89 |
-
* "from:someuser@example.com rfc822msgid: is:unread".
|
90 |
-
* @return Google_Service_Gmail_ListDraftsResponse
|
91 |
-
*/
|
92 |
-
public function listUsersDrafts($userId, $optParams = array())
|
93 |
-
{
|
94 |
-
$params = array('userId' => $userId);
|
95 |
-
$params = array_merge($params, $optParams);
|
96 |
-
return $this->call('list', array($params), "Google_Service_Gmail_ListDraftsResponse");
|
97 |
-
}
|
98 |
-
/**
|
99 |
-
* Sends the specified, existing draft to the recipients in the To, Cc, and Bcc
|
100 |
-
* headers. (drafts.send)
|
101 |
-
*
|
102 |
-
* @param string $userId The user's email address. The special value me can be
|
103 |
-
* used to indicate the authenticated user.
|
104 |
-
* @param Google_Service_Gmail_Draft $postBody
|
105 |
-
* @param array $optParams Optional parameters.
|
106 |
-
* @return Google_Service_Gmail_Message
|
107 |
-
*/
|
108 |
-
public function send($userId, Google_Service_Gmail_Draft $postBody, $optParams = array())
|
109 |
-
{
|
110 |
-
$params = array('userId' => $userId, 'postBody' => $postBody);
|
111 |
-
$params = array_merge($params, $optParams);
|
112 |
-
return $this->call('send', array($params), "Google_Service_Gmail_Message");
|
113 |
-
}
|
114 |
-
/**
|
115 |
-
* Replaces a draft's content. (drafts.update)
|
116 |
-
*
|
117 |
-
* @param string $userId The user's email address. The special value me can be
|
118 |
-
* used to indicate the authenticated user.
|
119 |
-
* @param string $id The ID of the draft to update.
|
120 |
-
* @param Google_Service_Gmail_Draft $postBody
|
121 |
-
* @param array $optParams Optional parameters.
|
122 |
-
* @return Google_Service_Gmail_Draft
|
123 |
-
*/
|
124 |
-
public function update($userId, $id, Google_Service_Gmail_Draft $postBody, $optParams = array())
|
125 |
-
{
|
126 |
-
$params = array('userId' => $userId, 'id' => $id, 'postBody' => $postBody);
|
127 |
-
$params = array_merge($params, $optParams);
|
128 |
-
return $this->call('update', array($params), "Google_Service_Gmail_Draft");
|
129 |
-
}
|
130 |
-
}
|
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 "drafts" collection of methods.
|
20 |
+
* Typical usage is:
|
21 |
+
* <code>
|
22 |
+
* $gmailService = new Google_Service_Gmail(...);
|
23 |
+
* $drafts = $gmailService->drafts;
|
24 |
+
* </code>
|
25 |
+
*/
|
26 |
+
class Google_Service_Gmail_Resource_UsersDrafts extends Google_Service_Resource
|
27 |
+
{
|
28 |
+
/**
|
29 |
+
* Creates a new draft with the DRAFT label. (drafts.create)
|
30 |
+
*
|
31 |
+
* @param string $userId The user's email address. The special value me can be
|
32 |
+
* used to indicate the authenticated user.
|
33 |
+
* @param Google_Service_Gmail_Draft $postBody
|
34 |
+
* @param array $optParams Optional parameters.
|
35 |
+
* @return Google_Service_Gmail_Draft
|
36 |
+
*/
|
37 |
+
public function create($userId, Google_Service_Gmail_Draft $postBody, $optParams = array())
|
38 |
+
{
|
39 |
+
$params = array('userId' => $userId, 'postBody' => $postBody);
|
40 |
+
$params = array_merge($params, $optParams);
|
41 |
+
return $this->call('create', array($params), "Google_Service_Gmail_Draft");
|
42 |
+
}
|
43 |
+
/**
|
44 |
+
* Immediately and permanently deletes the specified draft. Does not simply
|
45 |
+
* trash it. (drafts.delete)
|
46 |
+
*
|
47 |
+
* @param string $userId The user's email address. The special value me can be
|
48 |
+
* used to indicate the authenticated user.
|
49 |
+
* @param string $id The ID of the draft to delete.
|
50 |
+
* @param array $optParams Optional parameters.
|
51 |
+
*/
|
52 |
+
public function delete($userId, $id, $optParams = array())
|
53 |
+
{
|
54 |
+
$params = array('userId' => $userId, 'id' => $id);
|
55 |
+
$params = array_merge($params, $optParams);
|
56 |
+
return $this->call('delete', array($params));
|
57 |
+
}
|
58 |
+
/**
|
59 |
+
* Gets the specified draft. (drafts.get)
|
60 |
+
*
|
61 |
+
* @param string $userId The user's email address. The special value me can be
|
62 |
+
* used to indicate the authenticated user.
|
63 |
+
* @param string $id The ID of the draft to retrieve.
|
64 |
+
* @param array $optParams Optional parameters.
|
65 |
+
*
|
66 |
+
* @opt_param string format The format to return the draft in.
|
67 |
+
* @return Google_Service_Gmail_Draft
|
68 |
+
*/
|
69 |
+
public function get($userId, $id, $optParams = array())
|
70 |
+
{
|
71 |
+
$params = array('userId' => $userId, 'id' => $id);
|
72 |
+
$params = array_merge($params, $optParams);
|
73 |
+
return $this->call('get', array($params), "Google_Service_Gmail_Draft");
|
74 |
+
}
|
75 |
+
/**
|
76 |
+
* Lists the drafts in the user's mailbox. (drafts.listUsersDrafts)
|
77 |
+
*
|
78 |
+
* @param string $userId The user's email address. The special value me can be
|
79 |
+
* used to indicate the authenticated user.
|
80 |
+
* @param array $optParams Optional parameters.
|
81 |
+
*
|
82 |
+
* @opt_param bool includeSpamTrash Include drafts from SPAM and TRASH in the
|
83 |
+
* results.
|
84 |
+
* @opt_param string maxResults Maximum number of drafts to return.
|
85 |
+
* @opt_param string pageToken Page token to retrieve a specific page of results
|
86 |
+
* in the list.
|
87 |
+
* @opt_param string q Only return draft messages matching the specified query.
|
88 |
+
* Supports the same query format as the Gmail search box. For example,
|
89 |
+
* "from:someuser@example.com rfc822msgid: is:unread".
|
90 |
+
* @return Google_Service_Gmail_ListDraftsResponse
|
91 |
+
*/
|
92 |
+
public function listUsersDrafts($userId, $optParams = array())
|
93 |
+
{
|
94 |
+
$params = array('userId' => $userId);
|
95 |
+
$params = array_merge($params, $optParams);
|
96 |
+
return $this->call('list', array($params), "Google_Service_Gmail_ListDraftsResponse");
|
97 |
+
}
|
98 |
+
/**
|
99 |
+
* Sends the specified, existing draft to the recipients in the To, Cc, and Bcc
|
100 |
+
* headers. (drafts.send)
|
101 |
+
*
|
102 |
+
* @param string $userId The user's email address. The special value me can be
|
103 |
+
* used to indicate the authenticated user.
|
104 |
+
* @param Google_Service_Gmail_Draft $postBody
|
105 |
+
* @param array $optParams Optional parameters.
|
106 |
+
* @return Google_Service_Gmail_Message
|
107 |
+
*/
|
108 |
+
public function send($userId, Google_Service_Gmail_Draft $postBody, $optParams = array())
|
109 |
+
{
|
110 |
+
$params = array('userId' => $userId, 'postBody' => $postBody);
|
111 |
+
$params = array_merge($params, $optParams);
|
112 |
+
return $this->call('send', array($params), "Google_Service_Gmail_Message");
|
113 |
+
}
|
114 |
+
/**
|
115 |
+
* Replaces a draft's content. (drafts.update)
|
116 |
+
*
|
117 |
+
* @param string $userId The user's email address. The special value me can be
|
118 |
+
* used to indicate the authenticated user.
|
119 |
+
* @param string $id The ID of the draft to update.
|
120 |
+
* @param Google_Service_Gmail_Draft $postBody
|
121 |
+
* @param array $optParams Optional parameters.
|
122 |
+
* @return Google_Service_Gmail_Draft
|
123 |
+
*/
|
124 |
+
public function update($userId, $id, Google_Service_Gmail_Draft $postBody, $optParams = array())
|
125 |
+
{
|
126 |
+
$params = array('userId' => $userId, 'id' => $id, 'postBody' => $postBody);
|
127 |
+
$params = array_merge($params, $optParams);
|
128 |
+
return $this->call('update', array($params), "Google_Service_Gmail_Draft");
|
129 |
+
}
|
130 |
+
}
|
vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersHistory.php
CHANGED
@@ -1,61 +1,61 @@
|
|
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 "history" collection of methods.
|
20 |
-
* Typical usage is:
|
21 |
-
* <code>
|
22 |
-
* $gmailService = new Google_Service_Gmail(...);
|
23 |
-
* $history = $gmailService->history;
|
24 |
-
* </code>
|
25 |
-
*/
|
26 |
-
class Google_Service_Gmail_Resource_UsersHistory extends Google_Service_Resource
|
27 |
-
{
|
28 |
-
/**
|
29 |
-
* Lists the history of all changes to the given mailbox. History results are
|
30 |
-
* returned in chronological order (increasing historyId).
|
31 |
-
* (history.listUsersHistory)
|
32 |
-
*
|
33 |
-
* @param string $userId The user's email address. The special value me can be
|
34 |
-
* used to indicate the authenticated user.
|
35 |
-
* @param array $optParams Optional parameters.
|
36 |
-
*
|
37 |
-
* @opt_param string historyTypes History types to be returned by the function
|
38 |
-
* @opt_param string labelId Only return messages with a label matching the ID.
|
39 |
-
* @opt_param string maxResults The maximum number of history records to return.
|
40 |
-
* @opt_param string pageToken Page token to retrieve a specific page of results
|
41 |
-
* in the list.
|
42 |
-
* @opt_param string startHistoryId Required. Returns history records after the
|
43 |
-
* specified startHistoryId. The supplied startHistoryId should be obtained from
|
44 |
-
* the historyId of a message, thread, or previous list response. History IDs
|
45 |
-
* increase chronologically but are not contiguous with random gaps in between
|
46 |
-
* valid IDs. Supplying an invalid or out of date startHistoryId typically
|
47 |
-
* returns an HTTP 404 error code. A historyId is typically valid for at least a
|
48 |
-
* week, but in some rare circumstances may be valid for only a few hours. If
|
49 |
-
* you receive an HTTP 404 error response, your application should perform a
|
50 |
-
* full sync. If you receive no nextPageToken in the response, there are no
|
51 |
-
* updates to retrieve and you can store the returned historyId for a future
|
52 |
-
* request.
|
53 |
-
* @return Google_Service_Gmail_ListHistoryResponse
|
54 |
-
*/
|
55 |
-
public function listUsersHistory($userId, $optParams = array())
|
56 |
-
{
|
57 |
-
$params = array('userId' => $userId);
|
58 |
-
$params = array_merge($params, $optParams);
|
59 |
-
return $this->call('list', array($params), "Google_Service_Gmail_ListHistoryResponse");
|
60 |
-
}
|
61 |
-
}
|
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 "history" collection of methods.
|
20 |
+
* Typical usage is:
|
21 |
+
* <code>
|
22 |
+
* $gmailService = new Google_Service_Gmail(...);
|
23 |
+
* $history = $gmailService->history;
|
24 |
+
* </code>
|
25 |
+
*/
|
26 |
+
class Google_Service_Gmail_Resource_UsersHistory extends Google_Service_Resource
|
27 |
+
{
|
28 |
+
/**
|
29 |
+
* Lists the history of all changes to the given mailbox. History results are
|
30 |
+
* returned in chronological order (increasing historyId).
|
31 |
+
* (history.listUsersHistory)
|
32 |
+
*
|
33 |
+
* @param string $userId The user's email address. The special value me can be
|
34 |
+
* used to indicate the authenticated user.
|
35 |
+
* @param array $optParams Optional parameters.
|
36 |
+
*
|
37 |
+
* @opt_param string historyTypes History types to be returned by the function
|
38 |
+
* @opt_param string labelId Only return messages with a label matching the ID.
|
39 |
+
* @opt_param string maxResults The maximum number of history records to return.
|
40 |
+
* @opt_param string pageToken Page token to retrieve a specific page of results
|
41 |
+
* in the list.
|
42 |
+
* @opt_param string startHistoryId Required. Returns history records after the
|
43 |
+
* specified startHistoryId. The supplied startHistoryId should be obtained from
|
44 |
+
* the historyId of a message, thread, or previous list response. History IDs
|
45 |
+
* increase chronologically but are not contiguous with random gaps in between
|
46 |
+
* valid IDs. Supplying an invalid or out of date startHistoryId typically
|
47 |
+
* returns an HTTP 404 error code. A historyId is typically valid for at least a
|
48 |
+
* week, but in some rare circumstances may be valid for only a few hours. If
|
49 |
+
* you receive an HTTP 404 error response, your application should perform a
|
50 |
+
* full sync. If you receive no nextPageToken in the response, there are no
|
51 |
+
* updates to retrieve and you can store the returned historyId for a future
|
52 |
+
* request.
|
53 |
+
* @return Google_Service_Gmail_ListHistoryResponse
|
54 |
+
*/
|
55 |
+
public function listUsersHistory($userId, $optParams = array())
|
56 |
+
{
|
57 |
+
$params = array('userId' => $userId);
|
58 |
+
$params = array_merge($params, $optParams);
|
59 |
+
return $this->call('list', array($params), "Google_Service_Gmail_ListHistoryResponse");
|
60 |
+
}
|
61 |
+
}
|
vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersLabels.php
CHANGED
@@ -1,120 +1,120 @@
|
|
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 "labels" collection of methods.
|
20 |
-
* Typical usage is:
|
21 |
-
* <code>
|
22 |
-
* $gmailService = new Google_Service_Gmail(...);
|
23 |
-
* $labels = $gmailService->labels;
|
24 |
-
* </code>
|
25 |
-
*/
|
26 |
-
class Google_Service_Gmail_Resource_UsersLabels extends Google_Service_Resource
|
27 |
-
{
|
28 |
-
/**
|
29 |
-
* Creates a new label. (labels.create)
|
30 |
-
*
|
31 |
-
* @param string $userId The user's email address. The special value me can be
|
32 |
-
* used to indicate the authenticated user.
|
33 |
-
* @param Google_Service_Gmail_Label $postBody
|
34 |
-
* @param array $optParams Optional parameters.
|
35 |
-
* @return Google_Service_Gmail_Label
|
36 |
-
*/
|
37 |
-
public function create($userId, Google_Service_Gmail_Label $postBody, $optParams = array())
|
38 |
-
{
|
39 |
-
$params = array('userId' => $userId, 'postBody' => $postBody);
|
40 |
-
$params = array_merge($params, $optParams);
|
41 |
-
return $this->call('create', array($params), "Google_Service_Gmail_Label");
|
42 |
-
}
|
43 |
-
/**
|
44 |
-
* Immediately and permanently deletes the specified label and removes it from
|
45 |
-
* any messages and threads that it is applied to. (labels.delete)
|
46 |
-
*
|
47 |
-
* @param string $userId The user's email address. The special value me can be
|
48 |
-
* used to indicate the authenticated user.
|
49 |
-
* @param string $id The ID of the label to delete.
|
50 |
-
* @param array $optParams Optional parameters.
|
51 |
-
*/
|
52 |
-
public function delete($userId, $id, $optParams = array())
|
53 |
-
{
|
54 |
-
$params = array('userId' => $userId, 'id' => $id);
|
55 |
-
$params = array_merge($params, $optParams);
|
56 |
-
return $this->call('delete', array($params));
|
57 |
-
}
|
58 |
-
/**
|
59 |
-
* Gets the specified label. (labels.get)
|
60 |
-
*
|
61 |
-
* @param string $userId The user's email address. The special value me can be
|
62 |
-
* used to indicate the authenticated user.
|
63 |
-
* @param string $id The ID of the label to retrieve.
|
64 |
-
* @param array $optParams Optional parameters.
|
65 |
-
* @return Google_Service_Gmail_Label
|
66 |
-
*/
|
67 |
-
public function get($userId, $id, $optParams = array())
|
68 |
-
{
|
69 |
-
$params = array('userId' => $userId, 'id' => $id);
|
70 |
-
$params = array_merge($params, $optParams);
|
71 |
-
return $this->call('get', array($params), "Google_Service_Gmail_Label");
|
72 |
-
}
|
73 |
-
/**
|
74 |
-
* Lists all labels in the user's mailbox. (labels.listUsersLabels)
|
75 |
-
*
|
76 |
-
* @param string $userId The user's email address. The special value me can be
|
77 |
-
* used to indicate the authenticated user.
|
78 |
-
* @param array $optParams Optional parameters.
|
79 |
-
* @return Google_Service_Gmail_ListLabelsResponse
|
80 |
-
*/
|
81 |
-
public function listUsersLabels($userId, $optParams = array())
|
82 |
-
{
|
83 |
-
$params = array('userId' => $userId);
|
84 |
-
$params = array_merge($params, $optParams);
|
85 |
-
return $this->call('list', array($params), "Google_Service_Gmail_ListLabelsResponse");
|
86 |
-
}
|
87 |
-
/**
|
88 |
-
* Updates the specified label. This method supports patch semantics.
|
89 |
-
* (labels.patch)
|
90 |
-
*
|
91 |
-
* @param string $userId The user's email address. The special value me can be
|
92 |
-
* used to indicate the authenticated user.
|
93 |
-
* @param string $id The ID of the label to update.
|
94 |
-
* @param Google_Service_Gmail_Label $postBody
|
95 |
-
* @param array $optParams Optional parameters.
|
96 |
-
* @return Google_Service_Gmail_Label
|
97 |
-
*/
|
98 |
-
public function patch($userId, $id, Google_Service_Gmail_Label $postBody, $optParams = array())
|
99 |
-
{
|
100 |
-
$params = array('userId' => $userId, 'id' => $id, 'postBody' => $postBody);
|
101 |
-
$params = array_merge($params, $optParams);
|
102 |
-
return $this->call('patch', array($params), "Google_Service_Gmail_Label");
|
103 |
-
}
|
104 |
-
/**
|
105 |
-
* Updates the specified label. (labels.update)
|
106 |
-
*
|
107 |
-
* @param string $userId The user's email address. The special value me can be
|
108 |
-
* used to indicate the authenticated user.
|
109 |
-
* @param string $id The ID of the label to update.
|
110 |
-
* @param Google_Service_Gmail_Label $postBody
|
111 |
-
* @param array $optParams Optional parameters.
|
112 |
-
* @return Google_Service_Gmail_Label
|
113 |
-
*/
|
114 |
-
public function update($userId, $id, Google_Service_Gmail_Label $postBody, $optParams = array())
|
115 |
-
{
|
116 |
-
$params = array('userId' => $userId, 'id' => $id, 'postBody' => $postBody);
|
117 |
-
$params = array_merge($params, $optParams);
|
118 |
-
return $this->call('update', array($params), "Google_Service_Gmail_Label");
|
119 |
-
}
|
120 |
-
}
|
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 "labels" collection of methods.
|
20 |
+
* Typical usage is:
|
21 |
+
* <code>
|
22 |
+
* $gmailService = new Google_Service_Gmail(...);
|
23 |
+
* $labels = $gmailService->labels;
|
24 |
+
* </code>
|
25 |
+
*/
|
26 |
+
class Google_Service_Gmail_Resource_UsersLabels extends Google_Service_Resource
|
27 |
+
{
|
28 |
+
/**
|
29 |
+
* Creates a new label. (labels.create)
|
30 |
+
*
|
31 |
+
* @param string $userId The user's email address. The special value me can be
|
32 |
+
* used to indicate the authenticated user.
|
33 |
+
* @param Google_Service_Gmail_Label $postBody
|
34 |
+
* @param array $optParams Optional parameters.
|
35 |
+
* @return Google_Service_Gmail_Label
|
36 |
+
*/
|
37 |
+
public function create($userId, Google_Service_Gmail_Label $postBody, $optParams = array())
|
38 |
+
{
|
39 |
+
$params = array('userId' => $userId, 'postBody' => $postBody);
|
40 |
+
$params = array_merge($params, $optParams);
|
41 |
+
return $this->call('create', array($params), "Google_Service_Gmail_Label");
|
42 |
+
}
|
43 |
+
/**
|
44 |
+
* Immediately and permanently deletes the specified label and removes it from
|
45 |
+
* any messages and threads that it is applied to. (labels.delete)
|
46 |
+
*
|
47 |
+
* @param string $userId The user's email address. The special value me can be
|
48 |
+
* used to indicate the authenticated user.
|
49 |
+
* @param string $id The ID of the label to delete.
|
50 |
+
* @param array $optParams Optional parameters.
|
51 |
+
*/
|
52 |
+
public function delete($userId, $id, $optParams = array())
|
53 |
+
{
|
54 |
+
$params = array('userId' => $userId, 'id' => $id);
|
55 |
+
$params = array_merge($params, $optParams);
|
56 |
+
return $this->call('delete', array($params));
|
57 |
+
}
|
58 |
+
/**
|
59 |
+
* Gets the specified label. (labels.get)
|
60 |
+
*
|
61 |
+
* @param string $userId The user's email address. The special value me can be
|
62 |
+
* used to indicate the authenticated user.
|
63 |
+
* @param string $id The ID of the label to retrieve.
|
64 |
+
* @param array $optParams Optional parameters.
|
65 |
+
* @return Google_Service_Gmail_Label
|
66 |
+
*/
|
67 |
+
public function get($userId, $id, $optParams = array())
|
68 |
+
{
|
69 |
+
$params = array('userId' => $userId, 'id' => $id);
|
70 |
+
$params = array_merge($params, $optParams);
|
71 |
+
return $this->call('get', array($params), "Google_Service_Gmail_Label");
|
72 |
+
}
|
73 |
+
/**
|
74 |
+
* Lists all labels in the user's mailbox. (labels.listUsersLabels)
|
75 |
+
*
|
76 |
+
* @param string $userId The user's email address. The special value me can be
|
77 |
+
* used to indicate the authenticated user.
|
78 |
+
* @param array $optParams Optional parameters.
|
79 |
+
* @return Google_Service_Gmail_ListLabelsResponse
|
80 |
+
*/
|
81 |
+
public function listUsersLabels($userId, $optParams = array())
|
82 |
+
{
|
83 |
+
$params = array('userId' => $userId);
|
84 |
+
$params = array_merge($params, $optParams);
|
85 |
+
return $this->call('list', array($params), "Google_Service_Gmail_ListLabelsResponse");
|
86 |
+
}
|
87 |
+
/**
|
88 |
+
* Updates the specified label. This method supports patch semantics.
|
89 |
+
* (labels.patch)
|
90 |
+
*
|
91 |
+
* @param string $userId The user's email address. The special value me can be
|
92 |
+
* used to indicate the authenticated user.
|
93 |
+
* @param string $id The ID of the label to update.
|
94 |
+
* @param Google_Service_Gmail_Label $postBody
|
95 |
+
* @param array $optParams Optional parameters.
|
96 |
+
* @return Google_Service_Gmail_Label
|
97 |
+
*/
|
98 |
+
public function patch($userId, $id, Google_Service_Gmail_Label $postBody, $optParams = array())
|
99 |
+
{
|
100 |
+
$params = array('userId' => $userId, 'id' => $id, 'postBody' => $postBody);
|
101 |
+
$params = array_merge($params, $optParams);
|
102 |
+
return $this->call('patch', array($params), "Google_Service_Gmail_Label");
|
103 |
+
}
|
104 |
+
/**
|
105 |
+
* Updates the specified label. (labels.update)
|
106 |
+
*
|
107 |
+
* @param string $userId The user's email address. The special value me can be
|
108 |
+
* used to indicate the authenticated user.
|
109 |
+
* @param string $id The ID of the label to update.
|
110 |
+
* @param Google_Service_Gmail_Label $postBody
|
111 |
+
* @param array $optParams Optional parameters.
|
112 |
+
* @return Google_Service_Gmail_Label
|
113 |
+
*/
|
114 |
+
public function update($userId, $id, Google_Service_Gmail_Label $postBody, $optParams = array())
|
115 |
+
{
|
116 |
+
$params = array('userId' => $userId, 'id' => $id, 'postBody' => $postBody);
|
117 |
+
$params = array_merge($params, $optParams);
|
118 |
+
return $this->call('update', array($params), "Google_Service_Gmail_Label");
|
119 |
+
}
|
120 |
+
}
|
vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersMessages.php
CHANGED
@@ -1,229 +1,229 @@
|
|
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 "messages" collection of methods.
|
20 |
-
* Typical usage is:
|
21 |
-
* <code>
|
22 |
-
* $gmailService = new Google_Service_Gmail(...);
|
23 |
-
* $messages = $gmailService->messages;
|
24 |
-
* </code>
|
25 |
-
*/
|
26 |
-
class Google_Service_Gmail_Resource_UsersMessages extends Google_Service_Resource
|
27 |
-
{
|
28 |
-
/**
|
29 |
-
* Deletes many messages by message ID. Provides no guarantees that messages
|
30 |
-
* were not already deleted or even existed at all. (messages.batchDelete)
|
31 |
-
*
|
32 |
-
* @param string $userId The user's email address. The special value me can be
|
33 |
-
* used to indicate the authenticated user.
|
34 |
-
* @param Google_Service_Gmail_BatchDeleteMessagesRequest $postBody
|
35 |
-
* @param array $optParams Optional parameters.
|
36 |
-
*/
|
37 |
-
public function batchDelete($userId, Google_Service_Gmail_BatchDeleteMessagesRequest $postBody, $optParams = array())
|
38 |
-
{
|
39 |
-
$params = array('userId' => $userId, 'postBody' => $postBody);
|
40 |
-
$params = array_merge($params, $optParams);
|
41 |
-
return $this->call('batchDelete', array($params));
|
42 |
-
}
|
43 |
-
/**
|
44 |
-
* Modifies the labels on the specified messages. (messages.batchModify)
|
45 |
-
*
|
46 |
-
* @param string $userId The user's email address. The special value me can be
|
47 |
-
* used to indicate the authenticated user.
|
48 |
-
* @param Google_Service_Gmail_BatchModifyMessagesRequest $postBody
|
49 |
-
* @param array $optParams Optional parameters.
|
50 |
-
*/
|
51 |
-
public function batchModify($userId, Google_Service_Gmail_BatchModifyMessagesRequest $postBody, $optParams = array())
|
52 |
-
{
|
53 |
-
$params = array('userId' => $userId, 'postBody' => $postBody);
|
54 |
-
$params = array_merge($params, $optParams);
|
55 |
-
return $this->call('batchModify', array($params));
|
56 |
-
}
|
57 |
-
/**
|
58 |
-
* Immediately and permanently deletes the specified message. This operation
|
59 |
-
* cannot be undone. Prefer messages.trash instead. (messages.delete)
|
60 |
-
*
|
61 |
-
* @param string $userId The user's email address. The special value me can be
|
62 |
-
* used to indicate the authenticated user.
|
63 |
-
* @param string $id The ID of the message to delete.
|
64 |
-
* @param array $optParams Optional parameters.
|
65 |
-
*/
|
66 |
-
public function delete($userId, $id, $optParams = array())
|
67 |
-
{
|
68 |
-
$params = array('userId' => $userId, 'id' => $id);
|
69 |
-
$params = array_merge($params, $optParams);
|
70 |
-
return $this->call('delete', array($params));
|
71 |
-
}
|
72 |
-
/**
|
73 |
-
* Gets the specified message. (messages.get)
|
74 |
-
*
|
75 |
-
* @param string $userId The user's email address. The special value me can be
|
76 |
-
* used to indicate the authenticated user.
|
77 |
-
* @param string $id The ID of the message to retrieve.
|
78 |
-
* @param array $optParams Optional parameters.
|
79 |
-
*
|
80 |
-
* @opt_param string format The format to return the message in.
|
81 |
-
* @opt_param string metadataHeaders When given and format is METADATA, only
|
82 |
-
* include headers specified.
|
83 |
-
* @return Google_Service_Gmail_Message
|
84 |
-
*/
|
85 |
-
public function get($userId, $id, $optParams = array())
|
86 |
-
{
|
87 |
-
$params = array('userId' => $userId, 'id' => $id);
|
88 |
-
$params = array_merge($params, $optParams);
|
89 |
-
return $this->call('get', array($params), "Google_Service_Gmail_Message");
|
90 |
-
}
|
91 |
-
/**
|
92 |
-
* Imports a message into only this user's mailbox, with standard email delivery
|
93 |
-
* scanning and classification similar to receiving via SMTP. Does not send a
|
94 |
-
* message. (messages.import)
|
95 |
-
*
|
96 |
-
* @param string $userId The user's email address. The special value me can be
|
97 |
-
* used to indicate the authenticated user.
|
98 |
-
* @param Google_Service_Gmail_Message $postBody
|
99 |
-
* @param array $optParams Optional parameters.
|
100 |
-
*
|
101 |
-
* @opt_param bool deleted Mark the email as permanently deleted (not TRASH) and
|
102 |
-
* only visible in Google Vault to a Vault administrator. Only used for G Suite
|
103 |
-
* accounts.
|
104 |
-
* @opt_param string internalDateSource Source for Gmail's internal date of the
|
105 |
-
* message.
|
106 |
-
* @opt_param bool neverMarkSpam Ignore the Gmail spam classifier decision and
|
107 |
-
* never mark this email as SPAM in the mailbox.
|
108 |
-
* @opt_param bool processForCalendar Process calendar invites in the email and
|
109 |
-
* add any extracted meetings to the Google Calendar for this user.
|
110 |
-
* @return Google_Service_Gmail_Message
|
111 |
-
*/
|
112 |
-
public function import($userId, Google_Service_Gmail_Message $postBody, $optParams = array())
|
113 |
-
{
|
114 |
-
$params = array('userId' => $userId, 'postBody' => $postBody);
|
115 |
-
$params = array_merge($params, $optParams);
|
116 |
-
return $this->call('import', array($params), "Google_Service_Gmail_Message");
|
117 |
-
}
|
118 |
-
/**
|
119 |
-
* Directly inserts a message into only this user's mailbox similar to IMAP
|
120 |
-
* APPEND, bypassing most scanning and classification. Does not send a message.
|
121 |
-
* (messages.insert)
|
122 |
-
*
|
123 |
-
* @param string $userId The user's email address. The special value me can be
|
124 |
-
* used to indicate the authenticated user.
|
125 |
-
* @param Google_Service_Gmail_Message $postBody
|
126 |
-
* @param array $optParams Optional parameters.
|
127 |
-
*
|
128 |
-
* @opt_param bool deleted Mark the email as permanently deleted (not TRASH) and
|
129 |
-
* only visible in Google Vault to a Vault administrator. Only used for G Suite
|
130 |
-
* accounts.
|
131 |
-
* @opt_param string internalDateSource Source for Gmail's internal date of the
|
132 |
-
* message.
|
133 |
-
* @return Google_Service_Gmail_Message
|
134 |
-
*/
|
135 |
-
public function insert($userId, Google_Service_Gmail_Message $postBody, $optParams = array())
|
136 |
-
{
|
137 |
-
$params = array('userId' => $userId, 'postBody' => $postBody);
|
138 |
-
$params = array_merge($params, $optParams);
|
139 |
-
return $this->call('insert', array($params), "Google_Service_Gmail_Message");
|
140 |
-
}
|
141 |
-
/**
|
142 |
-
* Lists the messages in the user's mailbox. (messages.listUsersMessages)
|
143 |
-
*
|
144 |
-
* @param string $userId The user's email address. The special value me can be
|
145 |
-
* used to indicate the authenticated user.
|
146 |
-
* @param array $optParams Optional parameters.
|
147 |
-
*
|
148 |
-
* @opt_param bool includeSpamTrash Include messages from SPAM and TRASH in the
|
149 |
-
* results.
|
150 |
-
* @opt_param string labelIds Only return messages with labels that match all of
|
151 |
-
* the specified label IDs.
|
152 |
-
* @opt_param string maxResults Maximum number of messages to return.
|
153 |
-
* @opt_param string pageToken Page token to retrieve a specific page of results
|
154 |
-
* in the list.
|
155 |
-
* @opt_param string q Only return messages matching the specified query.
|
156 |
-
* Supports the same query format as the Gmail search box. For example,
|
157 |
-
* "from:someuser@example.com rfc822msgid: is:unread". Parameter cannot be used
|
158 |
-
* when accessing the api using the gmail.metadata scope.
|
159 |
-
* @return Google_Service_Gmail_ListMessagesResponse
|
160 |
-
*/
|
161 |
-
public function listUsersMessages($userId, $optParams = array())
|
162 |
-
{
|
163 |
-
$params = array('userId' => $userId);
|
164 |
-
$params = array_merge($params, $optParams);
|
165 |
-
return $this->call('list', array($params), "Google_Service_Gmail_ListMessagesResponse");
|
166 |
-
}
|
167 |
-
/**
|
168 |
-
* Modifies the labels on the specified message. (messages.modify)
|
169 |
-
*
|
170 |
-
* @param string $userId The user's email address. The special value me can be
|
171 |
-
* used to indicate the authenticated user.
|
172 |
-
* @param string $id The ID of the message to modify.
|
173 |
-
* @param Google_Service_Gmail_ModifyMessageRequest $postBody
|
174 |
-
* @param array $optParams Optional parameters.
|
175 |
-
* @return Google_Service_Gmail_Message
|
176 |
-
*/
|
177 |
-
public function modify($userId, $id, Google_Service_Gmail_ModifyMessageRequest $postBody, $optParams = array())
|
178 |
-
{
|
179 |
-
$params = array('userId' => $userId, 'id' => $id, 'postBody' => $postBody);
|
180 |
-
$params = array_merge($params, $optParams);
|
181 |
-
return $this->call('modify', array($params), "Google_Service_Gmail_Message");
|
182 |
-
}
|
183 |
-
/**
|
184 |
-
* Sends the specified message to the recipients in the To, Cc, and Bcc headers.
|
185 |
-
* (messages.send)
|
186 |
-
*
|
187 |
-
* @param string $userId The user's email address. The special value me can be
|
188 |
-
* used to indicate the authenticated user.
|
189 |
-
* @param Google_Service_Gmail_Message $postBody
|
190 |
-
* @param array $optParams Optional parameters.
|
191 |
-
* @return Google_Service_Gmail_Message
|
192 |
-
*/
|
193 |
-
public function send($userId, Google_Service_Gmail_Message $postBody, $optParams = array())
|
194 |
-
{
|
195 |
-
$params = array('userId' => $userId, 'postBody' => $postBody);
|
196 |
-
$params = array_merge($params, $optParams);
|
197 |
-
return $this->call('send', array($params), "Google_Service_Gmail_Message");
|
198 |
-
}
|
199 |
-
/**
|
200 |
-
* Moves the specified message to the trash. (messages.trash)
|
201 |
-
*
|
202 |
-
* @param string $userId The user's email address. The special value me can be
|
203 |
-
* used to indicate the authenticated user.
|
204 |
-
* @param string $id The ID of the message to Trash.
|
205 |
-
* @param array $optParams Optional parameters.
|
206 |
-
* @return Google_Service_Gmail_Message
|
207 |
-
*/
|
208 |
-
public function trash($userId, $id, $optParams = array())
|
209 |
-
{
|
210 |
-
$params = array('userId' => $userId, 'id' => $id);
|
211 |
-
$params = array_merge($params, $optParams);
|
212 |
-
return $this->call('trash', array($params), "Google_Service_Gmail_Message");
|
213 |
-
}
|
214 |
-
/**
|
215 |
-
* Removes the specified message from the trash. (messages.untrash)
|
216 |
-
*
|
217 |
-
* @param string $userId The user's email address. The special value me can be
|
218 |
-
* used to indicate the authenticated user.
|
219 |
-
* @param string $id The ID of the message to remove from Trash.
|
220 |
-
* @param array $optParams Optional parameters.
|
221 |
-
* @return Google_Service_Gmail_Message
|
222 |
-
*/
|
223 |
-
public function untrash($userId, $id, $optParams = array())
|
224 |
-
{
|
225 |
-
$params = array('userId' => $userId, 'id' => $id);
|
226 |
-
$params = array_merge($params, $optParams);
|
227 |
-
return $this->call('untrash', array($params), "Google_Service_Gmail_Message");
|
228 |
-
}
|
229 |
-
}
|
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 "messages" collection of methods.
|
20 |
+
* Typical usage is:
|
21 |
+
* <code>
|
22 |
+
* $gmailService = new Google_Service_Gmail(...);
|
23 |
+
* $messages = $gmailService->messages;
|
24 |
+
* </code>
|
25 |
+
*/
|
26 |
+
class Google_Service_Gmail_Resource_UsersMessages extends Google_Service_Resource
|
27 |
+
{
|
28 |
+
/**
|
29 |
+
* Deletes many messages by message ID. Provides no guarantees that messages
|
30 |
+
* were not already deleted or even existed at all. (messages.batchDelete)
|
31 |
+
*
|
32 |
+
* @param string $userId The user's email address. The special value me can be
|
33 |
+
* used to indicate the authenticated user.
|
34 |
+
* @param Google_Service_Gmail_BatchDeleteMessagesRequest $postBody
|
35 |
+
* @param array $optParams Optional parameters.
|
36 |
+
*/
|
37 |
+
public function batchDelete($userId, Google_Service_Gmail_BatchDeleteMessagesRequest $postBody, $optParams = array())
|
38 |
+
{
|
39 |
+
$params = array('userId' => $userId, 'postBody' => $postBody);
|
40 |
+
$params = array_merge($params, $optParams);
|
41 |
+
return $this->call('batchDelete', array($params));
|
42 |
+
}
|
43 |
+
/**
|
44 |
+
* Modifies the labels on the specified messages. (messages.batchModify)
|
45 |
+
*
|
46 |
+
* @param string $userId The user's email address. The special value me can be
|
47 |
+
* used to indicate the authenticated user.
|
48 |
+
* @param Google_Service_Gmail_BatchModifyMessagesRequest $postBody
|
49 |
+
* @param array $optParams Optional parameters.
|
50 |
+
*/
|
51 |
+
public function batchModify($userId, Google_Service_Gmail_BatchModifyMessagesRequest $postBody, $optParams = array())
|
52 |
+
{
|
53 |
+
$params = array('userId' => $userId, 'postBody' => $postBody);
|
54 |
+
$params = array_merge($params, $optParams);
|
55 |
+
return $this->call('batchModify', array($params));
|
56 |
+
}
|
57 |
+
/**
|
58 |
+
* Immediately and permanently deletes the specified message. This operation
|
59 |
+
* cannot be undone. Prefer messages.trash instead. (messages.delete)
|
60 |
+
*
|
61 |
+
* @param string $userId The user's email address. The special value me can be
|
62 |
+
* used to indicate the authenticated user.
|
63 |
+
* @param string $id The ID of the message to delete.
|
64 |
+
* @param array $optParams Optional parameters.
|
65 |
+
*/
|
66 |
+
public function delete($userId, $id, $optParams = array())
|
67 |
+
{
|
68 |
+
$params = array('userId' => $userId, 'id' => $id);
|
69 |
+
$params = array_merge($params, $optParams);
|
70 |
+
return $this->call('delete', array($params));
|
71 |
+
}
|
72 |
+
/**
|
73 |
+
* Gets the specified message. (messages.get)
|
74 |
+
*
|
75 |
+
* @param string $userId The user's email address. The special value me can be
|
76 |
+
* used to indicate the authenticated user.
|
77 |
+
* @param string $id The ID of the message to retrieve.
|
78 |
+
* @param array $optParams Optional parameters.
|
79 |
+
*
|
80 |
+
* @opt_param string format The format to return the message in.
|
81 |
+
* @opt_param string metadataHeaders When given and format is METADATA, only
|
82 |
+
* include headers specified.
|
83 |
+
* @return Google_Service_Gmail_Message
|
84 |
+
*/
|
85 |
+
public function get($userId, $id, $optParams = array())
|
86 |
+
{
|
87 |
+
$params = array('userId' => $userId, 'id' => $id);
|
88 |
+
$params = array_merge($params, $optParams);
|
89 |
+
return $this->call('get', array($params), "Google_Service_Gmail_Message");
|
90 |
+
}
|
91 |
+
/**
|
92 |
+
* Imports a message into only this user's mailbox, with standard email delivery
|
93 |
+
* scanning and classification similar to receiving via SMTP. Does not send a
|
94 |
+
* message. (messages.import)
|
95 |
+
*
|
96 |
+
* @param string $userId The user's email address. The special value me can be
|
97 |
+
* used to indicate the authenticated user.
|
98 |
+
* @param Google_Service_Gmail_Message $postBody
|
99 |
+
* @param array $optParams Optional parameters.
|
100 |
+
*
|
101 |
+
* @opt_param bool deleted Mark the email as permanently deleted (not TRASH) and
|
102 |
+
* only visible in Google Vault to a Vault administrator. Only used for G Suite
|
103 |
+
* accounts.
|
104 |
+
* @opt_param string internalDateSource Source for Gmail's internal date of the
|
105 |
+
* message.
|
106 |
+
* @opt_param bool neverMarkSpam Ignore the Gmail spam classifier decision and
|
107 |
+
* never mark this email as SPAM in the mailbox.
|
108 |
+
* @opt_param bool processForCalendar Process calendar invites in the email and
|
109 |
+
* add any extracted meetings to the Google Calendar for this user.
|
110 |
+
* @return Google_Service_Gmail_Message
|
111 |
+
*/
|
112 |
+
public function import($userId, Google_Service_Gmail_Message $postBody, $optParams = array())
|
113 |
+
{
|
114 |
+
$params = array('userId' => $userId, 'postBody' => $postBody);
|
115 |
+
$params = array_merge($params, $optParams);
|
116 |
+
return $this->call('import', array($params), "Google_Service_Gmail_Message");
|
117 |
+
}
|
118 |
+
/**
|
119 |
+
* Directly inserts a message into only this user's mailbox similar to IMAP
|
120 |
+
* APPEND, bypassing most scanning and classification. Does not send a message.
|
121 |
+
* (messages.insert)
|
122 |
+
*
|
123 |
+
* @param string $userId The user's email address. The special value me can be
|
124 |
+
* used to indicate the authenticated user.
|
125 |
+
* @param Google_Service_Gmail_Message $postBody
|
126 |
+
* @param array $optParams Optional parameters.
|
127 |
+
*
|
128 |
+
* @opt_param bool deleted Mark the email as permanently deleted (not TRASH) and
|
129 |
+
* only visible in Google Vault to a Vault administrator. Only used for G Suite
|
130 |
+
* accounts.
|
131 |
+
* @opt_param string internalDateSource Source for Gmail's internal date of the
|
132 |
+
* message.
|
133 |
+
* @return Google_Service_Gmail_Message
|
134 |
+
*/
|
135 |
+
public function insert($userId, Google_Service_Gmail_Message $postBody, $optParams = array())
|
136 |
+
{
|
137 |
+
$params = array('userId' => $userId, 'postBody' => $postBody);
|
138 |
+
$params = array_merge($params, $optParams);
|
139 |
+
return $this->call('insert', array($params), "Google_Service_Gmail_Message");
|
140 |
+
}
|
141 |
+
/**
|
142 |
+
* Lists the messages in the user's mailbox. (messages.listUsersMessages)
|
143 |
+
*
|
144 |
+
* @param string $userId The user's email address. The special value me can be
|
145 |
+
* used to indicate the authenticated user.
|
146 |
+
* @param array $optParams Optional parameters.
|
147 |
+
*
|
148 |
+
* @opt_param bool includeSpamTrash Include messages from SPAM and TRASH in the
|
149 |
+
* results.
|
150 |
+
* @opt_param string labelIds Only return messages with labels that match all of
|
151 |
+
* the specified label IDs.
|
152 |
+
* @opt_param string maxResults Maximum number of messages to return.
|
153 |
+
* @opt_param string pageToken Page token to retrieve a specific page of results
|
154 |
+
* in the list.
|
155 |
+
* @opt_param string q Only return messages matching the specified query.
|
156 |
+
* Supports the same query format as the Gmail search box. For example,
|
157 |
+
* "from:someuser@example.com rfc822msgid: is:unread". Parameter cannot be used
|
158 |
+
* when accessing the api using the gmail.metadata scope.
|
159 |
+
* @return Google_Service_Gmail_ListMessagesResponse
|
160 |
+
*/
|
161 |
+
public function listUsersMessages($userId, $optParams = array())
|
162 |
+
{
|
163 |
+
$params = array('userId' => $userId);
|
164 |
+
$params = array_merge($params, $optParams);
|
165 |
+
return $this->call('list', array($params), "Google_Service_Gmail_ListMessagesResponse");
|
166 |
+
}
|
167 |
+
/**
|
168 |
+
* Modifies the labels on the specified message. (messages.modify)
|
169 |
+
*
|
170 |
+
* @param string $userId The user's email address. The special value me can be
|
171 |
+
* used to indicate the authenticated user.
|
172 |
+
* @param string $id The ID of the message to modify.
|
173 |
+
* @param Google_Service_Gmail_ModifyMessageRequest $postBody
|
174 |
+
* @param array $optParams Optional parameters.
|
175 |
+
* @return Google_Service_Gmail_Message
|
176 |
+
*/
|
177 |
+
public function modify($userId, $id, Google_Service_Gmail_ModifyMessageRequest $postBody, $optParams = array())
|
178 |
+
{
|
179 |
+
$params = array('userId' => $userId, 'id' => $id, 'postBody' => $postBody);
|
180 |
+
$params = array_merge($params, $optParams);
|
181 |
+
return $this->call('modify', array($params), "Google_Service_Gmail_Message");
|
182 |
+
}
|
183 |
+
/**
|
184 |
+
* Sends the specified message to the recipients in the To, Cc, and Bcc headers.
|
185 |
+
* (messages.send)
|
186 |
+
*
|
187 |
+
* @param string $userId The user's email address. The special value me can be
|
188 |
+
* used to indicate the authenticated user.
|
189 |
+
* @param Google_Service_Gmail_Message $postBody
|
190 |
+
* @param array $optParams Optional parameters.
|
191 |
+
* @return Google_Service_Gmail_Message
|
192 |
+
*/
|
193 |
+
public function send($userId, Google_Service_Gmail_Message $postBody, $optParams = array())
|
194 |
+
{
|
195 |
+
$params = array('userId' => $userId, 'postBody' => $postBody);
|
196 |
+
$params = array_merge($params, $optParams);
|
197 |
+
return $this->call('send', array($params), "Google_Service_Gmail_Message");
|
198 |
+
}
|
199 |
+
/**
|
200 |
+
* Moves the specified message to the trash. (messages.trash)
|
201 |
+
*
|
202 |
+
* @param string $userId The user's email address. The special value me can be
|
203 |
+
* used to indicate the authenticated user.
|
204 |
+
* @param string $id The ID of the message to Trash.
|
205 |
+
* @param array $optParams Optional parameters.
|
206 |
+
* @return Google_Service_Gmail_Message
|
207 |
+
*/
|
208 |
+
public function trash($userId, $id, $optParams = array())
|
209 |
+
{
|
210 |
+
$params = array('userId' => $userId, 'id' => $id);
|
211 |
+
$params = array_merge($params, $optParams);
|
212 |
+
return $this->call('trash', array($params), "Google_Service_Gmail_Message");
|
213 |
+
}
|
214 |
+
/**
|
215 |
+
* Removes the specified message from the trash. (messages.untrash)
|
216 |
+
*
|
217 |
+
* @param string $userId The user's email address. The special value me can be
|
218 |
+
* used to indicate the authenticated user.
|
219 |
+
* @param string $id The ID of the message to remove from Trash.
|
220 |
+
* @param array $optParams Optional parameters.
|
221 |
+
* @return Google_Service_Gmail_Message
|
222 |
+
*/
|
223 |
+
public function untrash($userId, $id, $optParams = array())
|
224 |
+
{
|
225 |
+
$params = array('userId' => $userId, 'id' => $id);
|
226 |
+
$params = array_merge($params, $optParams);
|
227 |
+
return $this->call('untrash', array($params), "Google_Service_Gmail_Message");
|
228 |
+
}
|
229 |
+
}
|
vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersMessagesAttachments.php
CHANGED
@@ -1,44 +1,44 @@
|
|
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 "attachments" collection of methods.
|
20 |
-
* Typical usage is:
|
21 |
-
* <code>
|
22 |
-
* $gmailService = new Google_Service_Gmail(...);
|
23 |
-
* $attachments = $gmailService->attachments;
|
24 |
-
* </code>
|
25 |
-
*/
|
26 |
-
class Google_Service_Gmail_Resource_UsersMessagesAttachments extends Google_Service_Resource
|
27 |
-
{
|
28 |
-
/**
|
29 |
-
* Gets the specified message attachment. (attachments.get)
|
30 |
-
*
|
31 |
-
* @param string $userId The user's email address. The special value me can be
|
32 |
-
* used to indicate the authenticated user.
|
33 |
-
* @param string $messageId The ID of the message containing the attachment.
|
34 |
-
* @param string $id The ID of the attachment.
|
35 |
-
* @param array $optParams Optional parameters.
|
36 |
-
* @return Google_Service_Gmail_MessagePartBody
|
37 |
-
*/
|
38 |
-
public function get($userId, $messageId, $id, $optParams = array())
|
39 |
-
{
|
40 |
-
$params = array('userId' => $userId, 'messageId' => $messageId, 'id' => $id);
|
41 |
-
$params = array_merge($params, $optParams);
|
42 |
-
return $this->call('get', array($params), "Google_Service_Gmail_MessagePartBody");
|
43 |
-
}
|
44 |
-
}
|
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 "attachments" collection of methods.
|
20 |
+
* Typical usage is:
|
21 |
+
* <code>
|
22 |
+
* $gmailService = new Google_Service_Gmail(...);
|
23 |
+
* $attachments = $gmailService->attachments;
|
24 |
+
* </code>
|
25 |
+
*/
|
26 |
+
class Google_Service_Gmail_Resource_UsersMessagesAttachments extends Google_Service_Resource
|
27 |
+
{
|
28 |
+
/**
|
29 |
+
* Gets the specified message attachment. (attachments.get)
|
30 |
+
*
|
31 |
+
* @param string $userId The user's email address. The special value me can be
|
32 |
+
* used to indicate the authenticated user.
|
33 |
+
* @param string $messageId The ID of the message containing the attachment.
|
34 |
+
* @param string $id The ID of the attachment.
|
35 |
+
* @param array $optParams Optional parameters.
|
36 |
+
* @return Google_Service_Gmail_MessagePartBody
|
37 |
+
*/
|
38 |
+
public function get($userId, $messageId, $id, $optParams = array())
|
39 |
+
{
|
40 |
+
$params = array('userId' => $userId, 'messageId' => $messageId, 'id' => $id);
|
41 |
+
$params = array_merge($params, $optParams);
|
42 |
+
return $this->call('get', array($params), "Google_Service_Gmail_MessagePartBody");
|
43 |
+
}
|
44 |
+
}
|
vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersSettings.php
CHANGED
@@ -1,149 +1,184 @@
|
|
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 "settings" collection of methods.
|
20 |
-
* Typical usage is:
|
21 |
-
* <code>
|
22 |
-
* $gmailService = new Google_Service_Gmail(...);
|
23 |
-
* $settings = $gmailService->settings;
|
24 |
-
* </code>
|
25 |
-
*/
|
26 |
-
class Google_Service_Gmail_Resource_UsersSettings extends Google_Service_Resource
|
27 |
-
{
|
28 |
-
/**
|
29 |
-
* Gets the auto-forwarding setting for the specified account.
|
30 |
-
* (settings.getAutoForwarding)
|
31 |
-
*
|
32 |
-
* @param string $userId User's email address. The special value "me" can be
|
33 |
-
* used to indicate the authenticated user.
|
34 |
-
* @param array $optParams Optional parameters.
|
35 |
-
* @return Google_Service_Gmail_AutoForwarding
|
36 |
-
*/
|
37 |
-
public function getAutoForwarding($userId, $optParams = array())
|
38 |
-
{
|
39 |
-
$params = array('userId' => $userId);
|
40 |
-
$params = array_merge($params, $optParams);
|
41 |
-
return $this->call('getAutoForwarding', array($params), "Google_Service_Gmail_AutoForwarding");
|
42 |
-
}
|
43 |
-
/**
|
44 |
-
* Gets IMAP settings. (settings.getImap)
|
45 |
-
*
|
46 |
-
* @param string $userId User's email address. The special value "me" can be
|
47 |
-
* used to indicate the authenticated user.
|
48 |
-
* @param array $optParams Optional parameters.
|
49 |
-
* @return Google_Service_Gmail_ImapSettings
|
50 |
-
*/
|
51 |
-
public function getImap($userId, $optParams = array())
|
52 |
-
{
|
53 |
-
$params = array('userId' => $userId);
|
54 |
-
$params = array_merge($params, $optParams);
|
55 |
-
return $this->call('getImap', array($params), "Google_Service_Gmail_ImapSettings");
|
56 |
-
}
|
57 |
-
/**
|
58 |
-
* Gets
|
59 |
-
*
|
60 |
-
* @param string $userId User's email address. The special value "me" can be
|
61 |
-
* used to indicate the authenticated user.
|
62 |
-
* @param array $optParams Optional parameters.
|
63 |
-
* @return
|
64 |
-
*/
|
65 |
-
public function
|
66 |
-
{
|
67 |
-
$params = array('userId' => $userId);
|
68 |
-
$params = array_merge($params, $optParams);
|
69 |
-
return $this->call('
|
70 |
-
}
|
71 |
-
/**
|
72 |
-
* Gets
|
73 |
-
*
|
74 |
-
* @param string $userId User's email address. The special value "me" can be
|
75 |
-
* used to indicate the authenticated user.
|
76 |
-
* @param array $optParams Optional parameters.
|
77 |
-
* @return
|
78 |
-
*/
|
79 |
-
public function
|
80 |
-
{
|
81 |
-
$params = array('userId' => $userId);
|
82 |
-
$params = array_merge($params, $optParams);
|
83 |
-
return $this->call('
|
84 |
-
}
|
85 |
-
/**
|
86 |
-
*
|
87 |
-
*
|
88 |
-
*
|
89 |
-
*
|
90 |
-
*
|
91 |
-
*
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
*
|
106 |
-
*
|
107 |
-
*
|
108 |
-
*
|
109 |
-
* @param
|
110 |
-
* @
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
$params =
|
116 |
-
$
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
*
|
121 |
-
*
|
122 |
-
*
|
123 |
-
*
|
124 |
-
* @param
|
125 |
-
* @
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
$params =
|
131 |
-
$
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
*
|
136 |
-
*
|
137 |
-
*
|
138 |
-
*
|
139 |
-
*
|
140 |
-
*
|
141 |
-
*
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 "settings" collection of methods.
|
20 |
+
* Typical usage is:
|
21 |
+
* <code>
|
22 |
+
* $gmailService = new Google_Service_Gmail(...);
|
23 |
+
* $settings = $gmailService->settings;
|
24 |
+
* </code>
|
25 |
+
*/
|
26 |
+
class Google_Service_Gmail_Resource_UsersSettings extends Google_Service_Resource
|
27 |
+
{
|
28 |
+
/**
|
29 |
+
* Gets the auto-forwarding setting for the specified account.
|
30 |
+
* (settings.getAutoForwarding)
|
31 |
+
*
|
32 |
+
* @param string $userId User's email address. The special value "me" can be
|
33 |
+
* used to indicate the authenticated user.
|
34 |
+
* @param array $optParams Optional parameters.
|
35 |
+
* @return Google_Service_Gmail_AutoForwarding
|
36 |
+
*/
|
37 |
+
public function getAutoForwarding($userId, $optParams = array())
|
38 |
+
{
|
39 |
+
$params = array('userId' => $userId);
|
40 |
+
$params = array_merge($params, $optParams);
|
41 |
+
return $this->call('getAutoForwarding', array($params), "Google_Service_Gmail_AutoForwarding");
|
42 |
+
}
|
43 |
+
/**
|
44 |
+
* Gets IMAP settings. (settings.getImap)
|
45 |
+
*
|
46 |
+
* @param string $userId User's email address. The special value "me" can be
|
47 |
+
* used to indicate the authenticated user.
|
48 |
+
* @param array $optParams Optional parameters.
|
49 |
+
* @return Google_Service_Gmail_ImapSettings
|
50 |
+
*/
|
51 |
+
public function getImap($userId, $optParams = array())
|
52 |
+
{
|
53 |
+
$params = array('userId' => $userId);
|
54 |
+
$params = array_merge($params, $optParams);
|
55 |
+
return $this->call('getImap', array($params), "Google_Service_Gmail_ImapSettings");
|
56 |
+
}
|
57 |
+
/**
|
58 |
+
* Gets language settings. (settings.getLanguage)
|
59 |
+
*
|
60 |
+
* @param string $userId User's email address. The special value "me" can be
|
61 |
+
* used to indicate the authenticated user.
|
62 |
+
* @param array $optParams Optional parameters.
|
63 |
+
* @return Google_Service_Gmail_LanguageSettings
|
64 |
+
*/
|
65 |
+
public function getLanguage($userId, $optParams = array())
|
66 |
+
{
|
67 |
+
$params = array('userId' => $userId);
|
68 |
+
$params = array_merge($params, $optParams);
|
69 |
+
return $this->call('getLanguage', array($params), "Google_Service_Gmail_LanguageSettings");
|
70 |
+
}
|
71 |
+
/**
|
72 |
+
* Gets POP settings. (settings.getPop)
|
73 |
+
*
|
74 |
+
* @param string $userId User's email address. The special value "me" can be
|
75 |
+
* used to indicate the authenticated user.
|
76 |
+
* @param array $optParams Optional parameters.
|
77 |
+
* @return Google_Service_Gmail_PopSettings
|
78 |
+
*/
|
79 |
+
public function getPop($userId, $optParams = array())
|
80 |
+
{
|
81 |
+
$params = array('userId' => $userId);
|
82 |
+
$params = array_merge($params, $optParams);
|
83 |
+
return $this->call('getPop', array($params), "Google_Service_Gmail_PopSettings");
|
84 |
+
}
|
85 |
+
/**
|
86 |
+
* Gets vacation responder settings. (settings.getVacation)
|
87 |
+
*
|
88 |
+
* @param string $userId User's email address. The special value "me" can be
|
89 |
+
* used to indicate the authenticated user.
|
90 |
+
* @param array $optParams Optional parameters.
|
91 |
+
* @return Google_Service_Gmail_VacationSettings
|
92 |
+
*/
|
93 |
+
public function getVacation($userId, $optParams = array())
|
94 |
+
{
|
95 |
+
$params = array('userId' => $userId);
|
96 |
+
$params = array_merge($params, $optParams);
|
97 |
+
return $this->call('getVacation', array($params), "Google_Service_Gmail_VacationSettings");
|
98 |
+
}
|
99 |
+
/**
|
100 |
+
* Updates the auto-forwarding setting for the specified account. A verified
|
101 |
+
* forwarding address must be specified when auto-forwarding is enabled.
|
102 |
+
*
|
103 |
+
* This method is only available to service account clients that have been
|
104 |
+
* delegated domain-wide authority. (settings.updateAutoForwarding)
|
105 |
+
*
|
106 |
+
* @param string $userId User's email address. The special value "me" can be
|
107 |
+
* used to indicate the authenticated user.
|
108 |
+
* @param Google_Service_Gmail_AutoForwarding $postBody
|
109 |
+
* @param array $optParams Optional parameters.
|
110 |
+
* @return Google_Service_Gmail_AutoForwarding
|
111 |
+
*/
|
112 |
+
public function updateAutoForwarding($userId, Google_Service_Gmail_AutoForwarding $postBody, $optParams = array())
|
113 |
+
{
|
114 |
+
$params = array('userId' => $userId, 'postBody' => $postBody);
|
115 |
+
$params = array_merge($params, $optParams);
|
116 |
+
return $this->call('updateAutoForwarding', array($params), "Google_Service_Gmail_AutoForwarding");
|
117 |
+
}
|
118 |
+
/**
|
119 |
+
* Updates IMAP settings. (settings.updateImap)
|
120 |
+
*
|
121 |
+
* @param string $userId User's email address. The special value "me" can be
|
122 |
+
* used to indicate the authenticated user.
|
123 |
+
* @param Google_Service_Gmail_ImapSettings $postBody
|
124 |
+
* @param array $optParams Optional parameters.
|
125 |
+
* @return Google_Service_Gmail_ImapSettings
|
126 |
+
*/
|
127 |
+
public function updateImap($userId, Google_Service_Gmail_ImapSettings $postBody, $optParams = array())
|
128 |
+
{
|
129 |
+
$params = array('userId' => $userId, 'postBody' => $postBody);
|
130 |
+
$params = array_merge($params, $optParams);
|
131 |
+
return $this->call('updateImap', array($params), "Google_Service_Gmail_ImapSettings");
|
132 |
+
}
|
133 |
+
/**
|
134 |
+
* Updates language settings.
|
135 |
+
*
|
136 |
+
* If successful, the return object contains the displayLanguage that was saved
|
137 |
+
* for the user, which may differ from the value passed into the request. This
|
138 |
+
* is because the requested displayLanguage may not be directly supported by
|
139 |
+
* Gmail but have a close variant that is, and so the variant may be chosen and
|
140 |
+
* saved instead. (settings.updateLanguage)
|
141 |
+
*
|
142 |
+
* @param string $userId User's email address. The special value "me" can be
|
143 |
+
* used to indicate the authenticated user.
|
144 |
+
* @param Google_Service_Gmail_LanguageSettings $postBody
|
145 |
+
* @param array $optParams Optional parameters.
|
146 |
+
* @return Google_Service_Gmail_LanguageSettings
|
147 |
+
*/
|
148 |
+
public function updateLanguage($userId, Google_Service_Gmail_LanguageSettings $postBody, $optParams = array())
|
149 |
+
{
|
150 |
+
$params = array('userId' => $userId, 'postBody' => $postBody);
|
151 |
+
$params = array_merge($params, $optParams);
|
152 |
+
return $this->call('updateLanguage', array($params), "Google_Service_Gmail_LanguageSettings");
|
153 |
+
}
|
154 |
+
/**
|
155 |
+
* Updates POP settings. (settings.updatePop)
|
156 |
+
*
|
157 |
+
* @param string $userId User's email address. The special value "me" can be
|
158 |
+
* used to indicate the authenticated user.
|
159 |
+
* @param Google_Service_Gmail_PopSettings $postBody
|
160 |
+
* @param array $optParams Optional parameters.
|
161 |
+
* @return Google_Service_Gmail_PopSettings
|
162 |
+
*/
|
163 |
+
public function updatePop($userId, Google_Service_Gmail_PopSettings $postBody, $optParams = array())
|
164 |
+
{
|
165 |
+
$params = array('userId' => $userId, 'postBody' => $postBody);
|
166 |
+
$params = array_merge($params, $optParams);
|
167 |
+
return $this->call('updatePop', array($params), "Google_Service_Gmail_PopSettings");
|
168 |
+
}
|
169 |
+
/**
|
170 |
+
* Updates vacation responder settings. (settings.updateVacation)
|
171 |
+
*
|
172 |
+
* @param string $userId User's email address. The special value "me" can be
|
173 |
+
* used to indicate the authenticated user.
|
174 |
+
* @param Google_Service_Gmail_VacationSettings $postBody
|
175 |
+
* @param array $optParams Optional parameters.
|
176 |
+
* @return Google_Service_Gmail_VacationSettings
|
177 |
+
*/
|
178 |
+
public function updateVacation($userId, Google_Service_Gmail_VacationSettings $postBody, $optParams = array())
|
179 |
+
{
|
180 |
+
$params = array('userId' => $userId, 'postBody' => $postBody);
|
181 |
+
$params = array_merge($params, $optParams);
|
182 |
+
return $this->call('updateVacation', array($params), "Google_Service_Gmail_VacationSettings");
|
183 |
+
}
|
184 |
+
}
|
vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersSettingsDelegates.php
CHANGED
@@ -1,119 +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 |
-
}
|
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/apiclient-services/src/Google/Service/Gmail/Resource/UsersSettingsFilters.php
CHANGED
@@ -1,86 +1,86 @@
|
|
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 "filters" collection of methods.
|
20 |
-
* Typical usage is:
|
21 |
-
* <code>
|
22 |
-
* $gmailService = new Google_Service_Gmail(...);
|
23 |
-
* $filters = $gmailService->filters;
|
24 |
-
* </code>
|
25 |
-
*/
|
26 |
-
class Google_Service_Gmail_Resource_UsersSettingsFilters extends Google_Service_Resource
|
27 |
-
{
|
28 |
-
/**
|
29 |
-
* Creates a filter. (filters.create)
|
30 |
-
*
|
31 |
-
* @param string $userId User's email address. The special value "me" can be
|
32 |
-
* used to indicate the authenticated user.
|
33 |
-
* @param Google_Service_Gmail_Filter $postBody
|
34 |
-
* @param array $optParams Optional parameters.
|
35 |
-
* @return Google_Service_Gmail_Filter
|
36 |
-
*/
|
37 |
-
public function create($userId, Google_Service_Gmail_Filter $postBody, $optParams = array())
|
38 |
-
{
|
39 |
-
$params = array('userId' => $userId, 'postBody' => $postBody);
|
40 |
-
$params = array_merge($params, $optParams);
|
41 |
-
return $this->call('create', array($params), "Google_Service_Gmail_Filter");
|
42 |
-
}
|
43 |
-
/**
|
44 |
-
* Deletes a filter. (filters.delete)
|
45 |
-
*
|
46 |
-
* @param string $userId User's email address. The special value "me" can be
|
47 |
-
* used to indicate the authenticated user.
|
48 |
-
* @param string $id The ID of the filter to be deleted.
|
49 |
-
* @param array $optParams Optional parameters.
|
50 |
-
*/
|
51 |
-
public function delete($userId, $id, $optParams = array())
|
52 |
-
{
|
53 |
-
$params = array('userId' => $userId, 'id' => $id);
|
54 |
-
$params = array_merge($params, $optParams);
|
55 |
-
return $this->call('delete', array($params));
|
56 |
-
}
|
57 |
-
/**
|
58 |
-
* Gets a filter. (filters.get)
|
59 |
-
*
|
60 |
-
* @param string $userId User's email address. The special value "me" can be
|
61 |
-
* used to indicate the authenticated user.
|
62 |
-
* @param string $id The ID of the filter to be fetched.
|
63 |
-
* @param array $optParams Optional parameters.
|
64 |
-
* @return Google_Service_Gmail_Filter
|
65 |
-
*/
|
66 |
-
public function get($userId, $id, $optParams = array())
|
67 |
-
{
|
68 |
-
$params = array('userId' => $userId, 'id' => $id);
|
69 |
-
$params = array_merge($params, $optParams);
|
70 |
-
return $this->call('get', array($params), "Google_Service_Gmail_Filter");
|
71 |
-
}
|
72 |
-
/**
|
73 |
-
* Lists the message filters of a Gmail user. (filters.listUsersSettingsFilters)
|
74 |
-
*
|
75 |
-
* @param string $userId User's email address. The special value "me" can be
|
76 |
-
* used to indicate the authenticated user.
|
77 |
-
* @param array $optParams Optional parameters.
|
78 |
-
* @return Google_Service_Gmail_ListFiltersResponse
|
79 |
-
*/
|
80 |
-
public function listUsersSettingsFilters($userId, $optParams = array())
|
81 |
-
{
|
82 |
-
$params = array('userId' => $userId);
|
83 |
-
$params = array_merge($params, $optParams);
|
84 |
-
return $this->call('list', array($params), "Google_Service_Gmail_ListFiltersResponse");
|
85 |
-
}
|
86 |
-
}
|
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 "filters" collection of methods.
|
20 |
+
* Typical usage is:
|
21 |
+
* <code>
|
22 |
+
* $gmailService = new Google_Service_Gmail(...);
|
23 |
+
* $filters = $gmailService->filters;
|
24 |
+
* </code>
|
25 |
+
*/
|
26 |
+
class Google_Service_Gmail_Resource_UsersSettingsFilters extends Google_Service_Resource
|
27 |
+
{
|
28 |
+
/**
|
29 |
+
* Creates a filter. (filters.create)
|
30 |
+
*
|
31 |
+
* @param string $userId User's email address. The special value "me" can be
|
32 |
+
* used to indicate the authenticated user.
|
33 |
+
* @param Google_Service_Gmail_Filter $postBody
|
34 |
+
* @param array $optParams Optional parameters.
|
35 |
+
* @return Google_Service_Gmail_Filter
|
36 |
+
*/
|
37 |
+
public function create($userId, Google_Service_Gmail_Filter $postBody, $optParams = array())
|
38 |
+
{
|
39 |
+
$params = array('userId' => $userId, 'postBody' => $postBody);
|
40 |
+
$params = array_merge($params, $optParams);
|
41 |
+
return $this->call('create', array($params), "Google_Service_Gmail_Filter");
|
42 |
+
}
|
43 |
+
/**
|
44 |
+
* Deletes a filter. (filters.delete)
|
45 |
+
*
|
46 |
+
* @param string $userId User's email address. The special value "me" can be
|
47 |
+
* used to indicate the authenticated user.
|
48 |
+
* @param string $id The ID of the filter to be deleted.
|
49 |
+
* @param array $optParams Optional parameters.
|
50 |
+
*/
|
51 |
+
public function delete($userId, $id, $optParams = array())
|
52 |
+
{
|
53 |
+
$params = array('userId' => $userId, 'id' => $id);
|
54 |
+
$params = array_merge($params, $optParams);
|
55 |
+
return $this->call('delete', array($params));
|
56 |
+
}
|
57 |
+
/**
|
58 |
+
* Gets a filter. (filters.get)
|
59 |
+
*
|
60 |
+
* @param string $userId User's email address. The special value "me" can be
|
61 |
+
* used to indicate the authenticated user.
|
62 |
+
* @param string $id The ID of the filter to be fetched.
|
63 |
+
* @param array $optParams Optional parameters.
|
64 |
+
* @return Google_Service_Gmail_Filter
|
65 |
+
*/
|
66 |
+
public function get($userId, $id, $optParams = array())
|
67 |
+
{
|
68 |
+
$params = array('userId' => $userId, 'id' => $id);
|
69 |
+
$params = array_merge($params, $optParams);
|
70 |
+
return $this->call('get', array($params), "Google_Service_Gmail_Filter");
|
71 |
+
}
|
72 |
+
/**
|
73 |
+
* Lists the message filters of a Gmail user. (filters.listUsersSettingsFilters)
|
74 |
+
*
|
75 |
+
* @param string $userId User's email address. The special value "me" can be
|
76 |
+
* used to indicate the authenticated user.
|
77 |
+
* @param array $optParams Optional parameters.
|
78 |
+
* @return Google_Service_Gmail_ListFiltersResponse
|
79 |
+
*/
|
80 |
+
public function listUsersSettingsFilters($userId, $optParams = array())
|
81 |
+
{
|
82 |
+
$params = array('userId' => $userId);
|
83 |
+
$params = array_merge($params, $optParams);
|
84 |
+
return $this->call('list', array($params), "Google_Service_Gmail_ListFiltersResponse");
|
85 |
+
}
|
86 |
+
}
|
vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersSettingsForwardingAddresses.php
CHANGED
@@ -1,97 +1,97 @@
|
|
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 "forwardingAddresses" collection of methods.
|
20 |
-
* Typical usage is:
|
21 |
-
* <code>
|
22 |
-
* $gmailService = new Google_Service_Gmail(...);
|
23 |
-
* $forwardingAddresses = $gmailService->forwardingAddresses;
|
24 |
-
* </code>
|
25 |
-
*/
|
26 |
-
class Google_Service_Gmail_Resource_UsersSettingsForwardingAddresses extends Google_Service_Resource
|
27 |
-
{
|
28 |
-
/**
|
29 |
-
* Creates a forwarding address. If ownership verification is required, a
|
30 |
-
* message will be sent to the recipient and the resource's verification status
|
31 |
-
* will be set to pending; otherwise, the resource will be created with
|
32 |
-
* verification status set to accepted.
|
33 |
-
*
|
34 |
-
* This method is only available to service account clients that have been
|
35 |
-
* delegated domain-wide authority. (forwardingAddresses.create)
|
36 |
-
*
|
37 |
-
* @param string $userId User's email address. The special value "me" can be
|
38 |
-
* used to indicate the authenticated user.
|
39 |
-
* @param Google_Service_Gmail_ForwardingAddress $postBody
|
40 |
-
* @param array $optParams Optional parameters.
|
41 |
-
* @return Google_Service_Gmail_ForwardingAddress
|
42 |
-
*/
|
43 |
-
public function create($userId, Google_Service_Gmail_ForwardingAddress $postBody, $optParams = array())
|
44 |
-
{
|
45 |
-
$params = array('userId' => $userId, 'postBody' => $postBody);
|
46 |
-
$params = array_merge($params, $optParams);
|
47 |
-
return $this->call('create', array($params), "Google_Service_Gmail_ForwardingAddress");
|
48 |
-
}
|
49 |
-
/**
|
50 |
-
* Deletes the specified forwarding address and revokes any verification that
|
51 |
-
* may have been required.
|
52 |
-
*
|
53 |
-
* This method is only available to service account clients that have been
|
54 |
-
* delegated domain-wide authority. (forwardingAddresses.delete)
|
55 |
-
*
|
56 |
-
* @param string $userId User's email address. The special value "me" can be
|
57 |
-
* used to indicate the authenticated user.
|
58 |
-
* @param string $forwardingEmail The forwarding address to be deleted.
|
59 |
-
* @param array $optParams Optional parameters.
|
60 |
-
*/
|
61 |
-
public function delete($userId, $forwardingEmail, $optParams = array())
|
62 |
-
{
|
63 |
-
$params = array('userId' => $userId, 'forwardingEmail' => $forwardingEmail);
|
64 |
-
$params = array_merge($params, $optParams);
|
65 |
-
return $this->call('delete', array($params));
|
66 |
-
}
|
67 |
-
/**
|
68 |
-
* Gets the specified forwarding address. (forwardingAddresses.get)
|
69 |
-
*
|
70 |
-
* @param string $userId User's email address. The special value "me" can be
|
71 |
-
* used to indicate the authenticated user.
|
72 |
-
* @param string $forwardingEmail The forwarding address to be retrieved.
|
73 |
-
* @param array $optParams Optional parameters.
|
74 |
-
* @return Google_Service_Gmail_ForwardingAddress
|
75 |
-
*/
|
76 |
-
public function get($userId, $forwardingEmail, $optParams = array())
|
77 |
-
{
|
78 |
-
$params = array('userId' => $userId, 'forwardingEmail' => $forwardingEmail);
|
79 |
-
$params = array_merge($params, $optParams);
|
80 |
-
return $this->call('get', array($params), "Google_Service_Gmail_ForwardingAddress");
|
81 |
-
}
|
82 |
-
/**
|
83 |
-
* Lists the forwarding addresses for the specified account.
|
84 |
-
* (forwardingAddresses.listUsersSettingsForwardingAddresses)
|
85 |
-
*
|
86 |
-
* @param string $userId User's email address. The special value "me" can be
|
87 |
-
* used to indicate the authenticated user.
|
88 |
-
* @param array $optParams Optional parameters.
|
89 |
-
* @return Google_Service_Gmail_ListForwardingAddressesResponse
|
90 |
-
*/
|
91 |
-
public function listUsersSettingsForwardingAddresses($userId, $optParams = array())
|
92 |
-
{
|
93 |
-
$params = array('userId' => $userId);
|
94 |
-
$params = array_merge($params, $optParams);
|
95 |
-
return $this->call('list', array($params), "Google_Service_Gmail_ListForwardingAddressesResponse");
|
96 |
-
}
|
97 |
-
}
|
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 "forwardingAddresses" collection of methods.
|
20 |
+
* Typical usage is:
|
21 |
+
* <code>
|
22 |
+
* $gmailService = new Google_Service_Gmail(...);
|
23 |
+
* $forwardingAddresses = $gmailService->forwardingAddresses;
|
24 |
+
* </code>
|
25 |
+
*/
|
26 |
+
class Google_Service_Gmail_Resource_UsersSettingsForwardingAddresses extends Google_Service_Resource
|
27 |
+
{
|
28 |
+
/**
|
29 |
+
* Creates a forwarding address. If ownership verification is required, a
|
30 |
+
* message will be sent to the recipient and the resource's verification status
|
31 |
+
* will be set to pending; otherwise, the resource will be created with
|
32 |
+
* verification status set to accepted.
|
33 |
+
*
|
34 |
+
* This method is only available to service account clients that have been
|
35 |
+
* delegated domain-wide authority. (forwardingAddresses.create)
|
36 |
+
*
|
37 |
+
* @param string $userId User's email address. The special value "me" can be
|
38 |
+
* used to indicate the authenticated user.
|
39 |
+
* @param Google_Service_Gmail_ForwardingAddress $postBody
|
40 |
+
* @param array $optParams Optional parameters.
|
41 |
+
* @return Google_Service_Gmail_ForwardingAddress
|
42 |
+
*/
|
43 |
+
public function create($userId, Google_Service_Gmail_ForwardingAddress $postBody, $optParams = array())
|
44 |
+
{
|
45 |
+
$params = array('userId' => $userId, 'postBody' => $postBody);
|
46 |
+
$params = array_merge($params, $optParams);
|
47 |
+
return $this->call('create', array($params), "Google_Service_Gmail_ForwardingAddress");
|
48 |
+
}
|
49 |
+
/**
|
50 |
+
* Deletes the specified forwarding address and revokes any verification that
|
51 |
+
* may have been required.
|
52 |
+
*
|
53 |
+
* This method is only available to service account clients that have been
|
54 |
+
* delegated domain-wide authority. (forwardingAddresses.delete)
|
55 |
+
*
|
56 |
+
* @param string $userId User's email address. The special value "me" can be
|
57 |
+
* used to indicate the authenticated user.
|
58 |
+
* @param string $forwardingEmail The forwarding address to be deleted.
|
59 |
+
* @param array $optParams Optional parameters.
|
60 |
+
*/
|
61 |
+
public function delete($userId, $forwardingEmail, $optParams = array())
|
62 |
+
{
|
63 |
+
$params = array('userId' => $userId, 'forwardingEmail' => $forwardingEmail);
|
64 |
+
$params = array_merge($params, $optParams);
|
65 |
+
return $this->call('delete', array($params));
|
66 |
+
}
|
67 |
+
/**
|
68 |
+
* Gets the specified forwarding address. (forwardingAddresses.get)
|
69 |
+
*
|
70 |
+
* @param string $userId User's email address. The special value "me" can be
|
71 |
+
* used to indicate the authenticated user.
|
72 |
+
* @param string $forwardingEmail The forwarding address to be retrieved.
|
73 |
+
* @param array $optParams Optional parameters.
|
74 |
+
* @return Google_Service_Gmail_ForwardingAddress
|
75 |
+
*/
|
76 |
+
public function get($userId, $forwardingEmail, $optParams = array())
|
77 |
+
{
|
78 |
+
$params = array('userId' => $userId, 'forwardingEmail' => $forwardingEmail);
|
79 |
+
$params = array_merge($params, $optParams);
|
80 |
+
return $this->call('get', array($params), "Google_Service_Gmail_ForwardingAddress");
|
81 |
+
}
|
82 |
+
/**
|
83 |
+
* Lists the forwarding addresses for the specified account.
|
84 |
+
* (forwardingAddresses.listUsersSettingsForwardingAddresses)
|
85 |
+
*
|
86 |
+
* @param string $userId User's email address. The special value "me" can be
|
87 |
+
* used to indicate the authenticated user.
|
88 |
+
* @param array $optParams Optional parameters.
|
89 |
+
* @return Google_Service_Gmail_ListForwardingAddressesResponse
|
90 |
+
*/
|
91 |
+
public function listUsersSettingsForwardingAddresses($userId, $optParams = array())
|
92 |
+
{
|
93 |
+
$params = array('userId' => $userId);
|
94 |
+
$params = array_merge($params, $optParams);
|
95 |
+
return $this->call('list', array($params), "Google_Service_Gmail_ListForwardingAddressesResponse");
|
96 |
+
}
|
97 |
+
}
|
vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersSettingsSendAs.php
CHANGED
@@ -1,162 +1,162 @@
|
|
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 "sendAs" collection of methods.
|
20 |
-
* Typical usage is:
|
21 |
-
* <code>
|
22 |
-
* $gmailService = new Google_Service_Gmail(...);
|
23 |
-
* $sendAs = $gmailService->sendAs;
|
24 |
-
* </code>
|
25 |
-
*/
|
26 |
-
class Google_Service_Gmail_Resource_UsersSettingsSendAs extends Google_Service_Resource
|
27 |
-
{
|
28 |
-
/**
|
29 |
-
* Creates a custom "from" send-as alias. If an SMTP MSA is specified, Gmail
|
30 |
-
* will attempt to connect to the SMTP service to validate the configuration
|
31 |
-
* before creating the alias. If ownership verification is required for the
|
32 |
-
* alias, a message will be sent to the email address and the resource's
|
33 |
-
* verification status will be set to pending; otherwise, the resource will be
|
34 |
-
* created with verification status set to accepted. If a signature is provided,
|
35 |
-
* Gmail will sanitize the HTML before saving it with the alias.
|
36 |
-
*
|
37 |
-
* This method is only available to service account clients that have been
|
38 |
-
* delegated domain-wide authority. (sendAs.create)
|
39 |
-
*
|
40 |
-
* @param string $userId User's email address. The special value "me" can be
|
41 |
-
* used to indicate the authenticated user.
|
42 |
-
* @param Google_Service_Gmail_SendAs $postBody
|
43 |
-
* @param array $optParams Optional parameters.
|
44 |
-
* @return Google_Service_Gmail_SendAs
|
45 |
-
*/
|
46 |
-
public function create($userId, Google_Service_Gmail_SendAs $postBody, $optParams = array())
|
47 |
-
{
|
48 |
-
$params = array('userId' => $userId, 'postBody' => $postBody);
|
49 |
-
$params = array_merge($params, $optParams);
|
50 |
-
return $this->call('create', array($params), "Google_Service_Gmail_SendAs");
|
51 |
-
}
|
52 |
-
/**
|
53 |
-
* Deletes the specified send-as alias. Revokes any verification that may have
|
54 |
-
* been required for using it.
|
55 |
-
*
|
56 |
-
* This method is only available to service account clients that have been
|
57 |
-
* delegated domain-wide authority. (sendAs.delete)
|
58 |
-
*
|
59 |
-
* @param string $userId User's email address. The special value "me" can be
|
60 |
-
* used to indicate the authenticated user.
|
61 |
-
* @param string $sendAsEmail The send-as alias to be deleted.
|
62 |
-
* @param array $optParams Optional parameters.
|
63 |
-
*/
|
64 |
-
public function delete($userId, $sendAsEmail, $optParams = array())
|
65 |
-
{
|
66 |
-
$params = array('userId' => $userId, 'sendAsEmail' => $sendAsEmail);
|
67 |
-
$params = array_merge($params, $optParams);
|
68 |
-
return $this->call('delete', array($params));
|
69 |
-
}
|
70 |
-
/**
|
71 |
-
* Gets the specified send-as alias. Fails with an HTTP 404 error if the
|
72 |
-
* specified address is not a member of the collection. (sendAs.get)
|
73 |
-
*
|
74 |
-
* @param string $userId User's email address. The special value "me" can be
|
75 |
-
* used to indicate the authenticated user.
|
76 |
-
* @param string $sendAsEmail The send-as alias to be retrieved.
|
77 |
-
* @param array $optParams Optional parameters.
|
78 |
-
* @return Google_Service_Gmail_SendAs
|
79 |
-
*/
|
80 |
-
public function get($userId, $sendAsEmail, $optParams = array())
|
81 |
-
{
|
82 |
-
$params = array('userId' => $userId, 'sendAsEmail' => $sendAsEmail);
|
83 |
-
$params = array_merge($params, $optParams);
|
84 |
-
return $this->call('get', array($params), "Google_Service_Gmail_SendAs");
|
85 |
-
}
|
86 |
-
/**
|
87 |
-
* Lists the send-as aliases for the specified account. The result includes the
|
88 |
-
* primary send-as address associated with the account as well as any custom
|
89 |
-
* "from" aliases. (sendAs.listUsersSettingsSendAs)
|
90 |
-
*
|
91 |
-
* @param string $userId User's email address. The special value "me" can be
|
92 |
-
* used to indicate the authenticated user.
|
93 |
-
* @param array $optParams Optional parameters.
|
94 |
-
* @return Google_Service_Gmail_ListSendAsResponse
|
95 |
-
*/
|
96 |
-
public function listUsersSettingsSendAs($userId, $optParams = array())
|
97 |
-
{
|
98 |
-
$params = array('userId' => $userId);
|
99 |
-
$params = array_merge($params, $optParams);
|
100 |
-
return $this->call('list', array($params), "Google_Service_Gmail_ListSendAsResponse");
|
101 |
-
}
|
102 |
-
/**
|
103 |
-
* Updates a send-as alias. If a signature is provided, Gmail will sanitize the
|
104 |
-
* HTML before saving it with the alias.
|
105 |
-
*
|
106 |
-
* Addresses other than the primary address for the account can only be updated
|
107 |
-
* by service account clients that have been delegated domain-wide authority.
|
108 |
-
* This method supports patch semantics. (sendAs.patch)
|
109 |
-
*
|
110 |
-
* @param string $userId User's email address. The special value "me" can be
|
111 |
-
* used to indicate the authenticated user.
|
112 |
-
* @param string $sendAsEmail The send-as alias to be updated.
|
113 |
-
* @param Google_Service_Gmail_SendAs $postBody
|
114 |
-
* @param array $optParams Optional parameters.
|
115 |
-
* @return Google_Service_Gmail_SendAs
|
116 |
-
*/
|
117 |
-
public function patch($userId, $sendAsEmail, Google_Service_Gmail_SendAs $postBody, $optParams = array())
|
118 |
-
{
|
119 |
-
$params = array('userId' => $userId, 'sendAsEmail' => $sendAsEmail, 'postBody' => $postBody);
|
120 |
-
$params = array_merge($params, $optParams);
|
121 |
-
return $this->call('patch', array($params), "Google_Service_Gmail_SendAs");
|
122 |
-
}
|
123 |
-
/**
|
124 |
-
* Updates a send-as alias. If a signature is provided, Gmail will sanitize the
|
125 |
-
* HTML before saving it with the alias.
|
126 |
-
*
|
127 |
-
* Addresses other than the primary address for the account can only be updated
|
128 |
-
* by service account clients that have been delegated domain-wide authority.
|
129 |
-
* (sendAs.update)
|
130 |
-
*
|
131 |
-
* @param string $userId User's email address. The special value "me" can be
|
132 |
-
* used to indicate the authenticated user.
|
133 |
-
* @param string $sendAsEmail The send-as alias to be updated.
|
134 |
-
* @param Google_Service_Gmail_SendAs $postBody
|
135 |
-
* @param array $optParams Optional parameters.
|
136 |
-
* @return Google_Service_Gmail_SendAs
|
137 |
-
*/
|
138 |
-
public function update($userId, $sendAsEmail, Google_Service_Gmail_SendAs $postBody, $optParams = array())
|
139 |
-
{
|
140 |
-
$params = array('userId' => $userId, 'sendAsEmail' => $sendAsEmail, 'postBody' => $postBody);
|
141 |
-
$params = array_merge($params, $optParams);
|
142 |
-
return $this->call('update', array($params), "Google_Service_Gmail_SendAs");
|
143 |
-
}
|
144 |
-
/**
|
145 |
-
* Sends a verification email to the specified send-as alias address. The
|
146 |
-
* verification status must be pending.
|
147 |
-
*
|
148 |
-
* This method is only available to service account clients that have been
|
149 |
-
* delegated domain-wide authority. (sendAs.verify)
|
150 |
-
*
|
151 |
-
* @param string $userId User's email address. The special value "me" can be
|
152 |
-
* used to indicate the authenticated user.
|
153 |
-
* @param string $sendAsEmail The send-as alias to be verified.
|
154 |
-
* @param array $optParams Optional parameters.
|
155 |
-
*/
|
156 |
-
public function verify($userId, $sendAsEmail, $optParams = array())
|
157 |
-
{
|
158 |
-
$params = array('userId' => $userId, 'sendAsEmail' => $sendAsEmail);
|
159 |
-
$params = array_merge($params, $optParams);
|
160 |
-
return $this->call('verify', array($params));
|
161 |
-
}
|
162 |
-
}
|
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 "sendAs" collection of methods.
|
20 |
+
* Typical usage is:
|
21 |
+
* <code>
|
22 |
+
* $gmailService = new Google_Service_Gmail(...);
|
23 |
+
* $sendAs = $gmailService->sendAs;
|
24 |
+
* </code>
|
25 |
+
*/
|
26 |
+
class Google_Service_Gmail_Resource_UsersSettingsSendAs extends Google_Service_Resource
|
27 |
+
{
|
28 |
+
/**
|
29 |
+
* Creates a custom "from" send-as alias. If an SMTP MSA is specified, Gmail
|
30 |
+
* will attempt to connect to the SMTP service to validate the configuration
|
31 |
+
* before creating the alias. If ownership verification is required for the
|
32 |
+
* alias, a message will be sent to the email address and the resource's
|
33 |
+
* verification status will be set to pending; otherwise, the resource will be
|
34 |
+
* created with verification status set to accepted. If a signature is provided,
|
35 |
+
* Gmail will sanitize the HTML before saving it with the alias.
|
36 |
+
*
|
37 |
+
* This method is only available to service account clients that have been
|
38 |
+
* delegated domain-wide authority. (sendAs.create)
|
39 |
+
*
|
40 |
+
* @param string $userId User's email address. The special value "me" can be
|
41 |
+
* used to indicate the authenticated user.
|
42 |
+
* @param Google_Service_Gmail_SendAs $postBody
|
43 |
+
* @param array $optParams Optional parameters.
|
44 |
+
* @return Google_Service_Gmail_SendAs
|
45 |
+
*/
|
46 |
+
public function create($userId, Google_Service_Gmail_SendAs $postBody, $optParams = array())
|
47 |
+
{
|
48 |
+
$params = array('userId' => $userId, 'postBody' => $postBody);
|
49 |
+
$params = array_merge($params, $optParams);
|
50 |
+
return $this->call('create', array($params), "Google_Service_Gmail_SendAs");
|
51 |
+
}
|
52 |
+
/**
|
53 |
+
* Deletes the specified send-as alias. Revokes any verification that may have
|
54 |
+
* been required for using it.
|
55 |
+
*
|
56 |
+
* This method is only available to service account clients that have been
|
57 |
+
* delegated domain-wide authority. (sendAs.delete)
|
58 |
+
*
|
59 |
+
* @param string $userId User's email address. The special value "me" can be
|
60 |
+
* used to indicate the authenticated user.
|
61 |
+
* @param string $sendAsEmail The send-as alias to be deleted.
|
62 |
+
* @param array $optParams Optional parameters.
|
63 |
+
*/
|
64 |
+
public function delete($userId, $sendAsEmail, $optParams = array())
|
65 |
+
{
|
66 |
+
$params = array('userId' => $userId, 'sendAsEmail' => $sendAsEmail);
|
67 |
+
$params = array_merge($params, $optParams);
|
68 |
+
return $this->call('delete', array($params));
|
69 |
+
}
|
70 |
+
/**
|
71 |
+
* Gets the specified send-as alias. Fails with an HTTP 404 error if the
|
72 |
+
* specified address is not a member of the collection. (sendAs.get)
|
73 |
+
*
|
74 |
+
* @param string $userId User's email address. The special value "me" can be
|
75 |
+
* used to indicate the authenticated user.
|
76 |
+
* @param string $sendAsEmail The send-as alias to be retrieved.
|
77 |
+
* @param array $optParams Optional parameters.
|
78 |
+
* @return Google_Service_Gmail_SendAs
|
79 |
+
*/
|
80 |
+
public function get($userId, $sendAsEmail, $optParams = array())
|
81 |
+
{
|
82 |
+
$params = array('userId' => $userId, 'sendAsEmail' => $sendAsEmail);
|
83 |
+
$params = array_merge($params, $optParams);
|
84 |
+
return $this->call('get', array($params), "Google_Service_Gmail_SendAs");
|
85 |
+
}
|
86 |
+
/**
|
87 |
+
* Lists the send-as aliases for the specified account. The result includes the
|
88 |
+
* primary send-as address associated with the account as well as any custom
|
89 |
+
* "from" aliases. (sendAs.listUsersSettingsSendAs)
|
90 |
+
*
|
91 |
+
* @param string $userId User's email address. The special value "me" can be
|
92 |
+
* used to indicate the authenticated user.
|
93 |
+
* @param array $optParams Optional parameters.
|
94 |
+
* @return Google_Service_Gmail_ListSendAsResponse
|
95 |
+
*/
|
96 |
+
public function listUsersSettingsSendAs($userId, $optParams = array())
|
97 |
+
{
|
98 |
+
$params = array('userId' => $userId);
|
99 |
+
$params = array_merge($params, $optParams);
|
100 |
+
return $this->call('list', array($params), "Google_Service_Gmail_ListSendAsResponse");
|
101 |
+
}
|
102 |
+
/**
|
103 |
+
* Updates a send-as alias. If a signature is provided, Gmail will sanitize the
|
104 |
+
* HTML before saving it with the alias.
|
105 |
+
*
|
106 |
+
* Addresses other than the primary address for the account can only be updated
|
107 |
+
* by service account clients that have been delegated domain-wide authority.
|
108 |
+
* This method supports patch semantics. (sendAs.patch)
|
109 |
+
*
|
110 |
+
* @param string $userId User's email address. The special value "me" can be
|
111 |
+
* used to indicate the authenticated user.
|
112 |
+
* @param string $sendAsEmail The send-as alias to be updated.
|
113 |
+
* @param Google_Service_Gmail_SendAs $postBody
|
114 |
+
* @param array $optParams Optional parameters.
|
115 |
+
* @return Google_Service_Gmail_SendAs
|
116 |
+
*/
|
117 |
+
public function patch($userId, $sendAsEmail, Google_Service_Gmail_SendAs $postBody, $optParams = array())
|
118 |
+
{
|
119 |
+
$params = array('userId' => $userId, 'sendAsEmail' => $sendAsEmail, 'postBody' => $postBody);
|
120 |
+
$params = array_merge($params, $optParams);
|
121 |
+
return $this->call('patch', array($params), "Google_Service_Gmail_SendAs");
|
122 |
+
}
|
123 |
+
/**
|
124 |
+
* Updates a send-as alias. If a signature is provided, Gmail will sanitize the
|
125 |
+
* HTML before saving it with the alias.
|
126 |
+
*
|
127 |
+
* Addresses other than the primary address for the account can only be updated
|
128 |
+
* by service account clients that have been delegated domain-wide authority.
|
129 |
+
* (sendAs.update)
|
130 |
+
*
|
131 |
+
* @param string $userId User's email address. The special value "me" can be
|
132 |
+
* used to indicate the authenticated user.
|
133 |
+
* @param string $sendAsEmail The send-as alias to be updated.
|
134 |
+
* @param Google_Service_Gmail_SendAs $postBody
|
135 |
+
* @param array $optParams Optional parameters.
|
136 |
+
* @return Google_Service_Gmail_SendAs
|
137 |
+
*/
|
138 |
+
public function update($userId, $sendAsEmail, Google_Service_Gmail_SendAs $postBody, $optParams = array())
|
139 |
+
{
|
140 |
+
$params = array('userId' => $userId, 'sendAsEmail' => $sendAsEmail, 'postBody' => $postBody);
|
141 |
+
$params = array_merge($params, $optParams);
|
142 |
+
return $this->call('update', array($params), "Google_Service_Gmail_SendAs");
|
143 |
+
}
|
144 |
+
/**
|
145 |
+
* Sends a verification email to the specified send-as alias address. The
|
146 |
+
* verification status must be pending.
|
147 |
+
*
|
148 |
+
* This method is only available to service account clients that have been
|
149 |
+
* delegated domain-wide authority. (sendAs.verify)
|
150 |
+
*
|
151 |
+
* @param string $userId User's email address. The special value "me" can be
|
152 |
+
* used to indicate the authenticated user.
|
153 |
+
* @param string $sendAsEmail The send-as alias to be verified.
|
154 |
+
* @param array $optParams Optional parameters.
|
155 |
+
*/
|
156 |
+
public function verify($userId, $sendAsEmail, $optParams = array())
|
157 |
+
{
|
158 |
+
$params = array('userId' => $userId, 'sendAsEmail' => $sendAsEmail);
|
159 |
+
$params = array_merge($params, $optParams);
|
160 |
+
return $this->call('verify', array($params));
|
161 |
+
}
|
162 |
+
}
|
vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersSettingsSendAsSmimeInfo.php
CHANGED
@@ -1,115 +1,115 @@
|
|
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 "smimeInfo" collection of methods.
|
20 |
-
* Typical usage is:
|
21 |
-
* <code>
|
22 |
-
* $gmailService = new Google_Service_Gmail(...);
|
23 |
-
* $smimeInfo = $gmailService->smimeInfo;
|
24 |
-
* </code>
|
25 |
-
*/
|
26 |
-
class Google_Service_Gmail_Resource_UsersSettingsSendAsSmimeInfo extends Google_Service_Resource
|
27 |
-
{
|
28 |
-
/**
|
29 |
-
* Deletes the specified S/MIME config for the specified send-as alias.
|
30 |
-
* (smimeInfo.delete)
|
31 |
-
*
|
32 |
-
* @param string $userId The user's email address. The special value me can be
|
33 |
-
* used to indicate the authenticated user.
|
34 |
-
* @param string $sendAsEmail The email address that appears in the "From:"
|
35 |
-
* header for mail sent using this alias.
|
36 |
-
* @param string $id The immutable ID for the SmimeInfo.
|
37 |
-
* @param array $optParams Optional parameters.
|
38 |
-
*/
|
39 |
-
public function delete($userId, $sendAsEmail, $id, $optParams = array())
|
40 |
-
{
|
41 |
-
$params = array('userId' => $userId, 'sendAsEmail' => $sendAsEmail, 'id' => $id);
|
42 |
-
$params = array_merge($params, $optParams);
|
43 |
-
return $this->call('delete', array($params));
|
44 |
-
}
|
45 |
-
/**
|
46 |
-
* Gets the specified S/MIME config for the specified send-as alias.
|
47 |
-
* (smimeInfo.get)
|
48 |
-
*
|
49 |
-
* @param string $userId The user's email address. The special value me can be
|
50 |
-
* used to indicate the authenticated user.
|
51 |
-
* @param string $sendAsEmail The email address that appears in the "From:"
|
52 |
-
* header for mail sent using this alias.
|
53 |
-
* @param string $id The immutable ID for the SmimeInfo.
|
54 |
-
* @param array $optParams Optional parameters.
|
55 |
-
* @return Google_Service_Gmail_SmimeInfo
|
56 |
-
*/
|
57 |
-
public function get($userId, $sendAsEmail, $id, $optParams = array())
|
58 |
-
{
|
59 |
-
$params = array('userId' => $userId, 'sendAsEmail' => $sendAsEmail, 'id' => $id);
|
60 |
-
$params = array_merge($params, $optParams);
|
61 |
-
return $this->call('get', array($params), "Google_Service_Gmail_SmimeInfo");
|
62 |
-
}
|
63 |
-
/**
|
64 |
-
* Insert (upload) the given S/MIME config for the specified send-as alias. Note
|
65 |
-
* that pkcs12 format is required for the key. (smimeInfo.insert)
|
66 |
-
*
|
67 |
-
* @param string $userId The user's email address. The special value me can be
|
68 |
-
* used to indicate the authenticated user.
|
69 |
-
* @param string $sendAsEmail The email address that appears in the "From:"
|
70 |
-
* header for mail sent using this alias.
|
71 |
-
* @param Google_Service_Gmail_SmimeInfo $postBody
|
72 |
-
* @param array $optParams Optional parameters.
|
73 |
-
* @return Google_Service_Gmail_SmimeInfo
|
74 |
-
*/
|
75 |
-
public function insert($userId, $sendAsEmail, Google_Service_Gmail_SmimeInfo $postBody, $optParams = array())
|
76 |
-
{
|
77 |
-
$params = array('userId' => $userId, 'sendAsEmail' => $sendAsEmail, 'postBody' => $postBody);
|
78 |
-
$params = array_merge($params, $optParams);
|
79 |
-
return $this->call('insert', array($params), "Google_Service_Gmail_SmimeInfo");
|
80 |
-
}
|
81 |
-
/**
|
82 |
-
* Lists S/MIME configs for the specified send-as alias.
|
83 |
-
* (smimeInfo.listUsersSettingsSendAsSmimeInfo)
|
84 |
-
*
|
85 |
-
* @param string $userId The user's email address. The special value me can be
|
86 |
-
* used to indicate the authenticated user.
|
87 |
-
* @param string $sendAsEmail The email address that appears in the "From:"
|
88 |
-
* header for mail sent using this alias.
|
89 |
-
* @param array $optParams Optional parameters.
|
90 |
-
* @return Google_Service_Gmail_ListSmimeInfoResponse
|
91 |
-
*/
|
92 |
-
public function listUsersSettingsSendAsSmimeInfo($userId, $sendAsEmail, $optParams = array())
|
93 |
-
{
|
94 |
-
$params = array('userId' => $userId, 'sendAsEmail' => $sendAsEmail);
|
95 |
-
$params = array_merge($params, $optParams);
|
96 |
-
return $this->call('list', array($params), "Google_Service_Gmail_ListSmimeInfoResponse");
|
97 |
-
}
|
98 |
-
/**
|
99 |
-
* Sets the default S/MIME config for the specified send-as alias.
|
100 |
-
* (smimeInfo.setDefault)
|
101 |
-
*
|
102 |
-
* @param string $userId The user's email address. The special value me can be
|
103 |
-
* used to indicate the authenticated user.
|
104 |
-
* @param string $sendAsEmail The email address that appears in the "From:"
|
105 |
-
* header for mail sent using this alias.
|
106 |
-
* @param string $id The immutable ID for the SmimeInfo.
|
107 |
-
* @param array $optParams Optional parameters.
|
108 |
-
*/
|
109 |
-
public function setDefault($userId, $sendAsEmail, $id, $optParams = array())
|
110 |
-
{
|
111 |
-
$params = array('userId' => $userId, 'sendAsEmail' => $sendAsEmail, 'id' => $id);
|
112 |
-
$params = array_merge($params, $optParams);
|
113 |
-
return $this->call('setDefault', array($params));
|
114 |
-
}
|
115 |
-
}
|
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 "smimeInfo" collection of methods.
|
20 |
+
* Typical usage is:
|
21 |
+
* <code>
|
22 |
+
* $gmailService = new Google_Service_Gmail(...);
|
23 |
+
* $smimeInfo = $gmailService->smimeInfo;
|
24 |
+
* </code>
|
25 |
+
*/
|
26 |
+
class Google_Service_Gmail_Resource_UsersSettingsSendAsSmimeInfo extends Google_Service_Resource
|
27 |
+
{
|
28 |
+
/**
|
29 |
+
* Deletes the specified S/MIME config for the specified send-as alias.
|
30 |
+
* (smimeInfo.delete)
|
31 |
+
*
|
32 |
+
* @param string $userId The user's email address. The special value me can be
|
33 |
+
* used to indicate the authenticated user.
|
34 |
+
* @param string $sendAsEmail The email address that appears in the "From:"
|
35 |
+
* header for mail sent using this alias.
|
36 |
+
* @param string $id The immutable ID for the SmimeInfo.
|
37 |
+
* @param array $optParams Optional parameters.
|
38 |
+
*/
|
39 |
+
public function delete($userId, $sendAsEmail, $id, $optParams = array())
|
40 |
+
{
|
41 |
+
$params = array('userId' => $userId, 'sendAsEmail' => $sendAsEmail, 'id' => $id);
|
42 |
+
$params = array_merge($params, $optParams);
|
43 |
+
return $this->call('delete', array($params));
|
44 |
+
}
|
45 |
+
/**
|
46 |
+
* Gets the specified S/MIME config for the specified send-as alias.
|
47 |
+
* (smimeInfo.get)
|
48 |
+
*
|
49 |
+
* @param string $userId The user's email address. The special value me can be
|
50 |
+
* used to indicate the authenticated user.
|
51 |
+
* @param string $sendAsEmail The email address that appears in the "From:"
|
52 |
+
* header for mail sent using this alias.
|
53 |
+
* @param string $id The immutable ID for the SmimeInfo.
|
54 |
+
* @param array $optParams Optional parameters.
|
55 |
+
* @return Google_Service_Gmail_SmimeInfo
|
56 |
+
*/
|
57 |
+
public function get($userId, $sendAsEmail, $id, $optParams = array())
|
58 |
+
{
|
59 |
+
$params = array('userId' => $userId, 'sendAsEmail' => $sendAsEmail, 'id' => $id);
|
60 |
+
$params = array_merge($params, $optParams);
|
61 |
+
return $this->call('get', array($params), "Google_Service_Gmail_SmimeInfo");
|
62 |
+
}
|
63 |
+
/**
|
64 |
+
* Insert (upload) the given S/MIME config for the specified send-as alias. Note
|
65 |
+
* that pkcs12 format is required for the key. (smimeInfo.insert)
|
66 |
+
*
|
67 |
+
* @param string $userId The user's email address. The special value me can be
|
68 |
+
* used to indicate the authenticated user.
|
69 |
+
* @param string $sendAsEmail The email address that appears in the "From:"
|
70 |
+
* header for mail sent using this alias.
|
71 |
+
* @param Google_Service_Gmail_SmimeInfo $postBody
|
72 |
+
* @param array $optParams Optional parameters.
|
73 |
+
* @return Google_Service_Gmail_SmimeInfo
|
74 |
+
*/
|
75 |
+
public function insert($userId, $sendAsEmail, Google_Service_Gmail_SmimeInfo $postBody, $optParams = array())
|
76 |
+
{
|
77 |
+
$params = array('userId' => $userId, 'sendAsEmail' => $sendAsEmail, 'postBody' => $postBody);
|
78 |
+
$params = array_merge($params, $optParams);
|
79 |
+
return $this->call('insert', array($params), "Google_Service_Gmail_SmimeInfo");
|
80 |
+
}
|
81 |
+
/**
|
82 |
+
* Lists S/MIME configs for the specified send-as alias.
|
83 |
+
* (smimeInfo.listUsersSettingsSendAsSmimeInfo)
|
84 |
+
*
|
85 |
+
* @param string $userId The user's email address. The special value me can be
|
86 |
+
* used to indicate the authenticated user.
|
87 |
+
* @param string $sendAsEmail The email address that appears in the "From:"
|
88 |
+
* header for mail sent using this alias.
|
89 |
+
* @param array $optParams Optional parameters.
|
90 |
+
* @return Google_Service_Gmail_ListSmimeInfoResponse
|
91 |
+
*/
|
92 |
+
public function listUsersSettingsSendAsSmimeInfo($userId, $sendAsEmail, $optParams = array())
|
93 |
+
{
|
94 |
+
$params = array('userId' => $userId, 'sendAsEmail' => $sendAsEmail);
|
95 |
+
$params = array_merge($params, $optParams);
|
96 |
+
return $this->call('list', array($params), "Google_Service_Gmail_ListSmimeInfoResponse");
|
97 |
+
}
|
98 |
+
/**
|
99 |
+
* Sets the default S/MIME config for the specified send-as alias.
|
100 |
+
* (smimeInfo.setDefault)
|
101 |
+
*
|
102 |
+
* @param string $userId The user's email address. The special value me can be
|
103 |
+
* used to indicate the authenticated user.
|
104 |
+
* @param string $sendAsEmail The email address that appears in the "From:"
|
105 |
+
* header for mail sent using this alias.
|
106 |
+
* @param string $id The immutable ID for the SmimeInfo.
|
107 |
+
* @param array $optParams Optional parameters.
|
108 |
+
*/
|
109 |
+
public function setDefault($userId, $sendAsEmail, $id, $optParams = array())
|
110 |
+
{
|
111 |
+
$params = array('userId' => $userId, 'sendAsEmail' => $sendAsEmail, 'id' => $id);
|
112 |
+
$params = array_merge($params, $optParams);
|
113 |
+
return $this->call('setDefault', array($params));
|
114 |
+
}
|
115 |
+
}
|
vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersThreads.php
CHANGED
@@ -1,135 +1,135 @@
|
|
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 "threads" collection of methods.
|
20 |
-
* Typical usage is:
|
21 |
-
* <code>
|
22 |
-
* $gmailService = new Google_Service_Gmail(...);
|
23 |
-
* $threads = $gmailService->threads;
|
24 |
-
* </code>
|
25 |
-
*/
|
26 |
-
class Google_Service_Gmail_Resource_UsersThreads extends Google_Service_Resource
|
27 |
-
{
|
28 |
-
/**
|
29 |
-
* Immediately and permanently deletes the specified thread. This operation
|
30 |
-
* cannot be undone. Prefer threads.trash instead. (threads.delete)
|
31 |
-
*
|
32 |
-
* @param string $userId The user's email address. The special value me can be
|
33 |
-
* used to indicate the authenticated user.
|
34 |
-
* @param string $id ID of the Thread to delete.
|
35 |
-
* @param array $optParams Optional parameters.
|
36 |
-
*/
|
37 |
-
public function delete($userId, $id, $optParams = array())
|
38 |
-
{
|
39 |
-
$params = array('userId' => $userId, 'id' => $id);
|
40 |
-
$params = array_merge($params, $optParams);
|
41 |
-
return $this->call('delete', array($params));
|
42 |
-
}
|
43 |
-
/**
|
44 |
-
* Gets the specified thread. (threads.get)
|
45 |
-
*
|
46 |
-
* @param string $userId The user's email address. The special value me can be
|
47 |
-
* used to indicate the authenticated user.
|
48 |
-
* @param string $id The ID of the thread to retrieve.
|
49 |
-
* @param array $optParams Optional parameters.
|
50 |
-
*
|
51 |
-
* @opt_param string format The format to return the messages in.
|
52 |
-
* @opt_param string metadataHeaders When given and format is METADATA, only
|
53 |
-
* include headers specified.
|
54 |
-
* @return Google_Service_Gmail_Thread
|
55 |
-
*/
|
56 |
-
public function get($userId, $id, $optParams = array())
|
57 |
-
{
|
58 |
-
$params = array('userId' => $userId, 'id' => $id);
|
59 |
-
$params = array_merge($params, $optParams);
|
60 |
-
return $this->call('get', array($params), "Google_Service_Gmail_Thread");
|
61 |
-
}
|
62 |
-
/**
|
63 |
-
* Lists the threads in the user's mailbox. (threads.listUsersThreads)
|
64 |
-
*
|
65 |
-
* @param string $userId The user's email address. The special value me can be
|
66 |
-
* used to indicate the authenticated user.
|
67 |
-
* @param array $optParams Optional parameters.
|
68 |
-
*
|
69 |
-
* @opt_param bool includeSpamTrash Include threads from SPAM and TRASH in the
|
70 |
-
* results.
|
71 |
-
* @opt_param string labelIds Only return threads with labels that match all of
|
72 |
-
* the specified label IDs.
|
73 |
-
* @opt_param string maxResults Maximum number of threads to return.
|
74 |
-
* @opt_param string pageToken Page token to retrieve a specific page of results
|
75 |
-
* in the list.
|
76 |
-
* @opt_param string q Only return threads matching the specified query.
|
77 |
-
* Supports the same query format as the Gmail search box. For example,
|
78 |
-
* "from:someuser@example.com rfc822msgid: is:unread". Parameter cannot be used
|
79 |
-
* when accessing the api using the gmail.metadata scope.
|
80 |
-
* @return Google_Service_Gmail_ListThreadsResponse
|
81 |
-
*/
|
82 |
-
public function listUsersThreads($userId, $optParams = array())
|
83 |
-
{
|
84 |
-
$params = array('userId' => $userId);
|
85 |
-
$params = array_merge($params, $optParams);
|
86 |
-
return $this->call('list', array($params), "Google_Service_Gmail_ListThreadsResponse");
|
87 |
-
}
|
88 |
-
/**
|
89 |
-
* Modifies the labels applied to the thread. This applies to all messages in
|
90 |
-
* the thread. (threads.modify)
|
91 |
-
*
|
92 |
-
* @param string $userId The user's email address. The special value me can be
|
93 |
-
* used to indicate the authenticated user.
|
94 |
-
* @param string $id The ID of the thread to modify.
|
95 |
-
* @param Google_Service_Gmail_ModifyThreadRequest $postBody
|
96 |
-
* @param array $optParams Optional parameters.
|
97 |
-
* @return Google_Service_Gmail_Thread
|
98 |
-
*/
|
99 |
-
public function modify($userId, $id, Google_Service_Gmail_ModifyThreadRequest $postBody, $optParams = array())
|
100 |
-
{
|
101 |
-
$params = array('userId' => $userId, 'id' => $id, 'postBody' => $postBody);
|
102 |
-
$params = array_merge($params, $optParams);
|
103 |
-
return $this->call('modify', array($params), "Google_Service_Gmail_Thread");
|
104 |
-
}
|
105 |
-
/**
|
106 |
-
* Moves the specified thread to the trash. (threads.trash)
|
107 |
-
*
|
108 |
-
* @param string $userId The user's email address. The special value me can be
|
109 |
-
* used to indicate the authenticated user.
|
110 |
-
* @param string $id The ID of the thread to Trash.
|
111 |
-
* @param array $optParams Optional parameters.
|
112 |
-
* @return Google_Service_Gmail_Thread
|
113 |
-
*/
|
114 |
-
public function trash($userId, $id, $optParams = array())
|
115 |
-
{
|
116 |
-
$params = array('userId' => $userId, 'id' => $id);
|
117 |
-
$params = array_merge($params, $optParams);
|
118 |
-
return $this->call('trash', array($params), "Google_Service_Gmail_Thread");
|
119 |
-
}
|
120 |
-
/**
|
121 |
-
* Removes the specified thread from the trash. (threads.untrash)
|
122 |
-
*
|
123 |
-
* @param string $userId The user's email address. The special value me can be
|
124 |
-
* used to indicate the authenticated user.
|
125 |
-
* @param string $id The ID of the thread to remove from Trash.
|
126 |
-
* @param array $optParams Optional parameters.
|
127 |
-
* @return Google_Service_Gmail_Thread
|
128 |
-
*/
|
129 |
-
public function untrash($userId, $id, $optParams = array())
|
130 |
-
{
|
131 |
-
$params = array('userId' => $userId, 'id' => $id);
|
132 |
-
$params = array_merge($params, $optParams);
|
133 |
-
return $this->call('untrash', array($params), "Google_Service_Gmail_Thread");
|
134 |
-
}
|
135 |
-
}
|
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 "threads" collection of methods.
|
20 |
+
* Typical usage is:
|
21 |
+
* <code>
|
22 |
+
* $gmailService = new Google_Service_Gmail(...);
|
23 |
+
* $threads = $gmailService->threads;
|
24 |
+
* </code>
|
25 |
+
*/
|
26 |
+
class Google_Service_Gmail_Resource_UsersThreads extends Google_Service_Resource
|
27 |
+
{
|
28 |
+
/**
|
29 |
+
* Immediately and permanently deletes the specified thread. This operation
|
30 |
+
* cannot be undone. Prefer threads.trash instead. (threads.delete)
|
31 |
+
*
|
32 |
+
* @param string $userId The user's email address. The special value me can be
|
33 |
+
* used to indicate the authenticated user.
|
34 |
+
* @param string $id ID of the Thread to delete.
|
35 |
+
* @param array $optParams Optional parameters.
|
36 |
+
*/
|
37 |
+
public function delete($userId, $id, $optParams = array())
|
38 |
+
{
|
39 |
+
$params = array('userId' => $userId, 'id' => $id);
|
40 |
+
$params = array_merge($params, $optParams);
|
41 |
+
return $this->call('delete', array($params));
|
42 |
+
}
|
43 |
+
/**
|
44 |
+
* Gets the specified thread. (threads.get)
|
45 |
+
*
|
46 |
+
* @param string $userId The user's email address. The special value me can be
|
47 |
+
* used to indicate the authenticated user.
|
48 |
+
* @param string $id The ID of the thread to retrieve.
|
49 |
+
* @param array $optParams Optional parameters.
|
50 |
+
*
|
51 |
+
* @opt_param string format The format to return the messages in.
|
52 |
+
* @opt_param string metadataHeaders When given and format is METADATA, only
|
53 |
+
* include headers specified.
|
54 |
+
* @return Google_Service_Gmail_Thread
|
55 |
+
*/
|
56 |
+
public function get($userId, $id, $optParams = array())
|
57 |
+
{
|
58 |
+
$params = array('userId' => $userId, 'id' => $id);
|
59 |
+
$params = array_merge($params, $optParams);
|
60 |
+
return $this->call('get', array($params), "Google_Service_Gmail_Thread");
|
61 |
+
}
|
62 |
+
/**
|
63 |
+
* Lists the threads in the user's mailbox. (threads.listUsersThreads)
|
64 |
+
*
|
65 |
+
* @param string $userId The user's email address. The special value me can be
|
66 |
+
* used to indicate the authenticated user.
|
67 |
+
* @param array $optParams Optional parameters.
|
68 |
+
*
|
69 |
+
* @opt_param bool includeSpamTrash Include threads from SPAM and TRASH in the
|
70 |
+
* results.
|
71 |
+
* @opt_param string labelIds Only return threads with labels that match all of
|
72 |
+
* the specified label IDs.
|
73 |
+
* @opt_param string maxResults Maximum number of threads to return.
|
74 |
+
* @opt_param string pageToken Page token to retrieve a specific page of results
|
75 |
+
* in the list.
|
76 |
+
* @opt_param string q Only return threads matching the specified query.
|
77 |
+
* Supports the same query format as the Gmail search box. For example,
|
78 |
+
* "from:someuser@example.com rfc822msgid: is:unread". Parameter cannot be used
|
79 |
+
* when accessing the api using the gmail.metadata scope.
|
80 |
+
* @return Google_Service_Gmail_ListThreadsResponse
|
81 |
+
*/
|
82 |
+
public function listUsersThreads($userId, $optParams = array())
|
83 |
+
{
|
84 |
+
$params = array('userId' => $userId);
|
85 |
+
$params = array_merge($params, $optParams);
|
86 |
+
return $this->call('list', array($params), "Google_Service_Gmail_ListThreadsResponse");
|
87 |
+
}
|
88 |
+
/**
|
89 |
+
* Modifies the labels applied to the thread. This applies to all messages in
|
90 |
+
* the thread. (threads.modify)
|
91 |
+
*
|
92 |
+
* @param string $userId The user's email address. The special value me can be
|
93 |
+
* used to indicate the authenticated user.
|
94 |
+
* @param string $id The ID of the thread to modify.
|
95 |
+
* @param Google_Service_Gmail_ModifyThreadRequest $postBody
|
96 |
+
* @param array $optParams Optional parameters.
|
97 |
+
* @return Google_Service_Gmail_Thread
|
98 |
+
*/
|
99 |
+
public function modify($userId, $id, Google_Service_Gmail_ModifyThreadRequest $postBody, $optParams = array())
|
100 |
+
{
|
101 |
+
$params = array('userId' => $userId, 'id' => $id, 'postBody' => $postBody);
|
102 |
+
$params = array_merge($params, $optParams);
|
103 |
+
return $this->call('modify', array($params), "Google_Service_Gmail_Thread");
|
104 |
+
}
|
105 |
+
/**
|
106 |
+
* Moves the specified thread to the trash. (threads.trash)
|
107 |
+
*
|
108 |
+
* @param string $userId The user's email address. The special value me can be
|
109 |
+
* used to indicate the authenticated user.
|
110 |
+
* @param string $id The ID of the thread to Trash.
|
111 |
+
* @param array $optParams Optional parameters.
|
112 |
+
* @return Google_Service_Gmail_Thread
|
113 |
+
*/
|
114 |
+
public function trash($userId, $id, $optParams = array())
|
115 |
+
{
|
116 |
+
$params = array('userId' => $userId, 'id' => $id);
|
117 |
+
$params = array_merge($params, $optParams);
|
118 |
+
return $this->call('trash', array($params), "Google_Service_Gmail_Thread");
|
119 |
+
}
|
120 |
+
/**
|
121 |
+
* Removes the specified thread from the trash. (threads.untrash)
|
122 |
+
*
|
123 |
+
* @param string $userId The user's email address. The special value me can be
|
124 |
+
* used to indicate the authenticated user.
|
125 |
+
* @param string $id The ID of the thread to remove from Trash.
|
126 |
+
* @param array $optParams Optional parameters.
|
127 |
+
* @return Google_Service_Gmail_Thread
|
128 |
+
*/
|
129 |
+
public function untrash($userId, $id, $optParams = array())
|
130 |
+
{
|
131 |
+
$params = array('userId' => $userId, 'id' => $id);
|
132 |
+
$params = array_merge($params, $optParams);
|
133 |
+
return $this->call('untrash', array($params), "Google_Service_Gmail_Thread");
|
134 |
+
}
|
135 |
+
}
|
vendor/google/apiclient-services/src/Google/Service/Gmail/SendAs.php
CHANGED
@@ -1,109 +1,109 @@
|
|
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_SendAs extends Google_Model
|
19 |
-
{
|
20 |
-
public $displayName;
|
21 |
-
public $isDefault;
|
22 |
-
public $isPrimary;
|
23 |
-
public $replyToAddress;
|
24 |
-
public $sendAsEmail;
|
25 |
-
public $signature;
|
26 |
-
protected $smtpMsaType = 'Google_Service_Gmail_SmtpMsa';
|
27 |
-
protected $smtpMsaDataType = '';
|
28 |
-
public $treatAsAlias;
|
29 |
-
public $verificationStatus;
|
30 |
-
|
31 |
-
public function setDisplayName($displayName)
|
32 |
-
{
|
33 |
-
$this->displayName = $displayName;
|
34 |
-
}
|
35 |
-
public function getDisplayName()
|
36 |
-
{
|
37 |
-
return $this->displayName;
|
38 |
-
}
|
39 |
-
public function setIsDefault($isDefault)
|
40 |
-
{
|
41 |
-
$this->isDefault = $isDefault;
|
42 |
-
}
|
43 |
-
public function getIsDefault()
|
44 |
-
{
|
45 |
-
return $this->isDefault;
|
46 |
-
}
|
47 |
-
public function setIsPrimary($isPrimary)
|
48 |
-
{
|
49 |
-
$this->isPrimary = $isPrimary;
|
50 |
-
}
|
51 |
-
public function getIsPrimary()
|
52 |
-
{
|
53 |
-
return $this->isPrimary;
|
54 |
-
}
|
55 |
-
public function setReplyToAddress($replyToAddress)
|
56 |
-
{
|
57 |
-
$this->replyToAddress = $replyToAddress;
|
58 |
-
}
|
59 |
-
public function getReplyToAddress()
|
60 |
-
{
|
61 |
-
return $this->replyToAddress;
|
62 |
-
}
|
63 |
-
public function setSendAsEmail($sendAsEmail)
|
64 |
-
{
|
65 |
-
$this->sendAsEmail = $sendAsEmail;
|
66 |
-
}
|
67 |
-
public function getSendAsEmail()
|
68 |
-
{
|
69 |
-
return $this->sendAsEmail;
|
70 |
-
}
|
71 |
-
public function setSignature($signature)
|
72 |
-
{
|
73 |
-
$this->signature = $signature;
|
74 |
-
}
|
75 |
-
public function getSignature()
|
76 |
-
{
|
77 |
-
return $this->signature;
|
78 |
-
}
|
79 |
-
/**
|
80 |
-
* @param Google_Service_Gmail_SmtpMsa
|
81 |
-
*/
|
82 |
-
public function setSmtpMsa(Google_Service_Gmail_SmtpMsa $smtpMsa)
|
83 |
-
{
|
84 |
-
$this->smtpMsa = $smtpMsa;
|
85 |
-
}
|
86 |
-
/**
|
87 |
-
* @return Google_Service_Gmail_SmtpMsa
|
88 |
-
*/
|
89 |
-
public function getSmtpMsa()
|
90 |
-
{
|
91 |
-
return $this->smtpMsa;
|
92 |
-
}
|
93 |
-
public function setTreatAsAlias($treatAsAlias)
|
94 |
-
{
|
95 |
-
$this->treatAsAlias = $treatAsAlias;
|
96 |
-
}
|
97 |
-
public function getTreatAsAlias()
|
98 |
-
{
|
99 |
-
return $this->treatAsAlias;
|
100 |
-
}
|
101 |
-
public function setVerificationStatus($verificationStatus)
|
102 |
-
{
|
103 |
-
$this->verificationStatus = $verificationStatus;
|
104 |
-
}
|
105 |
-
public function getVerificationStatus()
|
106 |
-
{
|
107 |
-
return $this->verificationStatus;
|
108 |
-
}
|
109 |
-
}
|
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_SendAs extends Google_Model
|
19 |
+
{
|
20 |
+
public $displayName;
|
21 |
+
public $isDefault;
|
22 |
+
public $isPrimary;
|
23 |
+
public $replyToAddress;
|
24 |
+
public $sendAsEmail;
|
25 |
+
public $signature;
|
26 |
+
protected $smtpMsaType = 'Google_Service_Gmail_SmtpMsa';
|
27 |
+
protected $smtpMsaDataType = '';
|
28 |
+
public $treatAsAlias;
|
29 |
+
public $verificationStatus;
|
30 |
+
|
31 |
+
public function setDisplayName($displayName)
|
32 |
+
{
|
33 |
+
$this->displayName = $displayName;
|
34 |
+
}
|
35 |
+
public function getDisplayName()
|
36 |
+
{
|
37 |
+
return $this->displayName;
|
38 |
+
}
|
39 |
+
public function setIsDefault($isDefault)
|
40 |
+
{
|
41 |
+
$this->isDefault = $isDefault;
|
42 |
+
}
|
43 |
+
public function getIsDefault()
|
44 |
+
{
|
45 |
+
return $this->isDefault;
|
46 |
+
}
|
47 |
+
public function setIsPrimary($isPrimary)
|
48 |
+
{
|
49 |
+
$this->isPrimary = $isPrimary;
|
50 |
+
}
|
51 |
+
public function getIsPrimary()
|
52 |
+
{
|
53 |
+
return $this->isPrimary;
|
54 |
+
}
|
55 |
+
public function setReplyToAddress($replyToAddress)
|
56 |
+
{
|
57 |
+
$this->replyToAddress = $replyToAddress;
|
58 |
+
}
|
59 |
+
public function getReplyToAddress()
|
60 |
+
{
|
61 |
+
return $this->replyToAddress;
|
62 |
+
}
|
63 |
+
public function setSendAsEmail($sendAsEmail)
|
64 |
+
{
|
65 |
+
$this->sendAsEmail = $sendAsEmail;
|
66 |
+
}
|
67 |
+
public function getSendAsEmail()
|
68 |
+
{
|
69 |
+
return $this->sendAsEmail;
|
70 |
+
}
|
71 |
+
public function setSignature($signature)
|
72 |
+
{
|
73 |
+
$this->signature = $signature;
|
74 |
+
}
|
75 |
+
public function getSignature()
|
76 |
+
{
|
77 |
+
return $this->signature;
|
78 |
+
}
|
79 |
+
/**
|
80 |
+
* @param Google_Service_Gmail_SmtpMsa
|
81 |
+
*/
|
82 |
+
public function setSmtpMsa(Google_Service_Gmail_SmtpMsa $smtpMsa)
|
83 |
+
{
|
84 |
+
$this->smtpMsa = $smtpMsa;
|
85 |
+
}
|
86 |
+
/**
|
87 |
+
* @return Google_Service_Gmail_SmtpMsa
|
88 |
+
*/
|
89 |
+
public function getSmtpMsa()
|
90 |
+
{
|
91 |
+
return $this->smtpMsa;
|
92 |
+
}
|
93 |
+
public function setTreatAsAlias($treatAsAlias)
|
94 |
+
{
|
95 |
+
$this->treatAsAlias = $treatAsAlias;
|
96 |
+
}
|
97 |
+
public function getTreatAsAlias()
|
98 |
+
{
|
99 |
+
return $this->treatAsAlias;
|
100 |
+
}
|
101 |
+
public function setVerificationStatus($verificationStatus)
|
102 |
+
{
|
103 |
+
$this->verificationStatus = $verificationStatus;
|
104 |
+
}
|
105 |
+
public function getVerificationStatus()
|
106 |
+
{
|
107 |
+
return $this->verificationStatus;
|
108 |
+
}
|
109 |
+
}
|
vendor/google/apiclient-services/src/Google/Service/Gmail/SmimeInfo.php
CHANGED
@@ -1,84 +1,84 @@
|
|
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_SmimeInfo extends Google_Model
|
19 |
-
{
|
20 |
-
public $encryptedKeyPassword;
|
21 |
-
public $expiration;
|
22 |
-
public $id;
|
23 |
-
public $isDefault;
|
24 |
-
public $issuerCn;
|
25 |
-
public $pem;
|
26 |
-
public $pkcs12;
|
27 |
-
|
28 |
-
public function setEncryptedKeyPassword($encryptedKeyPassword)
|
29 |
-
{
|
30 |
-
$this->encryptedKeyPassword = $encryptedKeyPassword;
|
31 |
-
}
|
32 |
-
public function getEncryptedKeyPassword()
|
33 |
-
{
|
34 |
-
return $this->encryptedKeyPassword;
|
35 |
-
}
|
36 |
-
public function setExpiration($expiration)
|
37 |
-
{
|
38 |
-
$this->expiration = $expiration;
|
39 |
-
}
|
40 |
-
public function getExpiration()
|
41 |
-
{
|
42 |
-
return $this->expiration;
|
43 |
-
}
|
44 |
-
public function setId($id)
|
45 |
-
{
|
46 |
-
$this->id = $id;
|
47 |
-
}
|
48 |
-
public function getId()
|
49 |
-
{
|
50 |
-
return $this->id;
|
51 |
-
}
|
52 |
-
public function setIsDefault($isDefault)
|
53 |
-
{
|
54 |
-
$this->isDefault = $isDefault;
|
55 |
-
}
|
56 |
-
public function getIsDefault()
|
57 |
-
{
|
58 |
-
return $this->isDefault;
|
59 |
-
}
|
60 |
-
public function setIssuerCn($issuerCn)
|
61 |
-
{
|
62 |
-
$this->issuerCn = $issuerCn;
|
63 |
-
}
|
64 |
-
public function getIssuerCn()
|
65 |
-
{
|
66 |
-
return $this->issuerCn;
|
67 |
-
}
|
68 |
-
public function setPem($pem)
|
69 |
-
{
|
70 |
-
$this->pem = $pem;
|
71 |
-
}
|
72 |
-
public function getPem()
|
73 |
-
{
|
74 |
-
return $this->pem;
|
75 |
-
}
|
76 |
-
public function setPkcs12($pkcs12)
|
77 |
-
{
|
78 |
-
$this->pkcs12 = $pkcs12;
|
79 |
-
}
|
80 |
-
public function getPkcs12()
|
81 |
-
{
|
82 |
-
return $this->pkcs12;
|
83 |
-
}
|
84 |
-
}
|
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_SmimeInfo extends Google_Model
|
19 |
+
{
|
20 |
+
public $encryptedKeyPassword;
|
21 |
+
public $expiration;
|
22 |
+
public $id;
|
23 |
+
public $isDefault;
|
24 |
+
public $issuerCn;
|
25 |
+
public $pem;
|
26 |
+
public $pkcs12;
|
27 |
+
|
28 |
+
public function setEncryptedKeyPassword($encryptedKeyPassword)
|
29 |
+
{
|
30 |
+
$this->encryptedKeyPassword = $encryptedKeyPassword;
|
31 |
+
}
|
32 |
+
public function getEncryptedKeyPassword()
|
33 |
+
{
|
34 |
+
return $this->encryptedKeyPassword;
|
35 |
+
}
|
36 |
+
public function setExpiration($expiration)
|
37 |
+
{
|
38 |
+
$this->expiration = $expiration;
|
39 |
+
}
|
40 |
+
public function getExpiration()
|
41 |
+
{
|
42 |
+
return $this->expiration;
|
43 |
+
}
|
44 |
+
public function setId($id)
|
45 |
+
{
|
46 |
+
$this->id = $id;
|
47 |
+
}
|
48 |
+
public function getId()
|
49 |
+
{
|
50 |
+
return $this->id;
|
51 |
+
}
|
52 |
+
public function setIsDefault($isDefault)
|
53 |
+
{
|
54 |
+
$this->isDefault = $isDefault;
|
55 |
+
}
|
56 |
+
public function getIsDefault()
|
57 |
+
{
|
58 |
+
return $this->isDefault;
|
59 |
+
}
|
60 |
+
public function setIssuerCn($issuerCn)
|
61 |
+
{
|
62 |
+
$this->issuerCn = $issuerCn;
|
63 |
+
}
|
64 |
+
public function getIssuerCn()
|
65 |
+
{
|
66 |
+
return $this->issuerCn;
|
67 |
+
}
|
68 |
+
public function setPem($pem)
|
69 |
+
{
|
70 |
+
$this->pem = $pem;
|
71 |
+
}
|
72 |
+
public function getPem()
|
73 |
+
{
|
74 |
+
return $this->pem;
|
75 |
+
}
|
76 |
+
public function setPkcs12($pkcs12)
|
77 |
+
{
|
78 |
+
$this->pkcs12 = $pkcs12;
|
79 |
+
}
|
80 |
+
public function getPkcs12()
|
81 |
+
{
|
82 |
+
return $this->pkcs12;
|
83 |
+
}
|
84 |
+
}
|
vendor/google/apiclient-services/src/Google/Service/Gmail/SmtpMsa.php
CHANGED
@@ -1,66 +1,66 @@
|
|
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_SmtpMsa extends Google_Model
|
19 |
-
{
|
20 |
-
public $host;
|
21 |
-
public $password;
|
22 |
-
public $port;
|
23 |
-
public $securityMode;
|
24 |
-
public $username;
|
25 |
-
|
26 |
-
public function setHost($host)
|
27 |
-
{
|
28 |
-
$this->host = $host;
|
29 |
-
}
|
30 |
-
public function getHost()
|
31 |
-
{
|
32 |
-
return $this->host;
|
33 |
-
}
|
34 |
-
public function setPassword($password)
|
35 |
-
{
|
36 |
-
$this->password = $password;
|
37 |
-
}
|
38 |
-
public function getPassword()
|
39 |
-
{
|
40 |
-
return $this->password;
|
41 |
-
}
|
42 |
-
public function setPort($port)
|
43 |
-
{
|
44 |
-
$this->port = $port;
|
45 |
-
}
|
46 |
-
public function getPort()
|
47 |
-
{
|
48 |
-
return $this->port;
|
49 |
-
}
|
50 |
-
public function setSecurityMode($securityMode)
|
51 |
-
{
|
52 |
-
$this->securityMode = $securityMode;
|
53 |
-
}
|
54 |
-
public function getSecurityMode()
|
55 |
-
{
|
56 |
-
return $this->securityMode;
|
57 |
-
}
|
58 |
-
public function setUsername($username)
|
59 |
-
{
|
60 |
-
$this->username = $username;
|
61 |
-
}
|
62 |
-
public function getUsername()
|
63 |
-
{
|
64 |
-
return $this->username;
|
65 |
-
}
|
66 |
-
}
|
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_SmtpMsa extends Google_Model
|
19 |
+
{
|
20 |
+
public $host;
|
21 |
+
public $password;
|
22 |
+
public $port;
|
23 |
+
public $securityMode;
|
24 |
+
public $username;
|
25 |
+
|
26 |
+
public function setHost($host)
|
27 |
+
{
|
28 |
+
$this->host = $host;
|
29 |
+
}
|
30 |
+
public function getHost()
|
31 |
+
{
|
32 |
+
return $this->host;
|
33 |
+
}
|
34 |
+
public function setPassword($password)
|
35 |
+
{
|
36 |
+
$this->password = $password;
|
37 |
+
}
|
38 |
+
public function getPassword()
|
39 |
+
{
|
40 |
+
return $this->password;
|
41 |
+
}
|
42 |
+
public function setPort($port)
|
43 |
+
{
|
44 |
+
$this->port = $port;
|
45 |
+
}
|
46 |
+
public function getPort()
|
47 |
+
{
|
48 |
+
return $this->port;
|
49 |
+
}
|
50 |
+
public function setSecurityMode($securityMode)
|
51 |
+
{
|
52 |
+
$this->securityMode = $securityMode;
|
53 |
+
}
|
54 |
+
public function getSecurityMode()
|
55 |
+
{
|
56 |
+
return $this->securityMode;
|
57 |
+
}
|
58 |
+
public function setUsername($username)
|
59 |
+
{
|
60 |
+
$this->username = $username;
|
61 |
+
}
|
62 |
+
public function getUsername()
|
63 |
+
{
|
64 |
+
return $this->username;
|
65 |
+
}
|
66 |
+
}
|
vendor/google/apiclient-services/src/Google/Service/Gmail/Thread.php
CHANGED
@@ -1,65 +1,65 @@
|
|
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_Thread extends Google_Collection
|
19 |
-
{
|
20 |
-
protected $collection_key = 'messages';
|
21 |
-
public $historyId;
|
22 |
-
public $id;
|
23 |
-
protected $messagesType = 'Google_Service_Gmail_Message';
|
24 |
-
protected $messagesDataType = 'array';
|
25 |
-
public $snippet;
|
26 |
-
|
27 |
-
public function setHistoryId($historyId)
|
28 |
-
{
|
29 |
-
$this->historyId = $historyId;
|
30 |
-
}
|
31 |
-
public function getHistoryId()
|
32 |
-
{
|
33 |
-
return $this->historyId;
|
34 |
-
}
|
35 |
-
public function setId($id)
|
36 |
-
{
|
37 |
-
$this->id = $id;
|
38 |
-
}
|
39 |
-
public function getId()
|
40 |
-
{
|
41 |
-
return $this->id;
|
42 |
-
}
|
43 |
-
/**
|
44 |
-
* @param Google_Service_Gmail_Message
|
45 |
-
*/
|
46 |
-
public function setMessages($messages)
|
47 |
-
{
|
48 |
-
$this->messages = $messages;
|
49 |
-
}
|
50 |
-
/**
|
51 |
-
* @return Google_Service_Gmail_Message
|
52 |
-
*/
|
53 |
-
public function getMessages()
|
54 |
-
{
|
55 |
-
return $this->messages;
|
56 |
-
}
|
57 |
-
public function setSnippet($snippet)
|
58 |
-
{
|
59 |
-
$this->snippet = $snippet;
|
60 |
-
}
|
61 |
-
public function getSnippet()
|
62 |
-
{
|
63 |
-
return $this->snippet;
|
64 |
-
}
|
65 |
-
}
|
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_Thread extends Google_Collection
|
19 |
+
{
|
20 |
+
protected $collection_key = 'messages';
|
21 |
+
public $historyId;
|
22 |
+
public $id;
|
23 |
+
protected $messagesType = 'Google_Service_Gmail_Message';
|
24 |
+
protected $messagesDataType = 'array';
|
25 |
+
public $snippet;
|
26 |
+
|
27 |
+
public function setHistoryId($historyId)
|
28 |
+
{
|
29 |
+
$this->historyId = $historyId;
|
30 |
+
}
|
31 |
+
public function getHistoryId()
|
32 |
+
{
|
33 |
+
return $this->historyId;
|
34 |
+
}
|
35 |
+
public function setId($id)
|
36 |
+
{
|
37 |
+
$this->id = $id;
|
38 |
+
}
|
39 |
+
public function getId()
|
40 |
+
{
|
41 |
+
return $this->id;
|
42 |
+
}
|
43 |
+
/**
|
44 |
+
* @param Google_Service_Gmail_Message
|
45 |
+
*/
|
46 |
+
public function setMessages($messages)
|
47 |
+
{
|
48 |
+
$this->messages = $messages;
|
49 |
+
}
|
50 |
+
/**
|
51 |
+
* @return Google_Service_Gmail_Message
|
52 |
+
*/
|
53 |
+
public function getMessages()
|
54 |
+
{
|
55 |
+
return $this->messages;
|
56 |
+
}
|
57 |
+
public function setSnippet($snippet)
|
58 |
+
{
|
59 |
+
$this->snippet = $snippet;
|
60 |
+
}
|
61 |
+
public function getSnippet()
|
62 |
+
{
|
63 |
+
return $this->snippet;
|
64 |
+
}
|
65 |
+
}
|
vendor/google/apiclient-services/src/Google/Service/Gmail/VacationSettings.php
CHANGED
@@ -1,93 +1,93 @@
|
|
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_VacationSettings extends Google_Model
|
19 |
-
{
|
20 |
-
public $enableAutoReply;
|
21 |
-
public $endTime;
|
22 |
-
public $responseBodyHtml;
|
23 |
-
public $responseBodyPlainText;
|
24 |
-
public $responseSubject;
|
25 |
-
public $restrictToContacts;
|
26 |
-
public $restrictToDomain;
|
27 |
-
public $startTime;
|
28 |
-
|
29 |
-
public function setEnableAutoReply($enableAutoReply)
|
30 |
-
{
|
31 |
-
$this->enableAutoReply = $enableAutoReply;
|
32 |
-
}
|
33 |
-
public function getEnableAutoReply()
|
34 |
-
{
|
35 |
-
return $this->enableAutoReply;
|
36 |
-
}
|
37 |
-
public function setEndTime($endTime)
|
38 |
-
{
|
39 |
-
$this->endTime = $endTime;
|
40 |
-
}
|
41 |
-
public function getEndTime()
|
42 |
-
{
|
43 |
-
return $this->endTime;
|
44 |
-
}
|
45 |
-
public function setResponseBodyHtml($responseBodyHtml)
|
46 |
-
{
|
47 |
-
$this->responseBodyHtml = $responseBodyHtml;
|
48 |
-
}
|
49 |
-
public function getResponseBodyHtml()
|
50 |
-
{
|
51 |
-
return $this->responseBodyHtml;
|
52 |
-
}
|
53 |
-
public function setResponseBodyPlainText($responseBodyPlainText)
|
54 |
-
{
|
55 |
-
$this->responseBodyPlainText = $responseBodyPlainText;
|
56 |
-
}
|
57 |
-
public function getResponseBodyPlainText()
|
58 |
-
{
|
59 |
-
return $this->responseBodyPlainText;
|
60 |
-
}
|
61 |
-
public function setResponseSubject($responseSubject)
|
62 |
-
{
|
63 |
-
$this->responseSubject = $responseSubject;
|
64 |
-
}
|
65 |
-
public function getResponseSubject()
|
66 |
-
{
|
67 |
-
return $this->responseSubject;
|
68 |
-
}
|
69 |
-
public function setRestrictToContacts($restrictToContacts)
|
70 |
-
{
|
71 |
-
$this->restrictToContacts = $restrictToContacts;
|
72 |
-
}
|
73 |
-
public function getRestrictToContacts()
|
74 |
-
{
|
75 |
-
return $this->restrictToContacts;
|
76 |
-
}
|
77 |
-
public function setRestrictToDomain($restrictToDomain)
|
78 |
-
{
|
79 |
-
$this->restrictToDomain = $restrictToDomain;
|
80 |
-
}
|
81 |
-
public function getRestrictToDomain()
|
82 |
-
{
|
83 |
-
return $this->restrictToDomain;
|
84 |
-
}
|
85 |
-
public function setStartTime($startTime)
|
86 |
-
{
|
87 |
-
$this->startTime = $startTime;
|
88 |
-
}
|
89 |
-
public function getStartTime()
|
90 |
-
{
|
91 |
-
return $this->startTime;
|
92 |
-
}
|
93 |
-
}
|
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_VacationSettings extends Google_Model
|
19 |
+
{
|
20 |
+
public $enableAutoReply;
|
21 |
+
public $endTime;
|
22 |
+
public $responseBodyHtml;
|
23 |
+
public $responseBodyPlainText;
|
24 |
+
public $responseSubject;
|
25 |
+
public $restrictToContacts;
|
26 |
+
public $restrictToDomain;
|
27 |
+
public $startTime;
|
28 |
+
|
29 |
+
public function setEnableAutoReply($enableAutoReply)
|
30 |
+
{
|
31 |
+
$this->enableAutoReply = $enableAutoReply;
|
32 |
+
}
|
33 |
+
public function getEnableAutoReply()
|
34 |
+
{
|
35 |
+
return $this->enableAutoReply;
|
36 |
+
}
|
37 |
+
public function setEndTime($endTime)
|
38 |
+
{
|
39 |
+
$this->endTime = $endTime;
|
40 |
+
}
|
41 |
+
public function getEndTime()
|
42 |
+
{
|
43 |
+
return $this->endTime;
|
44 |
+
}
|
45 |
+
public function setResponseBodyHtml($responseBodyHtml)
|
46 |
+
{
|
47 |
+
$this->responseBodyHtml = $responseBodyHtml;
|
48 |
+
}
|
49 |
+
public function getResponseBodyHtml()
|
50 |
+
{
|
51 |
+
return $this->responseBodyHtml;
|
52 |
+
}
|
53 |
+
public function setResponseBodyPlainText($responseBodyPlainText)
|
54 |
+
{
|
55 |
+
$this->responseBodyPlainText = $responseBodyPlainText;
|
56 |
+
}
|
57 |
+
public function getResponseBodyPlainText()
|
58 |
+
{
|
59 |
+
return $this->responseBodyPlainText;
|
60 |
+
}
|
61 |
+
public function setResponseSubject($responseSubject)
|
62 |
+
{
|
63 |
+
$this->responseSubject = $responseSubject;
|
64 |
+
}
|
65 |
+
public function getResponseSubject()
|
66 |
+
{
|
67 |
+
return $this->responseSubject;
|
68 |
+
}
|
69 |
+
public function setRestrictToContacts($restrictToContacts)
|
70 |
+
{
|
71 |
+
$this->restrictToContacts = $restrictToContacts;
|
72 |
+
}
|
73 |
+
public function getRestrictToContacts()
|
74 |
+
{
|
75 |
+
return $this->restrictToContacts;
|
76 |
+
}
|
77 |
+
public function setRestrictToDomain($restrictToDomain)
|
78 |
+
{
|
79 |
+
$this->restrictToDomain = $restrictToDomain;
|
80 |
+
}
|
81 |
+
public function getRestrictToDomain()
|
82 |
+
{
|
83 |
+
return $this->restrictToDomain;
|
84 |
+
}
|
85 |
+
public function setStartTime($startTime)
|
86 |
+
{
|
87 |
+
$this->startTime = $startTime;
|
88 |
+
}
|
89 |
+
public function getStartTime()
|
90 |
+
{
|
91 |
+
return $this->startTime;
|
92 |
+
}
|
93 |
+
}
|
vendor/google/apiclient-services/src/Google/Service/Gmail/WatchRequest.php
CHANGED
@@ -1,49 +1,49 @@
|
|
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_WatchRequest extends Google_Collection
|
19 |
-
{
|
20 |
-
protected $collection_key = 'labelIds';
|
21 |
-
public $labelFilterAction;
|
22 |
-
public $labelIds;
|
23 |
-
public $topicName;
|
24 |
-
|
25 |
-
public function setLabelFilterAction($labelFilterAction)
|
26 |
-
{
|
27 |
-
$this->labelFilterAction = $labelFilterAction;
|
28 |
-
}
|
29 |
-
public function getLabelFilterAction()
|
30 |
-
{
|
31 |
-
return $this->labelFilterAction;
|
32 |
-
}
|
33 |
-
public function setLabelIds($labelIds)
|
34 |
-
{
|
35 |
-
$this->labelIds = $labelIds;
|
36 |
-
}
|
37 |
-
public function getLabelIds()
|
38 |
-
{
|
39 |
-
return $this->labelIds;
|
40 |
-
}
|
41 |
-
public function setTopicName($topicName)
|
42 |
-
{
|
43 |
-
$this->topicName = $topicName;
|
44 |
-
}
|
45 |
-
public function getTopicName()
|
46 |
-
{
|
47 |
-
return $this->topicName;
|
48 |
-
}
|
49 |
-
}
|
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_WatchRequest extends Google_Collection
|
19 |
+
{
|
20 |
+
protected $collection_key = 'labelIds';
|
21 |
+
public $labelFilterAction;
|
22 |
+
public $labelIds;
|
23 |
+
public $topicName;
|
24 |
+
|
25 |
+
public function setLabelFilterAction($labelFilterAction)
|
26 |
+
{
|
27 |
+
$this->labelFilterAction = $labelFilterAction;
|
28 |
+
}
|
29 |
+
public function getLabelFilterAction()
|
30 |
+
{
|
31 |
+
return $this->labelFilterAction;
|
32 |
+
}
|
33 |
+
public function setLabelIds($labelIds)
|
34 |
+
{
|
35 |
+
$this->labelIds = $labelIds;
|
36 |
+
}
|
37 |
+
public function getLabelIds()
|
38 |
+
{
|
39 |
+
return $this->labelIds;
|
40 |
+
}
|
41 |
+
public function setTopicName($topicName)
|
42 |
+
{
|
43 |
+
$this->topicName = $topicName;
|
44 |
+
}
|
45 |
+
public function getTopicName()
|
46 |
+
{
|
47 |
+
return $this->topicName;
|
48 |
+
}
|
49 |
+
}
|
vendor/google/apiclient-services/src/Google/Service/Gmail/WatchResponse.php
CHANGED
@@ -1,39 +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_WatchResponse extends Google_Model
|
19 |
-
{
|
20 |
-
public $expiration;
|
21 |
-
public $historyId;
|
22 |
-
|
23 |
-
public function setExpiration($expiration)
|
24 |
-
{
|
25 |
-
$this->expiration = $expiration;
|
26 |
-
}
|
27 |
-
public function getExpiration()
|
28 |
-
{
|
29 |
-
return $this->expiration;
|
30 |
-
}
|
31 |
-
public function setHistoryId($historyId)
|
32 |
-
{
|
33 |
-
$this->historyId = $historyId;
|
34 |
-
}
|
35 |
-
public function getHistoryId()
|
36 |
-
{
|
37 |
-
return $this->historyId;
|
38 |
-
}
|
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_WatchResponse extends Google_Model
|
19 |
+
{
|
20 |
+
public $expiration;
|
21 |
+
public $historyId;
|
22 |
+
|
23 |
+
public function setExpiration($expiration)
|
24 |
+
{
|
25 |
+
$this->expiration = $expiration;
|
26 |
+
}
|
27 |
+
public function getExpiration()
|
28 |
+
{
|
29 |
+
return $this->expiration;
|
30 |
+
}
|
31 |
+
public function setHistoryId($historyId)
|
32 |
+
{
|
33 |
+
$this->historyId = $historyId;
|
34 |
+
}
|
35 |
+
public function getHistoryId()
|
36 |
+
{
|
37 |
+
return $this->historyId;
|
38 |
+
}
|
39 |
+
}
|
vendor/google/apiclient/src/Google/Client.php
CHANGED
@@ -38,10 +38,10 @@ use Monolog\Handler\SyslogHandler as MonologSyslogHandler;
|
|
38 |
*/
|
39 |
class Google_Client
|
40 |
{
|
41 |
-
const LIBVER = "2.2.
|
42 |
const USER_AGENT_SUFFIX = "google-api-php-client/";
|
43 |
-
const OAUTH2_REVOKE_URI = 'https://
|
44 |
-
const OAUTH2_TOKEN_URI = 'https://
|
45 |
const OAUTH2_AUTH_URL = 'https://accounts.google.com/o/oauth2/auth';
|
46 |
const API_BASE_PATH = 'https://www.googleapis.com';
|
47 |
|
@@ -130,6 +130,7 @@ class Google_Client
|
|
130 |
// Task Runner retry configuration
|
131 |
// @see Google_Task_Runner
|
132 |
'retry' => array(),
|
|
|
133 |
|
134 |
// cache config for downstream auth caching
|
135 |
'cache_config' => [],
|
@@ -636,6 +637,9 @@ class Google_Client
|
|
636 |
* If no value is specified and the user has not previously authorized
|
637 |
* access, then the user is shown a consent screen.
|
638 |
* @param $prompt string
|
|
|
|
|
|
|
639 |
*/
|
640 |
public function setPrompt($prompt)
|
641 |
{
|
@@ -677,7 +681,7 @@ class Google_Client
|
|
677 |
* Revoke an OAuth2 access token or refresh token. This method will revoke the current access
|
678 |
* token, if a token isn't provided.
|
679 |
*
|
680 |
-
* @param string|null $token The token (access token or a refresh token) that should be revoked.
|
681 |
* @return boolean Returns True if the revocation was successful, otherwise False.
|
682 |
*/
|
683 |
public function revokeToken($token = null)
|
@@ -693,7 +697,8 @@ class Google_Client
|
|
693 |
* Verify an id_token. This method will verify the current id_token, if one
|
694 |
* isn't provided.
|
695 |
*
|
696 |
-
* @throws LogicException
|
|
|
697 |
* @param string|null $idToken The token (id_token) that should be verified.
|
698 |
* @return array|false Returns the token payload as an array if the verification was
|
699 |
* successful, false otherwise.
|
@@ -725,13 +730,13 @@ class Google_Client
|
|
725 |
/**
|
726 |
* Set the scopes to be requested. Must be called before createAuthUrl().
|
727 |
* Will remove any previously configured scopes.
|
728 |
-
* @param array $
|
729 |
* 'https://www.googleapis.com/auth/moderator')
|
730 |
*/
|
731 |
-
public function setScopes($
|
732 |
{
|
733 |
$this->requestedScopes = array();
|
734 |
-
$this->addScope($
|
735 |
}
|
736 |
|
737 |
/**
|
@@ -795,7 +800,13 @@ class Google_Client
|
|
795 |
// this is where most of the grunt work is done
|
796 |
$http = $this->authorize();
|
797 |
|
798 |
-
return Google_Http_REST::execute(
|
|
|
|
|
|
|
|
|
|
|
|
|
799 |
}
|
800 |
|
801 |
/**
|
@@ -856,7 +867,7 @@ class Google_Client
|
|
856 |
{
|
857 |
if (is_string($config)) {
|
858 |
if (!file_exists($config)) {
|
859 |
-
throw new InvalidArgumentException('file does not exist');
|
860 |
}
|
861 |
|
862 |
$json = file_get_contents($config);
|
38 |
*/
|
39 |
class Google_Client
|
40 |
{
|
41 |
+
const LIBVER = "2.2.3";
|
42 |
const USER_AGENT_SUFFIX = "google-api-php-client/";
|
43 |
+
const OAUTH2_REVOKE_URI = 'https://oauth2.googleapis.com/revoke';
|
44 |
+
const OAUTH2_TOKEN_URI = 'https://oauth2.googleapis.com/token';
|
45 |
const OAUTH2_AUTH_URL = 'https://accounts.google.com/o/oauth2/auth';
|
46 |
const API_BASE_PATH = 'https://www.googleapis.com';
|
47 |
|
130 |
// Task Runner retry configuration
|
131 |
// @see Google_Task_Runner
|
132 |
'retry' => array(),
|
133 |
+
'retry_map' => null,
|
134 |
|
135 |
// cache config for downstream auth caching
|
136 |
'cache_config' => [],
|
637 |
* If no value is specified and the user has not previously authorized
|
638 |
* access, then the user is shown a consent screen.
|
639 |
* @param $prompt string
|
640 |
+
* {@code "none"} Do not display any authentication or consent screens. Must not be specified with other values.
|
641 |
+
* {@code "consent"} Prompt the user for consent.
|
642 |
+
* {@code "select_account"} Prompt the user to select an account.
|
643 |
*/
|
644 |
public function setPrompt($prompt)
|
645 |
{
|
681 |
* Revoke an OAuth2 access token or refresh token. This method will revoke the current access
|
682 |
* token, if a token isn't provided.
|
683 |
*
|
684 |
+
* @param string|array|null $token The token (access token or a refresh token) that should be revoked.
|
685 |
* @return boolean Returns True if the revocation was successful, otherwise False.
|
686 |
*/
|
687 |
public function revokeToken($token = null)
|
697 |
* Verify an id_token. This method will verify the current id_token, if one
|
698 |
* isn't provided.
|
699 |
*
|
700 |
+
* @throws LogicException If no token was provided and no token was set using `setAccessToken`.
|
701 |
+
* @throws UnexpectedValueException If the token is not a valid JWT.
|
702 |
* @param string|null $idToken The token (id_token) that should be verified.
|
703 |
* @return array|false Returns the token payload as an array if the verification was
|
704 |
* successful, false otherwise.
|
730 |
/**
|
731 |
* Set the scopes to be requested. Must be called before createAuthUrl().
|
732 |
* Will remove any previously configured scopes.
|
733 |
+
* @param string|array $scope_or_scopes, ie: array('https://www.googleapis.com/auth/plus.login',
|
734 |
* 'https://www.googleapis.com/auth/moderator')
|
735 |
*/
|
736 |
+
public function setScopes($scope_or_scopes)
|
737 |
{
|
738 |
$this->requestedScopes = array();
|
739 |
+
$this->addScope($scope_or_scopes);
|
740 |
}
|
741 |
|
742 |
/**
|
800 |
// this is where most of the grunt work is done
|
801 |
$http = $this->authorize();
|
802 |
|
803 |
+
return Google_Http_REST::execute(
|
804 |
+
$http,
|
805 |
+
$request,
|
806 |
+
$expectedClass,
|
807 |
+
$this->config['retry'],
|
808 |
+
$this->config['retry_map']
|
809 |
+
);
|
810 |
}
|
811 |
|
812 |
/**
|
867 |
{
|
868 |
if (is_string($config)) {
|
869 |
if (!file_exists($config)) {
|
870 |
+
throw new InvalidArgumentException(sprintf('file "%s" does not exist', $config));
|
871 |
}
|
872 |
|
873 |
$json = file_get_contents($config);
|
vendor/google/apiclient/src/Google/Http/Batch.php
CHANGED
@@ -23,6 +23,10 @@ use Psr\Http\Message\ResponseInterface;
|
|
23 |
|
24 |
/**
|
25 |
* Class to handle batched requests to the Google API service.
|
|
|
|
|
|
|
|
|
26 |
*/
|
27 |
class Google_Http_Batch
|
28 |
{
|
23 |
|
24 |
/**
|
25 |
* Class to handle batched requests to the Google API service.
|
26 |
+
*
|
27 |
+
* Note that calls to `Google_Http_Batch::execute()` do not clear the queued
|
28 |
+
* requests. To start a new batch, be sure to create a new instance of this
|
29 |
+
* class.
|
30 |
*/
|
31 |
class Google_Http_Batch
|
32 |
{
|
vendor/google/apiclient/src/Google/Http/MediaFileUpload.php
CHANGED
@@ -317,7 +317,7 @@ class Google_Http_MediaFileUpload
|
|
317 |
if (isset($body['error']['errors'])) {
|
318 |
$message .= ': ';
|
319 |
foreach ($body['error']['errors'] as $error) {
|
320 |
-
$message .= "{$error[domain]}, {$error[message]};";
|
321 |
}
|
322 |
$message = rtrim($message, ';');
|
323 |
}
|
317 |
if (isset($body['error']['errors'])) {
|
318 |
$message .= ': ';
|
319 |
foreach ($body['error']['errors'] as $error) {
|
320 |
+
$message .= "{$error['domain']}, {$error['message']};";
|
321 |
}
|
322 |
$message = rtrim($message, ';');
|
323 |
}
|
vendor/google/auth/src/ApplicationDefaultCredentials.php
CHANGED
@@ -20,8 +20,11 @@ namespace Google\Auth;
|
|
20 |
use DomainException;
|
21 |
use Google\Auth\Credentials\AppIdentityCredentials;
|
22 |
use Google\Auth\Credentials\GCECredentials;
|
|
|
|
|
23 |
use Google\Auth\Middleware\AuthTokenMiddleware;
|
24 |
use Google\Auth\Subscriber\AuthTokenSubscriber;
|
|
|
25 |
use Psr\Cache\CacheItemPoolInterface;
|
26 |
|
27 |
/**
|
@@ -144,6 +147,15 @@ class ApplicationDefaultCredentials
|
|
144 |
$jsonKey = CredentialsLoader::fromEnv()
|
145 |
?: CredentialsLoader::fromWellKnownFile();
|
146 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
147 |
if (!is_null($jsonKey)) {
|
148 |
$creds = CredentialsLoader::makeCredentials($scope, $jsonKey);
|
149 |
} elseif (AppIdentityCredentials::onAppEngine() && !GCECredentials::onAppEngineFlexible()) {
|
20 |
use DomainException;
|
21 |
use Google\Auth\Credentials\AppIdentityCredentials;
|
22 |
use Google\Auth\Credentials\GCECredentials;
|
23 |
+
use Google\Auth\HttpHandler\HttpClientCache;
|
24 |
+
use Google\Auth\HttpHandler\HttpHandlerFactory;
|
25 |
use Google\Auth\Middleware\AuthTokenMiddleware;
|
26 |
use Google\Auth\Subscriber\AuthTokenSubscriber;
|
27 |
+
use GuzzleHttp\Client;
|
28 |
use Psr\Cache\CacheItemPoolInterface;
|
29 |
|
30 |
/**
|
147 |
$jsonKey = CredentialsLoader::fromEnv()
|
148 |
?: CredentialsLoader::fromWellKnownFile();
|
149 |
|
150 |
+
if (!$httpHandler) {
|
151 |
+
if (!($client = HttpClientCache::getHttpClient())) {
|
152 |
+
$client = new Client();
|
153 |
+
HttpClientCache::setHttpClient($client);
|
154 |
+
}
|
155 |
+
|
156 |
+
$httpHandler = HttpHandlerFactory::build($client);
|
157 |
+
}
|
158 |
+
|
159 |
if (!is_null($jsonKey)) {
|
160 |
$creds = CredentialsLoader::makeCredentials($scope, $jsonKey);
|
161 |
} elseif (AppIdentityCredentials::onAppEngine() && !GCECredentials::onAppEngineFlexible()) {
|
vendor/google/auth/src/Credentials/AppIdentityCredentials.php
CHANGED
@@ -24,6 +24,7 @@ namespace Google\Auth\Credentials;
|
|
24 |
*/
|
25 |
use google\appengine\api\app_identity\AppIdentityService;
|
26 |
use Google\Auth\CredentialsLoader;
|
|
|
27 |
|
28 |
/**
|
29 |
* AppIdentityCredentials supports authorization on Google App Engine.
|
@@ -49,7 +50,7 @@ use Google\Auth\CredentialsLoader;
|
|
49 |
*
|
50 |
* $res = $client->get('volumes?q=Henry+David+Thoreau&country=US');
|
51 |
*/
|
52 |
-
class AppIdentityCredentials extends CredentialsLoader
|
53 |
{
|
54 |
/**
|
55 |
* Result of fetchAuthToken.
|
@@ -63,6 +64,11 @@ class AppIdentityCredentials extends CredentialsLoader
|
|
63 |
*/
|
64 |
private $scope;
|
65 |
|
|
|
|
|
|
|
|
|
|
|
66 |
public function __construct($scope = array())
|
67 |
{
|
68 |
$this->scope = $scope;
|
@@ -99,27 +105,17 @@ class AppIdentityCredentials extends CredentialsLoader
|
|
99 |
*
|
100 |
* @param callable $httpHandler callback which delivers psr7 request
|
101 |
*
|
102 |
-
* @return array
|
103 |
-
*
|
104 |
-
*
|
105 |
-
*
|
106 |
-
* ["expiration_time"]=>
|
107 |
-
* string(10) "1444339905"
|
108 |
-
* }
|
109 |
-
*
|
110 |
-
* @throws \Exception
|
111 |
*/
|
112 |
public function fetchAuthToken(callable $httpHandler = null)
|
113 |
{
|
114 |
-
|
115 |
-
|
116 |
-
}
|
117 |
-
|
118 |
-
if (!class_exists('google\appengine\api\app_identity\AppIdentityService')) {
|
119 |
-
throw new \Exception(
|
120 |
-
'This class must be run in App Engine, or you must include the AppIdentityService '
|
121 |
-
. 'mock class defined in tests/mocks/AppIdentityService.php'
|
122 |
-
);
|
123 |
}
|
124 |
|
125 |
// AppIdentityService expects an array when multiple scopes are supplied
|
@@ -131,6 +127,42 @@ class AppIdentityCredentials extends CredentialsLoader
|
|
131 |
return $token;
|
132 |
}
|
133 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
134 |
/**
|
135 |
* @return array|null
|
136 |
*/
|
@@ -156,4 +188,14 @@ class AppIdentityCredentials extends CredentialsLoader
|
|
156 |
{
|
157 |
return '';
|
158 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
159 |
}
|
24 |
*/
|
25 |
use google\appengine\api\app_identity\AppIdentityService;
|
26 |
use Google\Auth\CredentialsLoader;
|
27 |
+
use Google\Auth\SignBlobInterface;
|
28 |
|
29 |
/**
|
30 |
* AppIdentityCredentials supports authorization on Google App Engine.
|
50 |
*
|
51 |
* $res = $client->get('volumes?q=Henry+David+Thoreau&country=US');
|
52 |
*/
|
53 |
+
class AppIdentityCredentials extends CredentialsLoader implements SignBlobInterface
|
54 |
{
|
55 |
/**
|
56 |
* Result of fetchAuthToken.
|
64 |
*/
|
65 |
private $scope;
|
66 |
|
67 |
+
/**
|
68 |
+
* @var string
|
69 |
+
*/
|
70 |
+
private $clientName;
|
71 |
+
|
72 |
public function __construct($scope = array())
|
73 |
{
|
74 |
$this->scope = $scope;
|
105 |
*
|
106 |
* @param callable $httpHandler callback which delivers psr7 request
|
107 |
*
|
108 |
+
* @return array A set of auth related metadata, containing the following
|
109 |
+
* keys:
|
110 |
+
* - access_token (string)
|
111 |
+
* - expiration_time (string)
|
|
|
|
|
|
|
|
|
|
|
112 |
*/
|
113 |
public function fetchAuthToken(callable $httpHandler = null)
|
114 |
{
|
115 |
+
try {
|
116 |
+
$this->checkAppEngineContext();
|
117 |
+
} catch (\Exception $e) {
|
118 |
+
return [];
|
|
|
|
|
|
|
|
|
|
|
119 |
}
|
120 |
|
121 |
// AppIdentityService expects an array when multiple scopes are supplied
|
127 |
return $token;
|
128 |
}
|
129 |
|
130 |
+
/**
|
131 |
+
* Sign a string using AppIdentityService.
|
132 |
+
*
|
133 |
+
* @param string $stringToSign The string to sign.
|
134 |
+
* @param bool $forceOpenSsl [optional] Does not apply to this credentials
|
135 |
+
* type.
|
136 |
+
* @return string The signature, base64-encoded.
|
137 |
+
* @throws \Exception If AppEngine SDK or mock is not available.
|
138 |
+
*/
|
139 |
+
public function signBlob($stringToSign, $forceOpenSsl = false)
|
140 |
+
{
|
141 |
+
$this->checkAppEngineContext();
|
142 |
+
|
143 |
+
return base64_encode(AppIdentityService::signForApp($stringToSign)['signature']);
|
144 |
+
}
|
145 |
+
|
146 |
+
/**
|
147 |
+
* Get the client name from AppIdentityService.
|
148 |
+
*
|
149 |
+
* Subsequent calls to this method will return a cached value.
|
150 |
+
*
|
151 |
+
* @param callable $httpHandler Not used in this implementation.
|
152 |
+
* @return string
|
153 |
+
* @throws \Exception If AppEngine SDK or mock is not available.
|
154 |
+
*/
|
155 |
+
public function getClientName(callable $httpHandler = null)
|
156 |
+
{
|
157 |
+
$this->checkAppEngineContext();
|
158 |
+
|
159 |
+
if (!$this->clientName) {
|
160 |
+
$this->clientName = AppIdentityService::getServiceAccountName();
|
161 |
+
}
|
162 |
+
|
163 |
+
return $this->clientName;
|
164 |
+
}
|
165 |
+
|
166 |
/**
|
167 |
* @return array|null
|
168 |
*/
|
188 |
{
|
189 |
return '';
|
190 |
}
|
191 |
+
|
192 |
+
private function checkAppEngineContext()
|
193 |
+
{
|
194 |
+
if (!self::onAppEngine() || !class_exists('google\appengine\api\app_identity\AppIdentityService')) {
|
195 |
+
throw new \Exception(
|
196 |
+
'This class must be run in App Engine, or you must include the AppIdentityService '
|
197 |
+
. 'mock class defined in tests/mocks/AppIdentityService.php'
|
198 |
+
);
|
199 |
+
}
|
200 |
+
}
|
201 |
}
|
vendor/google/auth/src/Credentials/GCECredentials.php
CHANGED
@@ -18,7 +18,10 @@
|
|
18 |
namespace Google\Auth\Credentials;
|
19 |
|
20 |
use Google\Auth\CredentialsLoader;
|
|
|
21 |
use Google\Auth\HttpHandler\HttpHandlerFactory;
|
|
|
|
|
22 |
use GuzzleHttp\Exception\ClientException;
|
23 |
use GuzzleHttp\Exception\RequestException;
|
24 |
use GuzzleHttp\Exception\ServerException;
|
@@ -48,9 +51,10 @@ use GuzzleHttp\Psr7\Request;
|
|
48 |
*
|
49 |
* $res = $client->get('myproject/taskqueues/myqueue');
|
50 |
*/
|
51 |
-
class GCECredentials extends CredentialsLoader
|
52 |
{
|
53 |
const cacheKey = 'GOOGLE_AUTH_PHP_GCE';
|
|
|
54 |
/**
|
55 |
* The metadata IP address on appengine instances.
|
56 |
*
|
@@ -64,6 +68,11 @@ class GCECredentials extends CredentialsLoader
|
|
64 |
*/
|
65 |
const TOKEN_URI_PATH = 'v1/instance/service-accounts/default/token';
|
66 |
|
|
|
|
|
|
|
|
|
|
|
67 |
/**
|
68 |
* The header whose presence indicates GCE presence.
|
69 |
*/
|
@@ -101,6 +110,24 @@ class GCECredentials extends CredentialsLoader
|
|
101 |
*/
|
102 |
protected $lastReceivedToken;
|
103 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
/**
|
105 |
* The full uri for accessing the default token.
|
106 |
*
|
@@ -113,6 +140,18 @@ class GCECredentials extends CredentialsLoader
|
|
113 |
return $base . self::TOKEN_URI_PATH;
|
114 |
}
|
115 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
/**
|
117 |
* Determines if this an App Engine Flexible instance, by accessing the
|
118 |
* GAE_INSTANCE environment variable.
|
@@ -135,9 +174,9 @@ class GCECredentials extends CredentialsLoader
|
|
135 |
*/
|
136 |
public static function onGce(callable $httpHandler = null)
|
137 |
{
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
$checkUri = 'http://' . self::METADATA_IP;
|
142 |
for ($i = 1; $i <= self::MAX_COMPUTE_PING_TRIES; $i++) {
|
143 |
try {
|
@@ -159,7 +198,6 @@ class GCECredentials extends CredentialsLoader
|
|
159 |
} catch (ServerException $e) {
|
160 |
} catch (RequestException $e) {
|
161 |
}
|
162 |
-
$httpHandler = HttpHandlerFactory::build();
|
163 |
}
|
164 |
return false;
|
165 |
}
|
@@ -172,32 +210,29 @@ class GCECredentials extends CredentialsLoader
|
|
172 |
*
|
173 |
* @param callable $httpHandler callback which delivers psr7 request
|
174 |
*
|
175 |
-
* @return array the
|
|
|
|
|
|
|
|
|
176 |
*
|
177 |
* @throws \Exception
|
178 |
*/
|
179 |
public function fetchAuthToken(callable $httpHandler = null)
|
180 |
{
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
if (!$this->hasCheckedOnGce) {
|
185 |
$this->isOnGce = self::onGce($httpHandler);
|
|
|
186 |
}
|
187 |
if (!$this->isOnGce) {
|
188 |
return array(); // return an empty array with no access token
|
189 |
}
|
190 |
-
$resp = $httpHandler(
|
191 |
-
new Request(
|
192 |
-
'GET',
|
193 |
-
self::getTokenUri(),
|
194 |
-
[self::FLAVOR_HEADER => 'Google']
|
195 |
-
)
|
196 |
-
);
|
197 |
-
$body = (string)$resp->getBody();
|
198 |
|
199 |
-
|
200 |
-
if (null === $json = json_decode($
|
201 |
throw new \Exception('Invalid JSON response');
|
202 |
}
|
203 |
|
@@ -230,4 +265,85 @@ class GCECredentials extends CredentialsLoader
|
|
230 |
|
231 |
return null;
|
232 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
233 |
}
|
18 |
namespace Google\Auth\Credentials;
|
19 |
|
20 |
use Google\Auth\CredentialsLoader;
|
21 |
+
use Google\Auth\HttpHandler\HttpClientCache;
|
22 |
use Google\Auth\HttpHandler\HttpHandlerFactory;
|
23 |
+
use Google\Auth\Iam;
|
24 |
+
use Google\Auth\SignBlobInterface;
|
25 |
use GuzzleHttp\Exception\ClientException;
|
26 |
use GuzzleHttp\Exception\RequestException;
|
27 |
use GuzzleHttp\Exception\ServerException;
|
51 |
*
|
52 |
* $res = $client->get('myproject/taskqueues/myqueue');
|
53 |
*/
|
54 |
+
class GCECredentials extends CredentialsLoader implements SignBlobInterface
|
55 |
{
|
56 |
const cacheKey = 'GOOGLE_AUTH_PHP_GCE';
|
57 |
+
|
58 |
/**
|
59 |
* The metadata IP address on appengine instances.
|
60 |
*
|
68 |
*/
|
69 |
const TOKEN_URI_PATH = 'v1/instance/service-accounts/default/token';
|
70 |
|
71 |
+
/**
|
72 |
+
* The metadata path of the client ID.
|
73 |
+
*/
|
74 |
+
const CLIENT_ID_URI_PATH = 'v1/instance/service-accounts/default/email';
|
75 |
+
|
76 |
/**
|
77 |
* The header whose presence indicates GCE presence.
|
78 |
*/
|
110 |
*/
|
111 |
protected $lastReceivedToken;
|
112 |
|
113 |
+
/**
|
114 |
+
* @var string
|
115 |
+
*/
|
116 |
+
private $clientName;
|
117 |
+
|
118 |
+
/**
|
119 |
+
* @var Iam|null
|
120 |
+
*/
|
121 |
+
private $iam;
|
122 |
+
|
123 |
+
/**
|
124 |
+
* @param Iam $iam [optional] An IAM instance.
|
125 |
+
*/
|
126 |
+
public function __construct(Iam $iam = null)
|
127 |
+
{
|
128 |
+
$this->iam = $iam;
|
129 |
+
}
|
130 |
+
|
131 |
/**
|
132 |
* The full uri for accessing the default token.
|
133 |
*
|
140 |
return $base . self::TOKEN_URI_PATH;
|
141 |
}
|
142 |
|
143 |
+
/**
|
144 |
+
* The full uri for accessing the default service account.
|
145 |
+
*
|
146 |
+
* @return string
|
147 |
+
*/
|
148 |
+
public static function getClientNameUri()
|
149 |
+
{
|
150 |
+
$base = 'http://' . self::METADATA_IP . '/computeMetadata/';
|
151 |
+
|
152 |
+
return $base . self::CLIENT_ID_URI_PATH;
|
153 |
+
}
|
154 |
+
|
155 |
/**
|
156 |
* Determines if this an App Engine Flexible instance, by accessing the
|
157 |
* GAE_INSTANCE environment variable.
|
174 |
*/
|
175 |
public static function onGce(callable $httpHandler = null)
|
176 |
{
|
177 |
+
$httpHandler = $httpHandler
|
178 |
+
?: HttpHandlerFactory::build(HttpClientCache::getHttpClient());
|
179 |
+
|
180 |
$checkUri = 'http://' . self::METADATA_IP;
|
181 |
for ($i = 1; $i <= self::MAX_COMPUTE_PING_TRIES; $i++) {
|
182 |
try {
|
198 |
} catch (ServerException $e) {
|
199 |
} catch (RequestException $e) {
|
200 |
}
|
|
|
201 |
}
|
202 |
return false;
|
203 |
}
|
210 |
*
|
211 |
* @param callable $httpHandler callback which delivers psr7 request
|
212 |
*
|
213 |
+
* @return array A set of auth related metadata, containing the following
|
214 |
+
* keys:
|
215 |
+
* - access_token (string)
|
216 |
+
* - expires_in (int)
|
217 |
+
* - token_type (string)
|
218 |
*
|
219 |
* @throws \Exception
|
220 |
*/
|
221 |
public function fetchAuthToken(callable $httpHandler = null)
|
222 |
{
|
223 |
+
$httpHandler = $httpHandler
|
224 |
+
?: HttpHandlerFactory::build(HttpClientCache::getHttpClient());
|
225 |
+
|
226 |
if (!$this->hasCheckedOnGce) {
|
227 |
$this->isOnGce = self::onGce($httpHandler);
|
228 |
+
$this->hasCheckedOnGce = true;
|
229 |
}
|
230 |
if (!$this->isOnGce) {
|
231 |
return array(); // return an empty array with no access token
|
232 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
233 |
|
234 |
+
$json = $this->getFromMetadata($httpHandler, self::getTokenUri());
|
235 |
+
if (null === $json = json_decode($json, true)) {
|
236 |
throw new \Exception('Invalid JSON response');
|
237 |
}
|
238 |
|
265 |
|
266 |
return null;
|
267 |
}
|
268 |
+
|
269 |
+
/**
|
270 |
+
* Get the client name from GCE metadata.
|
271 |
+
*
|
272 |
+
* Subsequent calls will return a cached value.
|
273 |
+
*
|
274 |
+
* @param callable $httpHandler callback which delivers psr7 request
|
275 |
+
* @return string
|
276 |
+
*/
|
277 |
+
public function getClientName(callable $httpHandler = null)
|
278 |
+
{
|
279 |
+
if ($this->clientName) {
|
280 |
+
return $this->clientName;
|
281 |
+
}
|
282 |
+
|
283 |
+
$httpHandler = $httpHandler
|
284 |
+
?: HttpHandlerFactory::build(HttpClientCache::getHttpClient());
|
285 |
+
|
286 |
+
if (!$this->hasCheckedOnGce) {
|
287 |
+
$this->isOnGce = self::onGce($httpHandler);
|
288 |
+
$this->hasCheckedOnGce = true;
|
289 |
+
}
|
290 |
+
|
291 |
+
if (!$this->isOnGce) {
|
292 |
+
return '';
|
293 |
+
}
|
294 |
+
|
295 |
+
$this->clientName = $this->getFromMetadata($httpHandler, self::getClientNameUri());
|
296 |
+
|
297 |
+
return $this->clientName;
|
298 |
+
}
|
299 |
+
|
300 |
+
/**
|
301 |
+
* Sign a string using the default service account private key.
|
302 |
+
*
|
303 |
+
* This implementation uses IAM's signBlob API.
|
304 |
+
*
|
305 |
+
* @see https://cloud.google.com/iam/credentials/reference/rest/v1/projects.serviceAccounts/signBlob SignBlob
|
306 |
+
*
|
307 |
+
* @param string $stringToSign The string to sign.
|
308 |
+
* @param bool $forceOpenSsl [optional] Does not apply to this credentials
|
309 |
+
* type.
|
310 |
+
* @return string
|
311 |
+
*/
|
312 |
+
public function signBlob($stringToSign, $forceOpenSsl = false)
|
313 |
+
{
|
314 |
+
$httpHandler = HttpHandlerFactory::build(HttpClientCache::getHttpClient());
|
315 |
+
|
316 |
+
// Providing a signer is useful for testing, but it's undocumented
|
317 |
+
// because it's not something a user would generally need to do.
|
318 |
+
$signer = $this->iam ?: new Iam($httpHandler);
|
319 |
+
|
320 |
+
$email = $this->getClientName($httpHandler);
|
321 |
+
|
322 |
+
$previousToken = $this->getLastReceivedToken();
|
323 |
+
$accessToken = $previousToken
|
324 |
+
? $previousToken['access_token']
|
325 |
+
: $this->fetchAuthToken($httpHandler)['access_token'];
|
326 |
+
|
327 |
+
return $signer->signBlob($email, $accessToken, $stringToSign);
|
328 |
+
}
|
329 |
+
|
330 |
+
/**
|
331 |
+
* Fetch the value of a GCE metadata server URI.
|
332 |
+
*
|
333 |
+
* @param callable $httpHandler An HTTP Handler to deliver PSR7 requests.
|
334 |
+
* @param string $uri The metadata URI.
|
335 |
+
* @return string
|
336 |
+
*/
|
337 |
+
private function getFromMetadata(callable $httpHandler, $uri)
|
338 |
+
{
|
339 |
+
$resp = $httpHandler(
|
340 |
+
new Request(
|
341 |
+
'GET',
|
342 |
+
$uri,
|
343 |
+
[GCECredentials::FLAVOR_HEADER => 'Google']
|
344 |
+
)
|
345 |
+
);
|
346 |
+
|
347 |
+
return (string) $resp->getBody();
|
348 |
+
}
|
349 |
}
|
vendor/google/auth/src/Credentials/InsecureCredentials.php
CHANGED
@@ -37,7 +37,9 @@ class InsecureCredentials implements FetchAuthTokenInterface
|
|
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 |
{
|
37 |
* Fetches the auth token. In this case it returns an empty string.
|
38 |
*
|
39 |
* @param callable $httpHandler
|
40 |
+
* @return array A set of auth related metadata, containing the following
|
41 |
+
* keys:
|
42 |
+
* - access_token (string)
|
43 |
*/
|
44 |
public function fetchAuthToken(callable $httpHandler = null)
|
45 |
{
|
vendor/google/auth/src/Credentials/ServiceAccountCredentials.php
CHANGED
@@ -19,6 +19,8 @@ namespace Google\Auth\Credentials;
|
|
19 |
|
20 |
use Google\Auth\CredentialsLoader;
|
21 |
use Google\Auth\OAuth2;
|
|
|
|
|
22 |
|
23 |
/**
|
24 |
* ServiceAccountCredentials supports authorization using a Google service
|
@@ -53,8 +55,10 @@ use Google\Auth\OAuth2;
|
|
53 |
*
|
54 |
* $res = $client->get('myproject/taskqueues/myqueue');
|
55 |
*/
|
56 |
-
class ServiceAccountCredentials extends CredentialsLoader
|
57 |
{
|
|
|
|
|
58 |
/**
|
59 |
* The OAuth2 instance used to conduct authorization.
|
60 |
*
|
@@ -108,7 +112,11 @@ class ServiceAccountCredentials extends CredentialsLoader
|
|
108 |
/**
|
109 |
* @param callable $httpHandler
|
110 |
*
|
111 |
-
* @return array
|
|
|
|
|
|
|
|
|
112 |
*/
|
113 |
public function fetchAuthToken(callable $httpHandler = null)
|
114 |
{
|
@@ -174,4 +182,17 @@ class ServiceAccountCredentials extends CredentialsLoader
|
|
174 |
{
|
175 |
$this->auth->setSub($sub);
|
176 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
177 |
}
|
19 |
|
20 |
use Google\Auth\CredentialsLoader;
|
21 |
use Google\Auth\OAuth2;
|
22 |
+
use Google\Auth\ServiceAccountSignerTrait;
|
23 |
+
use Google\Auth\SignBlobInterface;
|
24 |
|
25 |
/**
|
26 |
* ServiceAccountCredentials supports authorization using a Google service
|
55 |
*
|
56 |
* $res = $client->get('myproject/taskqueues/myqueue');
|
57 |
*/
|
58 |
+
class ServiceAccountCredentials extends CredentialsLoader implements SignBlobInterface
|
59 |
{
|
60 |
+
use ServiceAccountSignerTrait;
|
61 |
+
|
62 |
/**
|
63 |
* The OAuth2 instance used to conduct authorization.
|
64 |
*
|
112 |
/**
|
113 |
* @param callable $httpHandler
|
114 |
*
|
115 |
+
* @return array A set of auth related metadata, containing the following
|
116 |
+
* keys:
|
117 |
+
* - access_token (string)
|
118 |
+
* - expires_in (int)
|
119 |
+
* - token_type (string)
|
120 |
*/
|
121 |
public function fetchAuthToken(callable $httpHandler = null)
|
122 |
{
|
182 |
{
|
183 |
$this->auth->setSub($sub);
|
184 |
}
|
185 |
+
|
186 |
+
/**
|
187 |
+
* Get the client name from the keyfile.
|
188 |
+
*
|
189 |
+
* In this case, it returns the keyfile's client_email key.
|
190 |
+
*
|
191 |
+
* @param callable $httpHandler Not used by this credentials type.
|
192 |
+
* @return string
|
193 |
+
*/
|
194 |
+
public function getClientName(callable $httpHandler = null)
|
195 |
+
{
|
196 |
+
return $this->auth->getIssuer();
|
197 |
+
}
|
198 |
}
|
vendor/google/auth/src/Credentials/ServiceAccountJwtAccessCredentials.php
CHANGED
@@ -19,6 +19,8 @@ namespace Google\Auth\Credentials;
|
|
19 |
|
20 |
use Google\Auth\CredentialsLoader;
|
21 |
use Google\Auth\OAuth2;
|
|
|
|
|
22 |
|
23 |
/**
|
24 |
* Authenticates requests using Google's Service Account credentials via
|
@@ -29,8 +31,10 @@ use Google\Auth\OAuth2;
|
|
29 |
* console (via 'Generate new Json Key'). It is not part of any OAuth2
|
30 |
* flow, rather it creates a JWT and sends that as a credential.
|
31 |
*/
|
32 |
-
class ServiceAccountJwtAccessCredentials extends CredentialsLoader
|
33 |
{
|
|
|
|
|
34 |
/**
|
35 |
* The OAuth2 instance used to conduct authorization.
|
36 |
*
|
@@ -99,7 +103,9 @@ class ServiceAccountJwtAccessCredentials extends CredentialsLoader
|
|
99 |
*
|
100 |
* @param callable $httpHandler
|
101 |
*
|
102 |
-
* @return array|void
|
|
|
|
|
103 |
*/
|
104 |
public function fetchAuthToken(callable $httpHandler = null)
|
105 |
{
|
@@ -128,4 +134,17 @@ class ServiceAccountJwtAccessCredentials extends CredentialsLoader
|
|
128 |
{
|
129 |
return $this->auth->getLastReceivedToken();
|
130 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
131 |
}
|
19 |
|
20 |
use Google\Auth\CredentialsLoader;
|
21 |
use Google\Auth\OAuth2;
|
22 |
+
use Google\Auth\ServiceAccountSignerTrait;
|
23 |
+
use Google\Auth\SignBlobInterface;
|
24 |
|
25 |
/**
|
26 |
* Authenticates requests using Google's Service Account credentials via
|
31 |
* console (via 'Generate new Json Key'). It is not part of any OAuth2
|
32 |
* flow, rather it creates a JWT and sends that as a credential.
|
33 |
*/
|
34 |
+
class ServiceAccountJwtAccessCredentials extends CredentialsLoader implements SignBlobInterface
|
35 |
{
|
36 |
+
use ServiceAccountSignerTrait;
|
37 |
+
|
38 |
/**
|
39 |
* The OAuth2 instance used to conduct authorization.
|
40 |
*
|
103 |
*
|
104 |
* @param callable $httpHandler
|
105 |
*
|
106 |
+
* @return array|void A set of auth related metadata, containing the
|
107 |
+
* following keys:
|
108 |
+
* - access_token (string)
|
109 |
*/
|
110 |
public function fetchAuthToken(callable $httpHandler = null)
|
111 |
{
|
134 |
{
|
135 |
return $this->auth->getLastReceivedToken();
|
136 |
}
|
137 |
+
|
138 |
+
/**
|
139 |
+
* Get the client name from the keyfile.
|
140 |
+
*
|
141 |
+
* In this case, it returns the keyfile's client_email key.
|
142 |
+
*
|
143 |
+
* @param callable $httpHandler Not used by this credentials type.
|
144 |
+
* @return string
|
145 |
+
*/
|
146 |
+
public function getClientName(callable $httpHandler = null)
|
147 |
+
{
|
148 |
+
return $this->auth->getIssuer();
|
149 |
+
}
|
150 |
}
|
vendor/google/auth/src/Credentials/UserRefreshCredentials.php
CHANGED
@@ -106,7 +106,13 @@ class UserRefreshCredentials extends CredentialsLoader
|
|
106 |
/**
|
107 |
* @param callable $httpHandler
|
108 |
*
|
109 |
-
* @return array
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
*/
|
111 |
public function fetchAuthToken(callable $httpHandler = null)
|
112 |
{
|
106 |
/**
|
107 |
* @param callable $httpHandler
|
108 |
*
|
109 |
+
* @return array A set of auth related metadata, containing the following
|
110 |
+
* keys:
|
111 |
+
* - access_token (string)
|
112 |
+
* - expires_in (int)
|
113 |
+
* - scope (string)
|
114 |
+
* - token_type (string)
|
115 |
+
* - id_token (string)
|
116 |
*/
|
117 |
public function fetchAuthToken(callable $httpHandler = null)
|
118 |
{
|
vendor/google/auth/src/FetchAuthTokenCache.php
CHANGED
@@ -23,7 +23,7 @@ use Psr\Cache\CacheItemPoolInterface;
|
|
23 |
* A class to implement caching for any object implementing
|
24 |
* FetchAuthTokenInterface
|
25 |
*/
|
26 |
-
class FetchAuthTokenCache implements FetchAuthTokenInterface
|
27 |
{
|
28 |
use CacheTrait;
|
29 |
|
@@ -105,4 +105,38 @@ class FetchAuthTokenCache implements FetchAuthTokenInterface
|
|
105 |
{
|
106 |
return $this->fetcher->getLastReceivedToken();
|
107 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
}
|
23 |
* A class to implement caching for any object implementing
|
24 |
* FetchAuthTokenInterface
|
25 |
*/
|
26 |
+
class FetchAuthTokenCache implements FetchAuthTokenInterface, SignBlobInterface
|
27 |
{
|
28 |
use CacheTrait;
|
29 |
|
105 |
{
|
106 |
return $this->fetcher->getLastReceivedToken();
|
107 |
}
|
108 |
+
|
109 |
+
/**
|
110 |
+
* Get the client name from the fetcher.
|
111 |
+
*
|
112 |
+
* @param callable $httpHandler An HTTP handler to deliver PSR7 requests.
|
113 |
+
* @return string
|
114 |
+
*/
|
115 |
+
public function getClientName(callable $httpHandler = null)
|
116 |
+
{
|
117 |
+
return $this->fetcher->getClientName($httpHandler);
|
118 |
+
}
|
119 |
+
|
120 |
+
/**
|
121 |
+
* Sign a blob using the fetcher.
|
122 |
+
*
|
123 |
+
* @param string $stringToSign The string to sign.
|
124 |
+
* @param bool $forceOpenssl Require use of OpenSSL for local signing. Does
|
125 |
+
* not apply to signing done using external services. **Defaults to**
|
126 |
+
* `false`.
|
127 |
+
* @return string The resulting signature.
|
128 |
+
* @throws \RuntimeException If the fetcher does not implement
|
129 |
+
* `Google\Auth\SignBlobInterface`.
|
130 |
+
*/
|
131 |
+
public function signBlob($stringToSign, $forceOpenSsl = false)
|
132 |
+
{
|
133 |
+
if (!$this->fetcher instanceof SignBlobInterface) {
|
134 |
+
throw new \RuntimeException(
|
135 |
+
'Credentials fetcher does not implement ' .
|
136 |
+
'Google\Auth\SignBlobInterface'
|
137 |
+
);
|
138 |
+
}
|
139 |
+
|
140 |
+
return $this->fetcher->signBlob($stringToSign, $forceOpenSsl);
|
141 |
+
}
|
142 |
}
|
vendor/google/auth/src/HttpHandler/HttpClientCache.php
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Copyright 2019 Google LLC
|
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\HttpHandler;
|
19 |
+
|
20 |
+
use GuzzleHttp\ClientInterface;
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Stores an HTTP Client in order to prevent multiple instantiations.
|
24 |
+
*/
|
25 |
+
class HttpClientCache
|
26 |
+
{
|
27 |
+
/**
|
28 |
+
* @var ClientInterface|null
|
29 |
+
*/
|
30 |
+
private static $httpClient;
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Cache an HTTP Client for later calls.
|
34 |
+
*
|
35 |
+
* Passing null will unset the cached client.
|
36 |
+
*
|
37 |
+
* @param ClientInterface|null $client
|
38 |
+
* @return void
|
39 |
+
*/
|
40 |
+
public static function setHttpClient(ClientInterface $client = null)
|
41 |
+
{
|
42 |
+
self::$httpClient = $client;
|
43 |
+
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Get the stored HTTP Client, or null.
|
47 |
+
*
|
48 |
+
* @return ClientInterface|null
|
49 |
+
*/
|
50 |
+
public static function getHttpClient()
|
51 |
+
{
|
52 |
+
return self::$httpClient;
|
53 |
+
}
|
54 |
+
}
|
vendor/google/auth/src/HttpHandler/HttpHandlerFactory.php
CHANGED
@@ -25,9 +25,7 @@ class HttpHandlerFactory
|
|
25 |
* Builds out a default http handler for the installed version of guzzle.
|
26 |
*
|
27 |
* @param ClientInterface $client
|
28 |
-
*
|
29 |
* @return Guzzle5HttpHandler|Guzzle6HttpHandler
|
30 |
-
*
|
31 |
* @throws \Exception
|
32 |
*/
|
33 |
public static function build(ClientInterface $client = null)
|
25 |
* Builds out a default http handler for the installed version of guzzle.
|
26 |
*
|
27 |
* @param ClientInterface $client
|
|
|
28 |
* @return Guzzle5HttpHandler|Guzzle6HttpHandler
|
|
|
29 |
* @throws \Exception
|
30 |
*/
|
31 |
public static function build(ClientInterface $client = null)
|
vendor/google/auth/src/Iam.php
ADDED
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Copyright 2019 Google LLC
|
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;
|
19 |
+
|
20 |
+
use Google\Auth\HttpHandler\HttpClientCache;
|
21 |
+
use Google\Auth\HttpHandler\HttpHandlerFactory;
|
22 |
+
use GuzzleHttp\Psr7;
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Tools for using the IAM API.
|
26 |
+
*
|
27 |
+
* @see https://cloud.google.com/iam/docs IAM Documentation
|
28 |
+
*/
|
29 |
+
class Iam
|
30 |
+
{
|
31 |
+
const IAM_API_ROOT = 'https://iamcredentials.googleapis.com/v1';
|
32 |
+
const SIGN_BLOB_PATH = '%s:signBlob?alt=json';
|
33 |
+
const SERVICE_ACCOUNT_NAME = 'projects/-/serviceAccounts/%s';
|
34 |
+
|
35 |
+
/**
|
36 |
+
* @var callable
|
37 |
+
*/
|
38 |
+
private $httpHandler;
|
39 |
+
|
40 |
+
/**
|
41 |
+
* @param callable $httpHandler [optional] The HTTP Handler to send requests.
|
42 |
+
*/
|
43 |
+
public function __construct(callable $httpHandler = null)
|
44 |
+
{
|
45 |
+
$this->httpHandler = $httpHandler
|
46 |
+
?: HttpHandlerFactory::build(HttpClientCache::getHttpClient());
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Sign a string using the IAM signBlob API.
|
51 |
+
*
|
52 |
+
* Note that signing using IAM requires your service account to have the
|
53 |
+
* `iam.serviceAccounts.signBlob` permission, part of the "Service Account
|
54 |
+
* Token Creator" IAM role.
|
55 |
+
*
|
56 |
+
* @param string $email The service account email.
|
57 |
+
* @param string $accessToken An access token from the service account.
|
58 |
+
* @param string $stringToSign The string to be signed.
|
59 |
+
* @param array $delegates [optional] A list of service account emails to
|
60 |
+
* add to the delegate chain. If omitted, the value of `$email` will
|
61 |
+
* be used.
|
62 |
+
* @return string The signed string, base64-encoded.
|
63 |
+
*/
|
64 |
+
public function signBlob($email, $accessToken, $stringToSign, array $delegates = [])
|
65 |
+
{
|
66 |
+
$httpHandler = $this->httpHandler;
|
67 |
+
$name = sprintf(self::SERVICE_ACCOUNT_NAME, $email);
|
68 |
+
$uri = self::IAM_API_ROOT . '/' . sprintf(self::SIGN_BLOB_PATH, $name);
|
69 |
+
|
70 |
+
if ($delegates) {
|
71 |
+
foreach ($delegates as &$delegate) {
|
72 |
+
$delegate = sprintf(self::SERVICE_ACCOUNT_NAME, $delegate);
|
73 |
+
}
|
74 |
+
} else {
|
75 |
+
$delegates = [$name];
|
76 |
+
}
|
77 |
+
|
78 |
+
$body = [
|
79 |
+
'delegates' => $delegates,
|
80 |
+
'payload' => base64_encode($stringToSign),
|
81 |
+
];
|
82 |
+
|
83 |
+
$headers = [
|
84 |
+
'Authorization' => 'Bearer ' . $accessToken
|
85 |
+
];
|
86 |
+
|
87 |
+
$request = new Psr7\Request(
|
88 |
+
'POST',
|
89 |
+
$uri,
|
90 |
+
$headers,
|
91 |
+
Psr7\stream_for(json_encode($body))
|
92 |
+
);
|
93 |
+
|
94 |
+
$res = $httpHandler($request);
|
95 |
+
$body = json_decode((string) $res->getBody(), true);
|
96 |
+
|
97 |
+
return $body['signedBlob'];
|
98 |
+
}
|
99 |
+
}
|
vendor/google/auth/src/OAuth2.php
CHANGED
@@ -17,6 +17,7 @@
|
|
17 |
|
18 |
namespace Google\Auth;
|
19 |
|
|
|
20 |
use Google\Auth\HttpHandler\HttpHandlerFactory;
|
21 |
use GuzzleHttp\Psr7;
|
22 |
use GuzzleHttp\Psr7\Request;
|
@@ -495,7 +496,7 @@ class OAuth2 implements FetchAuthTokenInterface
|
|
495 |
public function fetchAuthToken(callable $httpHandler = null)
|
496 |
{
|
497 |
if (is_null($httpHandler)) {
|
498 |
-
$httpHandler = HttpHandlerFactory::build();
|
499 |
}
|
500 |
|
501 |
$response = $httpHandler($this->generateCredentialsRequest());
|
@@ -1268,6 +1269,20 @@ class OAuth2 implements FetchAuthTokenInterface
|
|
1268 |
return null;
|
1269 |
}
|
1270 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1271 |
/**
|
1272 |
* @todo handle uri as array
|
1273 |
*
|
17 |
|
18 |
namespace Google\Auth;
|
19 |
|
20 |
+
use Google\Auth\HttpHandler\HttpClientCache;
|
21 |
use Google\Auth\HttpHandler\HttpHandlerFactory;
|
22 |
use GuzzleHttp\Psr7;
|
23 |
use GuzzleHttp\Psr7\Request;
|
496 |
public function fetchAuthToken(callable $httpHandler = null)
|
497 |
{
|
498 |
if (is_null($httpHandler)) {
|
499 |
+
$httpHandler = HttpHandlerFactory::build(HttpClientCache::getHttpClient());
|
500 |
}
|
501 |
|
502 |
$response = $httpHandler($this->generateCredentialsRequest());
|
1269 |
return null;
|
1270 |
}
|
1271 |
|
1272 |
+
/**
|
1273 |
+
* Get the client ID.
|
1274 |
+
*
|
1275 |
+
* Alias of {@see Google\Auth\OAuth2::getClientId()}.
|
1276 |
+
*
|
1277 |
+
* @param callable $httpHandler
|
1278 |
+
* @return string
|
1279 |
+
* @access private
|
1280 |
+
*/
|
1281 |
+
public function getClientName(callable $httpHandler = null)
|
1282 |
+
{
|
1283 |
+
return $this->getClientId();
|
1284 |
+
}
|
1285 |
+
|
1286 |
/**
|
1287 |
* @todo handle uri as array
|
1288 |
*
|
vendor/google/auth/src/ServiceAccountSignerTrait.php
ADDED
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Copyright 2019 Google LLC
|
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;
|
19 |
+
|
20 |
+
use phpseclib\Crypt\RSA;
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Sign a string using a Service Account private key.
|
24 |
+
*/
|
25 |
+
trait ServiceAccountSignerTrait
|
26 |
+
{
|
27 |
+
/**
|
28 |
+
* Sign a string using the service account private key.
|
29 |
+
*
|
30 |
+
* @param string $stringToSign
|
31 |
+
* @param bool $forceOpenssl Whether to use OpenSSL regardless of
|
32 |
+
* whether phpseclib is installed. **Defaults to** `false`.
|
33 |
+
* @return string
|
34 |
+
*/
|
35 |
+
public function signBlob($stringToSign, $forceOpenssl = false)
|
36 |
+
{
|
37 |
+
$privateKey = $this->auth->getSigningKey();
|
38 |
+
|
39 |
+
$signedString = '';
|
40 |
+
if (class_exists('RSA') && !$forceOpenssl) {
|
41 |
+
$rsa = new RSA;
|
42 |
+
$rsa->loadKey($privateKey);
|
43 |
+
$rsa->setSignatureMode(RSA::SIGNATURE_PKCS1);
|
44 |
+
$rsa->setHash('sha256');
|
45 |
+
|
46 |
+
$signedString = $rsa->sign($stringToSign);
|
47 |
+
} elseif (extension_loaded('openssl')) {
|
48 |
+
openssl_sign($stringToSign, $signedString, $privateKey, 'sha256WithRSAEncryption');
|
49 |
+
} else {
|
50 |
+
// @codeCoverageIgnoreStart
|
51 |
+
throw new \RuntimeException('OpenSSL is not installed.');
|
52 |
+
}
|
53 |
+
// @codeCoverageIgnoreEnd
|
54 |
+
|
55 |
+
return base64_encode($signedString);
|
56 |
+
}
|
57 |
+
}
|
vendor/google/auth/src/SignBlobInterface.php
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Copyright 2019 Google LLC
|
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;
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Describes a class which supports signing arbitrary strings.
|
22 |
+
*/
|
23 |
+
interface SignBlobInterface extends FetchAuthTokenInterface
|
24 |
+
{
|
25 |
+
/**
|
26 |
+
* Sign a string using the method which is best for a given credentials type.
|
27 |
+
*
|
28 |
+
* @param string $stringToSign The string to sign.
|
29 |
+
* @param bool $forceOpenssl Require use of OpenSSL for local signing. Does
|
30 |
+
* not apply to signing done using external services. **Defaults to**
|
31 |
+
* `false`.
|
32 |
+
* @return string The resulting signature. Value should be base64-encoded.
|
33 |
+
*/
|
34 |
+
public function signBlob($stringToSign, $forceOpenssl = false);
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Returns the current Client Name.
|
38 |
+
*
|
39 |
+
* @param callable $httpHandler callback which delivers psr7 request, if
|
40 |
+
* one is required to obtain a client name.
|
41 |
+
* @return string
|
42 |
+
*/
|
43 |
+
public function getClientName(callable $httpHandler = null);
|
44 |
+
}
|
vendor/guzzlehttp/psr7/src/AppendStream.php
CHANGED
@@ -16,7 +16,6 @@ class AppendStream implements StreamInterface
|
|
16 |
private $seekable = true;
|
17 |
private $current = 0;
|
18 |
private $pos = 0;
|
19 |
-
private $detached = false;
|
20 |
|
21 |
/**
|
22 |
* @param StreamInterface[] $streams Streams to decorate. Each stream must
|
@@ -73,6 +72,7 @@ class AppendStream implements StreamInterface
|
|
73 |
public function close()
|
74 |
{
|
75 |
$this->pos = $this->current = 0;
|
|
|
76 |
|
77 |
foreach ($this->streams as $stream) {
|
78 |
$stream->close();
|
@@ -82,14 +82,22 @@ class AppendStream implements StreamInterface
|
|
82 |
}
|
83 |
|
84 |
/**
|
85 |
-
* Detaches each attached stream
|
|
|
|
|
86 |
*
|
87 |
* {@inheritdoc}
|
88 |
*/
|
89 |
public function detach()
|
90 |
{
|
91 |
-
$this->
|
92 |
-
$this->
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
}
|
94 |
|
95 |
public function tell()
|
16 |
private $seekable = true;
|
17 |
private $current = 0;
|
18 |
private $pos = 0;
|
|
|
19 |
|
20 |
/**
|
21 |
* @param StreamInterface[] $streams Streams to decorate. Each stream must
|
72 |
public function close()
|
73 |
{
|
74 |
$this->pos = $this->current = 0;
|
75 |
+
$this->seekable = true;
|
76 |
|
77 |
foreach ($this->streams as $stream) {
|
78 |
$stream->close();
|
82 |
}
|
83 |
|
84 |
/**
|
85 |
+
* Detaches each attached stream.
|
86 |
+
*
|
87 |
+
* Returns null as it's not clear which underlying stream resource to return.
|
88 |
*
|
89 |
* {@inheritdoc}
|
90 |
*/
|
91 |
public function detach()
|
92 |
{
|
93 |
+
$this->pos = $this->current = 0;
|
94 |
+
$this->seekable = true;
|
95 |
+
|
96 |
+
foreach ($this->streams as $stream) {
|
97 |
+
$stream->detach();
|
98 |
+
}
|
99 |
+
|
100 |
+
$this->streams = [];
|
101 |
}
|
102 |
|
103 |
public function tell()
|
vendor/guzzlehttp/psr7/src/FnStream.php
CHANGED
@@ -52,6 +52,15 @@ class FnStream implements StreamInterface
|
|
52 |
}
|
53 |
}
|
54 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
/**
|
56 |
* Adds custom functionality to an underlying stream by intercepting
|
57 |
* specific method calls.
|
52 |
}
|
53 |
}
|
54 |
|
55 |
+
/**
|
56 |
+
* An unserialize would allow the __destruct to run when the unserialized value goes out of scope.
|
57 |
+
* @throws \LogicException
|
58 |
+
*/
|
59 |
+
public function __wakeup()
|
60 |
+
{
|
61 |
+
throw new \LogicException('FnStream should never be unserialized');
|
62 |
+
}
|
63 |
+
|
64 |
/**
|
65 |
* Adds custom functionality to an underlying stream by intercepting
|
66 |
* specific method calls.
|
vendor/guzzlehttp/psr7/src/InflateStream.php
CHANGED
@@ -27,7 +27,7 @@ class InflateStream implements StreamInterface
|
|
27 |
$stream = new LimitStream($stream, -1, 10 + $filenameHeaderLength);
|
28 |
$resource = StreamWrapper::getResource($stream);
|
29 |
stream_filter_append($resource, 'zlib.inflate', STREAM_FILTER_READ);
|
30 |
-
$this->stream = new Stream($resource);
|
31 |
}
|
32 |
|
33 |
/**
|
27 |
$stream = new LimitStream($stream, -1, 10 + $filenameHeaderLength);
|
28 |
$resource = StreamWrapper::getResource($stream);
|
29 |
stream_filter_append($resource, 'zlib.inflate', STREAM_FILTER_READ);
|
30 |
+
$this->stream = $stream->isSeekable() ? new Stream($resource) : new NoSeekStream(new Stream($resource));
|
31 |
}
|
32 |
|
33 |
/**
|
vendor/guzzlehttp/psr7/src/LimitStream.php
CHANGED
@@ -72,7 +72,7 @@ class LimitStream implements StreamInterface
|
|
72 |
{
|
73 |
if ($whence !== SEEK_SET || $offset < 0) {
|
74 |
throw new \RuntimeException(sprintf(
|
75 |
-
'Cannot seek to offset % with whence %s',
|
76 |
$offset,
|
77 |
$whence
|
78 |
));
|
72 |
{
|
73 |
if ($whence !== SEEK_SET || $offset < 0) {
|
74 |
throw new \RuntimeException(sprintf(
|
75 |
+
'Cannot seek to offset %s with whence %s',
|
76 |
$offset,
|
77 |
$whence
|
78 |
));
|
vendor/guzzlehttp/psr7/src/MessageTrait.php
CHANGED
@@ -66,11 +66,8 @@ trait MessageTrait
|
|
66 |
|
67 |
public function withHeader($header, $value)
|
68 |
{
|
69 |
-
|
70 |
-
|
71 |
-
}
|
72 |
-
|
73 |
-
$value = $this->trimHeaderValues($value);
|
74 |
$normalized = strtolower($header);
|
75 |
|
76 |
$new = clone $this;
|
@@ -85,11 +82,8 @@ trait MessageTrait
|
|
85 |
|
86 |
public function withAddedHeader($header, $value)
|
87 |
{
|
88 |
-
|
89 |
-
|
90 |
-
}
|
91 |
-
|
92 |
-
$value = $this->trimHeaderValues($value);
|
93 |
$normalized = strtolower($header);
|
94 |
|
95 |
$new = clone $this;
|
@@ -144,11 +138,13 @@ trait MessageTrait
|
|
144 |
{
|
145 |
$this->headerNames = $this->headers = [];
|
146 |
foreach ($headers as $header => $value) {
|
147 |
-
if (
|
148 |
-
|
|
|
|
|
149 |
}
|
150 |
-
|
151 |
-
$value = $this->
|
152 |
$normalized = strtolower($header);
|
153 |
if (isset($this->headerNames[$normalized])) {
|
154 |
$header = $this->headerNames[$normalized];
|
@@ -160,6 +156,19 @@ trait MessageTrait
|
|
160 |
}
|
161 |
}
|
162 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
163 |
/**
|
164 |
* Trims whitespace from the header values.
|
165 |
*
|
@@ -177,7 +186,28 @@ trait MessageTrait
|
|
177 |
private function trimHeaderValues(array $values)
|
178 |
{
|
179 |
return array_map(function ($value) {
|
180 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
181 |
}, $values);
|
182 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
183 |
}
|
66 |
|
67 |
public function withHeader($header, $value)
|
68 |
{
|
69 |
+
$this->assertHeader($header);
|
70 |
+
$value = $this->normalizeHeaderValue($value);
|
|
|
|
|
|
|
71 |
$normalized = strtolower($header);
|
72 |
|
73 |
$new = clone $this;
|
82 |
|
83 |
public function withAddedHeader($header, $value)
|
84 |
{
|
85 |
+
$this->assertHeader($header);
|
86 |
+
$value = $this->normalizeHeaderValue($value);
|
|
|
|
|
|
|
87 |
$normalized = strtolower($header);
|
88 |
|
89 |
$new = clone $this;
|
138 |
{
|
139 |
$this->headerNames = $this->headers = [];
|
140 |
foreach ($headers as $header => $value) {
|
141 |
+
if (is_int($header)) {
|
142 |
+
// Numeric array keys are converted to int by PHP but having a header name '123' is not forbidden by the spec
|
143 |
+
// and also allowed in withHeader(). So we need to cast it to string again for the following assertion to pass.
|
144 |
+
$header = (string) $header;
|
145 |
}
|
146 |
+
$this->assertHeader($header);
|
147 |
+
$value = $this->normalizeHeaderValue($value);
|
148 |
$normalized = strtolower($header);
|
149 |
if (isset($this->headerNames[$normalized])) {
|
150 |
$header = $this->headerNames[$normalized];
|
156 |
}
|
157 |
}
|
158 |
|
159 |
+
private function normalizeHeaderValue($value)
|
160 |
+
{
|
161 |
+
if (!is_array($value)) {
|
162 |
+
return $this->trimHeaderValues([$value]);
|
163 |
+
}
|
164 |
+
|
165 |
+
if (count($value) === 0) {
|
166 |
+
throw new \InvalidArgumentException('Header value can not be an empty array.');
|
167 |
+
}
|
168 |
+
|
169 |
+
return $this->trimHeaderValues($value);
|
170 |
+
}
|
171 |
+
|
172 |
/**
|
173 |
* Trims whitespace from the header values.
|
174 |
*
|
186 |
private function trimHeaderValues(array $values)
|
187 |
{
|
188 |
return array_map(function ($value) {
|
189 |
+
if (!is_scalar($value) && null !== $value) {
|
190 |
+
throw new \InvalidArgumentException(sprintf(
|
191 |
+
'Header value must be scalar or null but %s provided.',
|
192 |
+
is_object($value) ? get_class($value) : gettype($value)
|
193 |
+
));
|
194 |
+
}
|
195 |
+
|
196 |
+
return trim((string) $value, " \t");
|
197 |
}, $values);
|
198 |
}
|
199 |
+
|
200 |
+
private function assertHeader($header)
|
201 |
+
{
|
202 |
+
if (!is_string($header)) {
|
203 |
+
throw new \InvalidArgumentException(sprintf(
|
204 |
+
'Header name must be a string but %s provided.',
|
205 |
+
is_object($header) ? get_class($header) : gettype($header)
|
206 |
+
));
|
207 |
+
}
|
208 |
+
|
209 |
+
if ($header === '') {
|
210 |
+
throw new \InvalidArgumentException('Header name can not be empty.');
|
211 |
+
}
|
212 |
+
}
|
213 |
}
|
vendor/guzzlehttp/psr7/src/Request.php
CHANGED
@@ -36,6 +36,7 @@ class Request implements RequestInterface
|
|
36 |
$body = null,
|
37 |
$version = '1.1'
|
38 |
) {
|
|
|
39 |
if (!($uri instanceof UriInterface)) {
|
40 |
$uri = new Uri($uri);
|
41 |
}
|
@@ -45,7 +46,7 @@ class Request implements RequestInterface
|
|
45 |
$this->setHeaders($headers);
|
46 |
$this->protocol = $version;
|
47 |
|
48 |
-
if (
|
49 |
$this->updateHostFromUri();
|
50 |
}
|
51 |
|
@@ -91,6 +92,7 @@ class Request implements RequestInterface
|
|
91 |
|
92 |
public function withMethod($method)
|
93 |
{
|
|
|
94 |
$new = clone $this;
|
95 |
$new->method = strtoupper($method);
|
96 |
return $new;
|
@@ -110,7 +112,7 @@ class Request implements RequestInterface
|
|
110 |
$new = clone $this;
|
111 |
$new->uri = $uri;
|
112 |
|
113 |
-
if (!$preserveHost) {
|
114 |
$new->updateHostFromUri();
|
115 |
}
|
116 |
|
@@ -139,4 +141,11 @@ class Request implements RequestInterface
|
|
139 |
// See: http://tools.ietf.org/html/rfc7230#section-5.4
|
140 |
$this->headers = [$header => [$host]] + $this->headers;
|
141 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
142 |
}
|
36 |
$body = null,
|
37 |
$version = '1.1'
|
38 |
) {
|
39 |
+
$this->assertMethod($method);
|
40 |
if (!($uri instanceof UriInterface)) {
|
41 |
$uri = new Uri($uri);
|
42 |
}
|
46 |
$this->setHeaders($headers);
|
47 |
$this->protocol = $version;
|
48 |
|
49 |
+
if (!isset($this->headerNames['host'])) {
|
50 |
$this->updateHostFromUri();
|
51 |
}
|
52 |
|
92 |
|
93 |
public function withMethod($method)
|
94 |
{
|
95 |
+
$this->assertMethod($method);
|
96 |
$new = clone $this;
|
97 |
$new->method = strtoupper($method);
|
98 |
return $new;
|
112 |
$new = clone $this;
|
113 |
$new->uri = $uri;
|
114 |
|
115 |
+
if (!$preserveHost || !isset($this->headerNames['host'])) {
|
116 |
$new->updateHostFromUri();
|
117 |
}
|
118 |
|
141 |
// See: http://tools.ietf.org/html/rfc7230#section-5.4
|
142 |
$this->headers = [$header => [$host]] + $this->headers;
|
143 |
}
|
144 |
+
|
145 |
+
private function assertMethod($method)
|
146 |
+
{
|
147 |
+
if (!is_string($method) || $method === '') {
|
148 |
+
throw new \InvalidArgumentException('Method must be a non-empty string.');
|
149 |
+
}
|
150 |
+
}
|
151 |
}
|
vendor/guzzlehttp/psr7/src/Response.php
CHANGED
@@ -93,7 +93,11 @@ class Response implements ResponseInterface
|
|
93 |
$version = '1.1',
|
94 |
$reason = null
|
95 |
) {
|
96 |
-
$this->
|
|
|
|
|
|
|
|
|
97 |
|
98 |
if ($body !== '' && $body !== null) {
|
99 |
$this->stream = stream_for($body);
|
@@ -121,12 +125,30 @@ class Response implements ResponseInterface
|
|
121 |
|
122 |
public function withStatus($code, $reasonPhrase = '')
|
123 |
{
|
|
|
|
|
|
|
|
|
124 |
$new = clone $this;
|
125 |
-
$new->statusCode =
|
126 |
if ($reasonPhrase == '' && isset(self::$phrases[$new->statusCode])) {
|
127 |
$reasonPhrase = self::$phrases[$new->statusCode];
|
128 |
}
|
129 |
$new->reasonPhrase = $reasonPhrase;
|
130 |
return $new;
|
131 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
}
|
93 |
$version = '1.1',
|
94 |
$reason = null
|
95 |
) {
|
96 |
+
$this->assertStatusCodeIsInteger($status);
|
97 |
+
$status = (int) $status;
|
98 |
+
$this->assertStatusCodeRange($status);
|
99 |
+
|
100 |
+
$this->statusCode = $status;
|
101 |
|
102 |
if ($body !== '' && $body !== null) {
|
103 |
$this->stream = stream_for($body);
|
125 |
|
126 |
public function withStatus($code, $reasonPhrase = '')
|
127 |
{
|
128 |
+
$this->assertStatusCodeIsInteger($code);
|
129 |
+
$code = (int) $code;
|
130 |
+
$this->assertStatusCodeRange($code);
|
131 |
+
|
132 |
$new = clone $this;
|
133 |
+
$new->statusCode = $code;
|
134 |
if ($reasonPhrase == '' && isset(self::$phrases[$new->statusCode])) {
|
135 |
$reasonPhrase = self::$phrases[$new->statusCode];
|
136 |
}
|
137 |
$new->reasonPhrase = $reasonPhrase;
|
138 |
return $new;
|
139 |
}
|
140 |
+
|
141 |
+
private function assertStatusCodeIsInteger($statusCode)
|
142 |
+
{
|
143 |
+
if (filter_var($statusCode, FILTER_VALIDATE_INT) === false) {
|
144 |
+
throw new \InvalidArgumentException('Status code must be an integer value.');
|
145 |
+
}
|
146 |
+
}
|
147 |
+
|
148 |
+
private function assertStatusCodeRange($statusCode)
|
149 |
+
{
|
150 |
+
if ($statusCode < 100 || $statusCode >= 600) {
|
151 |
+
throw new \InvalidArgumentException('Status code must be an integer value between 1xx and 5xx.');
|
152 |
+
}
|
153 |
+
}
|
154 |
}
|
vendor/guzzlehttp/psr7/src/Rfc7230.php
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace GuzzleHttp\Psr7;
|
4 |
+
|
5 |
+
final class Rfc7230
|
6 |
+
{
|
7 |
+
/**
|
8 |
+
* Header related regular expressions (copied from amphp/http package)
|
9 |
+
* (Note: once we require PHP 7.x we could just depend on the upstream package)
|
10 |
+
*
|
11 |
+
* Note: header delimiter (\r\n) is modified to \r?\n to accept line feed only delimiters for BC reasons.
|
12 |
+
*
|
13 |
+
* @link https://github.com/amphp/http/blob/v1.0.1/src/Rfc7230.php#L12-L15
|
14 |
+
* @license https://github.com/amphp/http/blob/v1.0.1/LICENSE
|
15 |
+
*/
|
16 |
+
const HEADER_REGEX = "(^([^()<>@,;:\\\"/[\]?={}\x01-\x20\x7F]++):[ \t]*+((?:[ \t]*+[\x21-\x7E\x80-\xFF]++)*+)[ \t]*+\r?\n)m";
|
17 |
+
const HEADER_FOLD_REGEX = "(\r?\n[ \t]++)";
|
18 |
+
}
|
vendor/guzzlehttp/psr7/src/ServerRequest.php
CHANGED
@@ -166,9 +166,9 @@ class ServerRequest extends Request implements ServerRequestInterface
|
|
166 |
public static function fromGlobals()
|
167 |
{
|
168 |
$method = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : 'GET';
|
169 |
-
$headers =
|
170 |
$uri = self::getUriFromGlobals();
|
171 |
-
$body = new LazyOpenStream('php://input', 'r+');
|
172 |
$protocol = isset($_SERVER['SERVER_PROTOCOL']) ? str_replace('HTTP/', '', $_SERVER['SERVER_PROTOCOL']) : '1.1';
|
173 |
|
174 |
$serverRequest = new ServerRequest($method, $uri, $headers, $body, $protocol, $_SERVER);
|
@@ -180,23 +180,41 @@ class ServerRequest extends Request implements ServerRequestInterface
|
|
180 |
->withUploadedFiles(self::normalizeFiles($_FILES));
|
181 |
}
|
182 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
183 |
/**
|
184 |
* Get a Uri populated with values from $_SERVER.
|
185 |
*
|
186 |
* @return UriInterface
|
187 |
*/
|
188 |
-
public static function getUriFromGlobals()
|
|
|
189 |
$uri = new Uri('');
|
190 |
|
191 |
$uri = $uri->withScheme(!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' ? 'https' : 'http');
|
192 |
|
193 |
$hasPort = false;
|
194 |
if (isset($_SERVER['HTTP_HOST'])) {
|
195 |
-
$
|
196 |
-
$
|
197 |
-
|
|
|
|
|
|
|
198 |
$hasPort = true;
|
199 |
-
$uri = $uri->withPort($
|
200 |
}
|
201 |
} elseif (isset($_SERVER['SERVER_NAME'])) {
|
202 |
$uri = $uri->withHost($_SERVER['SERVER_NAME']);
|
@@ -210,7 +228,7 @@ class ServerRequest extends Request implements ServerRequestInterface
|
|
210 |
|
211 |
$hasQuery = false;
|
212 |
if (isset($_SERVER['REQUEST_URI'])) {
|
213 |
-
$requestUriParts = explode('?', $_SERVER['REQUEST_URI']);
|
214 |
$uri = $uri->withPath($requestUriParts[0]);
|
215 |
if (isset($requestUriParts[1])) {
|
216 |
$hasQuery = true;
|
166 |
public static function fromGlobals()
|
167 |
{
|
168 |
$method = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : 'GET';
|
169 |
+
$headers = getallheaders();
|
170 |
$uri = self::getUriFromGlobals();
|
171 |
+
$body = new CachingStream(new LazyOpenStream('php://input', 'r+'));
|
172 |
$protocol = isset($_SERVER['SERVER_PROTOCOL']) ? str_replace('HTTP/', '', $_SERVER['SERVER_PROTOCOL']) : '1.1';
|
173 |
|
174 |
$serverRequest = new ServerRequest($method, $uri, $headers, $body, $protocol, $_SERVER);
|
180 |
->withUploadedFiles(self::normalizeFiles($_FILES));
|
181 |
}
|
182 |
|
183 |
+
private static function extractHostAndPortFromAuthority($authority)
|
184 |
+
{
|
185 |
+
$uri = 'http://'.$authority;
|
186 |
+
$parts = parse_url($uri);
|
187 |
+
if (false === $parts) {
|
188 |
+
return [null, null];
|
189 |
+
}
|
190 |
+
|
191 |
+
$host = isset($parts['host']) ? $parts['host'] : null;
|
192 |
+
$port = isset($parts['port']) ? $parts['port'] : null;
|
193 |
+
|
194 |
+
return [$host, $port];
|
195 |
+
}
|
196 |
+
|
197 |
/**
|
198 |
* Get a Uri populated with values from $_SERVER.
|
199 |
*
|
200 |
* @return UriInterface
|
201 |
*/
|
202 |
+
public static function getUriFromGlobals()
|
203 |
+
{
|
204 |
$uri = new Uri('');
|
205 |
|
206 |
$uri = $uri->withScheme(!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' ? 'https' : 'http');
|
207 |
|
208 |
$hasPort = false;
|
209 |
if (isset($_SERVER['HTTP_HOST'])) {
|
210 |
+
list($host, $port) = self::extractHostAndPortFromAuthority($_SERVER['HTTP_HOST']);
|
211 |
+
if ($host !== null) {
|
212 |
+
$uri = $uri->withHost($host);
|
213 |
+
}
|
214 |
+
|
215 |
+
if ($port !== null) {
|
216 |
$hasPort = true;
|
217 |
+
$uri = $uri->withPort($port);
|
218 |
}
|
219 |
} elseif (isset($_SERVER['SERVER_NAME'])) {
|
220 |
$uri = $uri->withHost($_SERVER['SERVER_NAME']);
|
228 |
|
229 |
$hasQuery = false;
|
230 |
if (isset($_SERVER['REQUEST_URI'])) {
|
231 |
+
$requestUriParts = explode('?', $_SERVER['REQUEST_URI'], 2);
|
232 |
$uri = $uri->withPath($requestUriParts[0]);
|
233 |
if (isset($requestUriParts[1])) {
|
234 |
$hasQuery = true;
|
vendor/guzzlehttp/psr7/src/Stream.php
CHANGED
@@ -10,6 +10,17 @@ use Psr\Http\Message\StreamInterface;
|
|
10 |
*/
|
11 |
class Stream implements StreamInterface
|
12 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
private $stream;
|
14 |
private $size;
|
15 |
private $seekable;
|
@@ -18,22 +29,6 @@ class Stream implements StreamInterface
|
|
18 |
private $uri;
|
19 |
private $customMetadata;
|
20 |
|
21 |
-
/** @var array Hash of readable and writable stream types */
|
22 |
-
private static $readWriteHash = [
|
23 |
-
'read' => [
|
24 |
-
'r' => true, 'w+' => true, 'r+' => true, 'x+' => true, 'c+' => true,
|
25 |
-
'rb' => true, 'w+b' => true, 'r+b' => true, 'x+b' => true,
|
26 |
-
'c+b' => true, 'rt' => true, 'w+t' => true, 'r+t' => true,
|
27 |
-
'x+t' => true, 'c+t' => true, 'a+' => true
|
28 |
-
],
|
29 |
-
'write' => [
|
30 |
-
'w' => true, 'w+' => true, 'rw' => true, 'r+' => true, 'x+' => true,
|
31 |
-
'c+' => true, 'wb' => true, 'w+b' => true, 'r+b' => true,
|
32 |
-
'x+b' => true, 'c+b' => true, 'w+t' => true, 'r+t' => true,
|
33 |
-
'x+t' => true, 'c+t' => true, 'a' => true, 'a+' => true
|
34 |
-
]
|
35 |
-
];
|
36 |
-
|
37 |
/**
|
38 |
* This constructor accepts an associative array of options.
|
39 |
*
|
@@ -65,20 +60,11 @@ class Stream implements StreamInterface
|
|
65 |
$this->stream = $stream;
|
66 |
$meta = stream_get_meta_data($this->stream);
|
67 |
$this->seekable = $meta['seekable'];
|
68 |
-
$this->readable =
|
69 |
-
$this->writable =
|
70 |
$this->uri = $this->getMetadata('uri');
|
71 |
}
|
72 |
|
73 |
-
public function __get($name)
|
74 |
-
{
|
75 |
-
if ($name == 'stream') {
|
76 |
-
throw new \RuntimeException('The stream is detached');
|
77 |
-
}
|
78 |
-
|
79 |
-
throw new \BadMethodCallException('No value for ' . $name);
|
80 |
-
}
|
81 |
-
|
82 |
/**
|
83 |
* Closes the stream when the destructed
|
84 |
*/
|
@@ -99,6 +85,10 @@ class Stream implements StreamInterface
|
|
99 |
|
100 |
public function getContents()
|
101 |
{
|
|
|
|
|
|
|
|
|
102 |
$contents = stream_get_contents($this->stream);
|
103 |
|
104 |
if ($contents === false) {
|
@@ -173,11 +163,19 @@ class Stream implements StreamInterface
|
|
173 |
|
174 |
public function eof()
|
175 |
{
|
176 |
-
|
|
|
|
|
|
|
|
|
177 |
}
|
178 |
|
179 |
public function tell()
|
180 |
{
|
|
|
|
|
|
|
|
|
181 |
$result = ftell($this->stream);
|
182 |
|
183 |
if ($result === false) {
|
@@ -194,9 +192,15 @@ class Stream implements StreamInterface
|
|
194 |
|
195 |
public function seek($offset, $whence = SEEK_SET)
|
196 |
{
|
|
|
|
|
|
|
|
|
|
|
197 |
if (!$this->seekable) {
|
198 |
throw new \RuntimeException('Stream is not seekable');
|
199 |
-
}
|
|
|
200 |
throw new \RuntimeException('Unable to seek to stream position '
|
201 |
. $offset . ' with whence ' . var_export($whence, true));
|
202 |
}
|
@@ -204,6 +208,9 @@ class Stream implements StreamInterface
|
|
204 |
|
205 |
public function read($length)
|
206 |
{
|
|
|
|
|
|
|
207 |
if (!$this->readable) {
|
208 |
throw new \RuntimeException('Cannot read from non-readable stream');
|
209 |
}
|
@@ -225,6 +232,9 @@ class Stream implements StreamInterface
|
|
225 |
|
226 |
public function write($string)
|
227 |
{
|
|
|
|
|
|
|
228 |
if (!$this->writable) {
|
229 |
throw new \RuntimeException('Cannot write to a non-writable stream');
|
230 |
}
|
10 |
*/
|
11 |
class Stream implements StreamInterface
|
12 |
{
|
13 |
+
/**
|
14 |
+
* Resource modes.
|
15 |
+
*
|
16 |
+
* @var string
|
17 |
+
*
|
18 |
+
* @see http://php.net/manual/function.fopen.php
|
19 |
+
* @see http://php.net/manual/en/function.gzopen.php
|
20 |
+
*/
|
21 |
+
const READABLE_MODES = '/r|a\+|ab\+|w\+|wb\+|x\+|xb\+|c\+|cb\+/';
|
22 |
+
const WRITABLE_MODES = '/a|w|r\+|rb\+|rw|x|c/';
|
23 |
+
|
24 |
private $stream;
|
25 |
private $size;
|
26 |
private $seekable;
|
29 |
private $uri;
|
30 |
private $customMetadata;
|
31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
/**
|
33 |
* This constructor accepts an associative array of options.
|
34 |
*
|
60 |
$this->stream = $stream;
|
61 |
$meta = stream_get_meta_data($this->stream);
|
62 |
$this->seekable = $meta['seekable'];
|
63 |
+
$this->readable = (bool)preg_match(self::READABLE_MODES, $meta['mode']);
|
64 |
+
$this->writable = (bool)preg_match(self::WRITABLE_MODES, $meta['mode']);
|
65 |
$this->uri = $this->getMetadata('uri');
|
66 |
}
|
67 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
/**
|
69 |
* Closes the stream when the destructed
|
70 |
*/
|
85 |
|
86 |
public function getContents()
|
87 |
{
|
88 |
+
if (!isset($this->stream)) {
|
89 |
+
throw new \RuntimeException('Stream is detached');
|
90 |
+
}
|
91 |
+
|
92 |
$contents = stream_get_contents($this->stream);
|
93 |
|
94 |
if ($contents === false) {
|
163 |
|
164 |
public function eof()
|
165 |
{
|
166 |
+
if (!isset($this->stream)) {
|
167 |
+
throw new \RuntimeException('Stream is detached');
|
168 |
+
}
|
169 |
+
|
170 |
+
return feof($this->stream);
|
171 |
}
|
172 |
|
173 |
public function tell()
|
174 |
{
|
175 |
+
if (!isset($this->stream)) {
|
176 |
+
throw new \RuntimeException('Stream is detached');
|
177 |
+
}
|
178 |
+
|
179 |
$result = ftell($this->stream);
|
180 |
|
181 |
if ($result === false) {
|
192 |
|
193 |
public function seek($offset, $whence = SEEK_SET)
|
194 |
{
|
195 |
+
$whence = (int) $whence;
|
196 |
+
|
197 |
+
if (!isset($this->stream)) {
|
198 |
+
throw new \RuntimeException('Stream is detached');
|
199 |
+
}
|
200 |
if (!$this->seekable) {
|
201 |
throw new \RuntimeException('Stream is not seekable');
|
202 |
+
}
|
203 |
+
if (fseek($this->stream, $offset, $whence) === -1) {
|
204 |
throw new \RuntimeException('Unable to seek to stream position '
|
205 |
. $offset . ' with whence ' . var_export($whence, true));
|
206 |
}
|
208 |
|
209 |
public function read($length)
|
210 |
{
|
211 |
+
if (!isset($this->stream)) {
|
212 |
+
throw new \RuntimeException('Stream is detached');
|
213 |
+
}
|
214 |
if (!$this->readable) {
|
215 |
throw new \RuntimeException('Cannot read from non-readable stream');
|
216 |
}
|
232 |
|
233 |
public function write($string)
|
234 |
{
|
235 |
+
if (!isset($this->stream)) {
|
236 |
+
throw new \RuntimeException('Stream is detached');
|
237 |
+
}
|
238 |
if (!$this->writable) {
|
239 |
throw new \RuntimeException('Cannot write to a non-writable stream');
|
240 |
}
|
vendor/guzzlehttp/psr7/src/StreamWrapper.php
CHANGED
@@ -38,9 +38,21 @@ class StreamWrapper
|
|
38 |
. 'writable, or both.');
|
39 |
}
|
40 |
|
41 |
-
return fopen('guzzle://stream', $mode, null,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
'guzzle' => ['stream' => $stream]
|
43 |
-
])
|
44 |
}
|
45 |
|
46 |
/**
|
@@ -94,12 +106,21 @@ class StreamWrapper
|
|
94 |
return true;
|
95 |
}
|
96 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
public function stream_stat()
|
98 |
{
|
99 |
static $modeMap = [
|
100 |
'r' => 33060,
|
|
|
101 |
'r+' => 33206,
|
102 |
-
'w' => 33188
|
|
|
103 |
];
|
104 |
|
105 |
return [
|
@@ -118,4 +139,23 @@ class StreamWrapper
|
|
118 |
'blocks' => 0
|
119 |
];
|
120 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
}
|
38 |
. 'writable, or both.');
|
39 |
}
|
40 |
|
41 |
+
return fopen('guzzle://stream', $mode, null, self::createStreamContext($stream));
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Creates a stream context that can be used to open a stream as a php stream resource.
|
46 |
+
*
|
47 |
+
* @param StreamInterface $stream
|
48 |
+
*
|
49 |
+
* @return resource
|
50 |
+
*/
|
51 |
+
public static function createStreamContext(StreamInterface $stream)
|
52 |
+
{
|
53 |
+
return stream_context_create([
|
54 |
'guzzle' => ['stream' => $stream]
|
55 |
+
]);
|
56 |
}
|
57 |
|
58 |
/**
|
106 |
return true;
|
107 |
}
|
108 |
|
109 |
+
public function stream_cast($cast_as)
|
110 |
+
{
|
111 |
+
$stream = clone($this->stream);
|
112 |
+
|
113 |
+
return $stream->detach();
|
114 |
+
}
|
115 |
+
|
116 |
public function stream_stat()
|
117 |
{
|
118 |
static $modeMap = [
|
119 |
'r' => 33060,
|
120 |
+
'rb' => 33060,
|
121 |
'r+' => 33206,
|
122 |
+
'w' => 33188,
|
123 |
+
'wb' => 33188
|
124 |
];
|
125 |
|
126 |
return [
|
139 |
'blocks' => 0
|
140 |
];
|
141 |
}
|
142 |
+
|
143 |
+
public function url_stat($path, $flags)
|
144 |
+
{
|
145 |
+
return [
|
146 |
+
'dev' => 0,
|
147 |
+
'ino' => 0,
|
148 |
+
'mode' => 0,
|
149 |
+
'nlink' => 0,
|
150 |
+
'uid' => 0,
|
151 |
+
'gid' => 0,
|
152 |
+
'rdev' => 0,
|
153 |
+
'size' => 0,
|
154 |
+
'atime' => 0,
|
155 |
+
'mtime' => 0,
|
156 |
+
'ctime' => 0,
|
157 |
+
'blksize' => 0,
|
158 |
+
'blocks' => 0
|
159 |
+
];
|
160 |
+
}
|
161 |
}
|
vendor/guzzlehttp/psr7/src/Uri.php
CHANGED
@@ -301,15 +301,7 @@ class Uri implements UriInterface
|
|
301 |
*/
|
302 |
public static function withoutQueryValue(UriInterface $uri, $key)
|
303 |
{
|
304 |
-
$
|
305 |
-
if ($current === '') {
|
306 |
-
return $uri;
|
307 |
-
}
|
308 |
-
|
309 |
-
$decodedKey = rawurldecode($key);
|
310 |
-
$result = array_filter(explode('&', $current), function ($part) use ($decodedKey) {
|
311 |
-
return rawurldecode(explode('=', $part)[0]) !== $decodedKey;
|
312 |
-
});
|
313 |
|
314 |
return $uri->withQuery(implode('&', $result));
|
315 |
}
|
@@ -331,26 +323,29 @@ class Uri implements UriInterface
|
|
331 |
*/
|
332 |
public static function withQueryValue(UriInterface $uri, $key, $value)
|
333 |
{
|
334 |
-
$
|
335 |
|
336 |
-
|
337 |
-
$result = [];
|
338 |
-
} else {
|
339 |
-
$decodedKey = rawurldecode($key);
|
340 |
-
$result = array_filter(explode('&', $current), function ($part) use ($decodedKey) {
|
341 |
-
return rawurldecode(explode('=', $part)[0]) !== $decodedKey;
|
342 |
-
});
|
343 |
-
}
|
344 |
|
345 |
-
|
346 |
-
|
347 |
-
// chars that need percent-encoding will be encoded by withQuery().
|
348 |
-
$key = strtr($key, self::$replaceQuery);
|
349 |
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
354 |
}
|
355 |
|
356 |
return $uri->withQuery(implode('&', $result));
|
@@ -442,9 +437,9 @@ class Uri implements UriInterface
|
|
442 |
|
443 |
public function withUserInfo($user, $password = null)
|
444 |
{
|
445 |
-
$info = $user;
|
446 |
-
if ($password
|
447 |
-
$info .= ':' . $password;
|
448 |
}
|
449 |
|
450 |
if ($this->userInfo === $info) {
|
@@ -542,7 +537,9 @@ class Uri implements UriInterface
|
|
542 |
$this->scheme = isset($parts['scheme'])
|
543 |
? $this->filterScheme($parts['scheme'])
|
544 |
: '';
|
545 |
-
$this->userInfo = isset($parts['user'])
|
|
|
|
|
546 |
$this->host = isset($parts['host'])
|
547 |
? $this->filterHost($parts['host'])
|
548 |
: '';
|
@@ -559,7 +556,7 @@ class Uri implements UriInterface
|
|
559 |
? $this->filterQueryAndFragment($parts['fragment'])
|
560 |
: '';
|
561 |
if (isset($parts['pass'])) {
|
562 |
-
$this->userInfo .= ':' . $parts['pass'];
|
563 |
}
|
564 |
|
565 |
$this->removeDefaultPort();
|
@@ -581,6 +578,26 @@ class Uri implements UriInterface
|
|
581 |
return strtolower($scheme);
|
582 |
}
|
583 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
584 |
/**
|
585 |
* @param string $host
|
586 |
*
|
@@ -611,15 +628,56 @@ class Uri implements UriInterface
|
|
611 |
}
|
612 |
|
613 |
$port = (int) $port;
|
614 |
-
if (
|
615 |
throw new \InvalidArgumentException(
|
616 |
-
sprintf('Invalid port: %d. Must be between
|
617 |
);
|
618 |
}
|
619 |
|
620 |
return $port;
|
621 |
}
|
622 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
623 |
private function removeDefaultPort()
|
624 |
{
|
625 |
if ($this->port !== null && self::isDefaultPort($this)) {
|
301 |
*/
|
302 |
public static function withoutQueryValue(UriInterface $uri, $key)
|
303 |
{
|
304 |
+
$result = self::getFilteredQueryString($uri, [$key]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
305 |
|
306 |
return $uri->withQuery(implode('&', $result));
|
307 |
}
|
323 |
*/
|
324 |
public static function withQueryValue(UriInterface $uri, $key, $value)
|
325 |
{
|
326 |
+
$result = self::getFilteredQueryString($uri, [$key]);
|
327 |
|
328 |
+
$result[] = self::generateQueryString($key, $value);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
329 |
|
330 |
+
return $uri->withQuery(implode('&', $result));
|
331 |
+
}
|
|
|
|
|
332 |
|
333 |
+
/**
|
334 |
+
* Creates a new URI with multiple specific query string values.
|
335 |
+
*
|
336 |
+
* It has the same behavior as withQueryValue() but for an associative array of key => value.
|
337 |
+
*
|
338 |
+
* @param UriInterface $uri URI to use as a base.
|
339 |
+
* @param array $keyValueArray Associative array of key and values
|
340 |
+
*
|
341 |
+
* @return UriInterface
|
342 |
+
*/
|
343 |
+
public static function withQueryValues(UriInterface $uri, array $keyValueArray)
|
344 |
+
{
|
345 |
+
$result = self::getFilteredQueryString($uri, array_keys($keyValueArray));
|
346 |
+
|
347 |
+
foreach ($keyValueArray as $key => $value) {
|
348 |
+
$result[] = self::generateQueryString($key, $value);
|
349 |
}
|
350 |
|
351 |
return $uri->withQuery(implode('&', $result));
|
437 |
|
438 |
public function withUserInfo($user, $password = null)
|
439 |
{
|
440 |
+
$info = $this->filterUserInfoComponent($user);
|
441 |
+
if ($password !== null) {
|
442 |
+
$info .= ':' . $this->filterUserInfoComponent($password);
|
443 |
}
|
444 |
|
445 |
if ($this->userInfo === $info) {
|
537 |
$this->scheme = isset($parts['scheme'])
|
538 |
? $this->filterScheme($parts['scheme'])
|
539 |
: '';
|
540 |
+
$this->userInfo = isset($parts['user'])
|
541 |
+
? $this->filterUserInfoComponent($parts['user'])
|
542 |
+
: '';
|
543 |
$this->host = isset($parts['host'])
|
544 |
? $this->filterHost($parts['host'])
|
545 |
: '';
|
556 |
? $this->filterQueryAndFragment($parts['fragment'])
|
557 |
: '';
|
558 |
if (isset($parts['pass'])) {
|
559 |
+
$this->userInfo .= ':' . $this->filterUserInfoComponent($parts['pass']);
|
560 |
}
|
561 |
|
562 |
$this->removeDefaultPort();
|
578 |
return strtolower($scheme);
|
579 |
}
|
580 |
|
581 |
+
/**
|
582 |
+
* @param string $component
|
583 |
+
*
|
584 |
+
* @return string
|
585 |
+
*
|
586 |
+
* @throws \InvalidArgumentException If the user info is invalid.
|
587 |
+
*/
|
588 |
+
private function filterUserInfoComponent($component)
|
589 |
+
{
|
590 |
+
if (!is_string($component)) {
|
591 |
+
throw new \InvalidArgumentException('User info must be a string');
|
592 |
+
}
|
593 |
+
|
594 |
+
return preg_replace_callback(
|
595 |
+
'/(?:[^%' . self::$charUnreserved . self::$charSubDelims . ']+|%(?![A-Fa-f0-9]{2}))/',
|
596 |
+
[$this, 'rawurlencodeMatchZero'],
|
597 |
+
$component
|
598 |
+
);
|
599 |
+
}
|
600 |
+
|
601 |
/**
|
602 |
* @param string $host
|
603 |
*
|
628 |
}
|
629 |
|
630 |
$port = (int) $port;
|
631 |
+
if (0 > $port || 0xffff < $port) {
|
632 |
throw new \InvalidArgumentException(
|
633 |
+
sprintf('Invalid port: %d. Must be between 0 and 65535', $port)
|
634 |
);
|
635 |
}
|
636 |
|
637 |
return $port;
|
638 |
}
|
639 |
|
640 |
+
/**
|
641 |
+
* @param UriInterface $uri
|
642 |
+
* @param array $keys
|
643 |
+
*
|
644 |
+
* @return array
|
645 |
+
*/
|
646 |
+
private static function getFilteredQueryString(UriInterface $uri, array $keys)
|
647 |
+
{
|
648 |
+
$current = $uri->getQuery();
|
649 |
+
|
650 |
+
if ($current === '') {
|
651 |
+
return [];
|
652 |
+
}
|
653 |
+
|
654 |
+
$decodedKeys = array_map('rawurldecode', $keys);
|
655 |
+
|
656 |
+
return array_filter(explode('&', $current), function ($part) use ($decodedKeys) {
|
657 |
+
return !in_array(rawurldecode(explode('=', $part)[0]), $decodedKeys, true);
|
658 |
+
});
|
659 |
+
}
|
660 |
+
|
661 |
+
/**
|
662 |
+
* @param string $key
|
663 |
+
* @param string|null $value
|
664 |
+
*
|
665 |
+
* @return string
|
666 |
+
*/
|
667 |
+
private static function generateQueryString($key, $value)
|
668 |
+
{
|
669 |
+
// Query string separators ("=", "&") within the key or value need to be encoded
|
670 |
+
// (while preventing double-encoding) before setting the query string. All other
|
671 |
+
// chars that need percent-encoding will be encoded by withQuery().
|
672 |
+
$queryString = strtr($key, self::$replaceQuery);
|
673 |
+
|
674 |
+
if ($value !== null) {
|
675 |
+
$queryString .= '=' . strtr($value, self::$replaceQuery);
|
676 |
+
}
|
677 |
+
|
678 |
+
return $queryString;
|
679 |
+
}
|
680 |
+
|
681 |
private function removeDefaultPort()
|
682 |
{
|
683 |
if ($this->port !== null && self::isDefaultPort($this)) {
|
vendor/guzzlehttp/psr7/src/functions.php
CHANGED
@@ -69,10 +69,10 @@ function uri_for($uri)
|
|
69 |
* - metadata: Array of custom metadata.
|
70 |
* - size: Size of the stream.
|
71 |
*
|
72 |
-
* @param resource|string|null|int|float|bool|StreamInterface|callable $resource Entity body data
|
73 |
-
* @param array
|
74 |
*
|
75 |
-
* @return
|
76 |
* @throws \InvalidArgumentException if the $resource arg is not valid.
|
77 |
*/
|
78 |
function stream_for($resource = '', array $options = [])
|
@@ -238,7 +238,7 @@ function modify_request(RequestInterface $request, array $changes)
|
|
238 |
}
|
239 |
|
240 |
if ($request instanceof ServerRequestInterface) {
|
241 |
-
return new ServerRequest(
|
242 |
isset($changes['method']) ? $changes['method'] : $request->getMethod(),
|
243 |
$uri,
|
244 |
$headers,
|
@@ -247,7 +247,11 @@ function modify_request(RequestInterface $request, array $changes)
|
|
247 |
? $changes['version']
|
248 |
: $request->getProtocolVersion(),
|
249 |
$request->getServerParams()
|
250 |
-
)
|
|
|
|
|
|
|
|
|
251 |
}
|
252 |
|
253 |
return new Request(
|
@@ -431,7 +435,7 @@ function hash(
|
|
431 |
* @param StreamInterface $stream Stream to read from
|
432 |
* @param int $maxLength Maximum buffer length
|
433 |
*
|
434 |
-
* @return string
|
435 |
*/
|
436 |
function readline(StreamInterface $stream, $maxLength = null)
|
437 |
{
|
@@ -495,7 +499,7 @@ function parse_response($message)
|
|
495 |
// between status-code and reason-phrase is required. But browsers accept
|
496 |
// responses without space and reason as well.
|
497 |
if (!preg_match('/^HTTP\/.* [0-9]{3}( .*|$)/', $data['start-line'])) {
|
498 |
-
throw new \InvalidArgumentException('Invalid response string');
|
499 |
}
|
500 |
$parts = explode(' ', $data['start-line'], 3);
|
501 |
|
@@ -516,8 +520,8 @@ function parse_response($message)
|
|
516 |
* PHP style arrays into an associative array (e.g., foo[a]=1&foo[b]=2 will
|
517 |
* be parsed into ['foo[a]' => '1', 'foo[b]' => '2']).
|
518 |
*
|
519 |
-
* @param string
|
520 |
-
* @param bool
|
521 |
*
|
522 |
* @return array
|
523 |
*/
|
@@ -533,9 +537,9 @@ function parse_query($str, $urlEncoding = true)
|
|
533 |
$decoder = function ($value) {
|
534 |
return rawurldecode(str_replace('+', ' ', $value));
|
535 |
};
|
536 |
-
} elseif ($urlEncoding
|
537 |
$decoder = 'rawurldecode';
|
538 |
-
} elseif ($urlEncoding
|
539 |
$decoder = 'urldecode';
|
540 |
} else {
|
541 |
$decoder = function ($str) { return $str; };
|
@@ -633,6 +637,7 @@ function mimetype_from_filename($filename)
|
|
633 |
function mimetype_from_extension($extension)
|
634 |
{
|
635 |
static $mimetypes = [
|
|
|
636 |
'7z' => 'application/x-7z-compressed',
|
637 |
'aac' => 'audio/x-aac',
|
638 |
'ai' => 'application/postscript',
|
@@ -680,6 +685,7 @@ function mimetype_from_extension($extension)
|
|
680 |
'mid' => 'audio/midi',
|
681 |
'midi' => 'audio/midi',
|
682 |
'mov' => 'video/quicktime',
|
|
|
683 |
'mp3' => 'audio/mpeg',
|
684 |
'mp4' => 'video/mp4',
|
685 |
'mp4a' => 'audio/mp4',
|
@@ -718,6 +724,7 @@ function mimetype_from_extension($extension)
|
|
718 |
'txt' => 'text/plain',
|
719 |
'wav' => 'audio/x-wav',
|
720 |
'webm' => 'video/webm',
|
|
|
721 |
'wma' => 'audio/x-ms-wma',
|
722 |
'wmv' => 'video/x-ms-wmv',
|
723 |
'woff' => 'application/x-font-woff',
|
@@ -758,29 +765,53 @@ function _parse_message($message)
|
|
758 |
throw new \InvalidArgumentException('Invalid message');
|
759 |
}
|
760 |
|
761 |
-
|
762 |
-
$lines = preg_split('/(\\r?\\n)/', $message, -1, PREG_SPLIT_DELIM_CAPTURE);
|
763 |
-
$result = ['start-line' => array_shift($lines), 'headers' => [], 'body' => ''];
|
764 |
-
array_shift($lines);
|
765 |
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
780 |
}
|
|
|
|
|
781 |
}
|
782 |
|
783 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
784 |
}
|
785 |
|
786 |
/**
|
@@ -809,6 +840,46 @@ function _parse_request_uri($path, array $headers)
|
|
809 |
return $scheme . '://' . $host . '/' . ltrim($path, '/');
|
810 |
}
|
811 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
812 |
/** @internal */
|
813 |
function _caseless_remove($keys, array $data)
|
814 |
{
|
69 |
* - metadata: Array of custom metadata.
|
70 |
* - size: Size of the stream.
|
71 |
*
|
72 |
+
* @param resource|string|null|int|float|bool|StreamInterface|callable|\Iterator $resource Entity body data
|
73 |
+
* @param array $options Additional options
|
74 |
*
|
75 |
+
* @return StreamInterface
|
76 |
* @throws \InvalidArgumentException if the $resource arg is not valid.
|
77 |
*/
|
78 |
function stream_for($resource = '', array $options = [])
|
238 |
}
|
239 |
|
240 |
if ($request instanceof ServerRequestInterface) {
|
241 |
+
return (new ServerRequest(
|
242 |
isset($changes['method']) ? $changes['method'] : $request->getMethod(),
|
243 |
$uri,
|
244 |
$headers,
|
247 |
? $changes['version']
|
248 |
: $request->getProtocolVersion(),
|
249 |
$request->getServerParams()
|
250 |
+
))
|
251 |
+
->withParsedBody($request->getParsedBody())
|
252 |
+
->withQueryParams($request->getQueryParams())
|
253 |
+
->withCookieParams($request->getCookieParams())
|
254 |
+
->withUploadedFiles($request->getUploadedFiles());
|
255 |
}
|
256 |
|
257 |
return new Request(
|
435 |
* @param StreamInterface $stream Stream to read from
|
436 |
* @param int $maxLength Maximum buffer length
|
437 |
*
|
438 |
+
* @return string
|
439 |
*/
|
440 |
function readline(StreamInterface $stream, $maxLength = null)
|
441 |
{
|
499 |
// between status-code and reason-phrase is required. But browsers accept
|
500 |
// responses without space and reason as well.
|
501 |
if (!preg_match('/^HTTP\/.* [0-9]{3}( .*|$)/', $data['start-line'])) {
|
502 |
+
throw new \InvalidArgumentException('Invalid response string: ' . $data['start-line']);
|
503 |
}
|
504 |
$parts = explode(' ', $data['start-line'], 3);
|
505 |
|
520 |
* PHP style arrays into an associative array (e.g., foo[a]=1&foo[b]=2 will
|
521 |
* be parsed into ['foo[a]' => '1', 'foo[b]' => '2']).
|
522 |
*
|
523 |
+
* @param string $str Query string to parse
|
524 |
+
* @param int|bool $urlEncoding How the query string is encoded
|
525 |
*
|
526 |
* @return array
|
527 |
*/
|
537 |
$decoder = function ($value) {
|
538 |
return rawurldecode(str_replace('+', ' ', $value));
|
539 |
};
|
540 |
+
} elseif ($urlEncoding === PHP_QUERY_RFC3986) {
|
541 |
$decoder = 'rawurldecode';
|
542 |
+
} elseif ($urlEncoding === PHP_QUERY_RFC1738) {
|
543 |
$decoder = 'urldecode';
|
544 |
} else {
|
545 |
$decoder = function ($str) { return $str; };
|
637 |
function mimetype_from_extension($extension)
|
638 |
{
|
639 |
static $mimetypes = [
|
640 |
+
'3gp' => 'video/3gpp',
|
641 |
'7z' => 'application/x-7z-compressed',
|
642 |
'aac' => 'audio/x-aac',
|
643 |
'ai' => 'application/postscript',
|
685 |
'mid' => 'audio/midi',
|
686 |
'midi' => 'audio/midi',
|
687 |
'mov' => 'video/quicktime',
|
688 |
+
'mkv' => 'video/x-matroska',
|
689 |
'mp3' => 'audio/mpeg',
|
690 |
'mp4' => 'video/mp4',
|
691 |
'mp4a' => 'audio/mp4',
|
724 |
'txt' => 'text/plain',
|
725 |
'wav' => 'audio/x-wav',
|
726 |
'webm' => 'video/webm',
|
727 |
+
'webp' => 'image/webp',
|
728 |
'wma' => 'audio/x-ms-wma',
|
729 |
'wmv' => 'video/x-ms-wmv',
|
730 |
'woff' => 'application/x-font-woff',
|
765 |
throw new \InvalidArgumentException('Invalid message');
|
766 |
}
|
767 |
|
768 |
+
$message = ltrim($message, "\r\n");
|
|
|
|
|
|
|
769 |
|
770 |
+
$messageParts = preg_split("/\r?\n\r?\n/", $message, 2);
|
771 |
+
|
772 |
+
if ($messageParts === false || count($messageParts) !== 2) {
|
773 |
+
throw new \InvalidArgumentException('Invalid message: Missing header delimiter');
|
774 |
+
}
|
775 |
+
|
776 |
+
list($rawHeaders, $body) = $messageParts;
|
777 |
+
$rawHeaders .= "\r\n"; // Put back the delimiter we split previously
|
778 |
+
$headerParts = preg_split("/\r?\n/", $rawHeaders, 2);
|
779 |
+
|
780 |
+
if ($headerParts === false || count($headerParts) !== 2) {
|
781 |
+
throw new \InvalidArgumentException('Invalid message: Missing status line');
|
782 |
+
}
|
783 |
+
|
784 |
+
list($startLine, $rawHeaders) = $headerParts;
|
785 |
+
|
786 |
+
if (preg_match("/(?:^HTTP\/|^[A-Z]+ \S+ HTTP\/)(\d+(?:\.\d+)?)/i", $startLine, $matches) && $matches[1] === '1.0') {
|
787 |
+
// Header folding is deprecated for HTTP/1.1, but allowed in HTTP/1.0
|
788 |
+
$rawHeaders = preg_replace(Rfc7230::HEADER_FOLD_REGEX, ' ', $rawHeaders);
|
789 |
+
}
|
790 |
+
|
791 |
+
/** @var array[] $headerLines */
|
792 |
+
$count = preg_match_all(Rfc7230::HEADER_REGEX, $rawHeaders, $headerLines, PREG_SET_ORDER);
|
793 |
+
|
794 |
+
// If these aren't the same, then one line didn't match and there's an invalid header.
|
795 |
+
if ($count !== substr_count($rawHeaders, "\n")) {
|
796 |
+
// Folding is deprecated, see https://tools.ietf.org/html/rfc7230#section-3.2.4
|
797 |
+
if (preg_match(Rfc7230::HEADER_FOLD_REGEX, $rawHeaders)) {
|
798 |
+
throw new \InvalidArgumentException('Invalid header syntax: Obsolete line folding');
|
799 |
}
|
800 |
+
|
801 |
+
throw new \InvalidArgumentException('Invalid header syntax');
|
802 |
}
|
803 |
|
804 |
+
$headers = [];
|
805 |
+
|
806 |
+
foreach ($headerLines as $headerLine) {
|
807 |
+
$headers[$headerLine[1]][] = $headerLine[2];
|
808 |
+
}
|
809 |
+
|
810 |
+
return [
|
811 |
+
'start-line' => $startLine,
|
812 |
+
'headers' => $headers,
|
813 |
+
'body' => $body,
|
814 |
+
];
|
815 |
}
|
816 |
|
817 |
/**
|
840 |
return $scheme . '://' . $host . '/' . ltrim($path, '/');
|
841 |
}
|
842 |
|
843 |
+
/**
|
844 |
+
* Get a short summary of the message body
|
845 |
+
*
|
846 |
+
* Will return `null` if the response is not printable.
|
847 |
+
*
|
848 |
+
* @param MessageInterface $message The message to get the body summary
|
849 |
+
* @param int $truncateAt The maximum allowed size of the summary
|
850 |
+
*
|
851 |
+
* @return null|string
|
852 |
+
*/
|
853 |
+
function get_message_body_summary(MessageInterface $message, $truncateAt = 120)
|
854 |
+
{
|
855 |
+
$body = $message->getBody();
|
856 |
+
|
857 |
+
if (!$body->isSeekable() || !$body->isReadable()) {
|
858 |
+
return null;
|
859 |
+
}
|
860 |
+
|
861 |
+
$size = $body->getSize();
|
862 |
+
|
863 |
+
if ($size === 0) {
|
864 |
+
return null;
|
865 |
+
}
|
866 |
+
|
867 |
+
$summary = $body->read($truncateAt);
|
868 |
+
$body->rewind();
|
869 |
+
|
870 |
+
if ($size > $truncateAt) {
|
871 |
+
$summary .= ' (truncated...)';
|
872 |
+
}
|
873 |
+
|
874 |
+
// Matches any printable character, including unicode characters:
|
875 |
+
// letters, marks, numbers, punctuation, spacing, and separators.
|
876 |
+
if (preg_match('/[^\pL\pM\pN\pP\pS\pZ\n\r\t]/', $summary)) {
|
877 |
+
return null;
|
878 |
+
}
|
879 |
+
|
880 |
+
return $summary;
|
881 |
+
}
|
882 |
+
|
883 |
/** @internal */
|
884 |
function _caseless_remove($keys, array $data)
|
885 |
{
|
vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA.php
CHANGED
@@ -182,6 +182,10 @@ class RSA
|
|
182 |
* PKCS#8 formatted private key
|
183 |
*/
|
184 |
const PRIVATE_FORMAT_PKCS8 = 8;
|
|
|
|
|
|
|
|
|
185 |
/**#@-*/
|
186 |
|
187 |
/**#@+
|
@@ -820,6 +824,58 @@ class RSA
|
|
820 |
$key.= 'Private-MAC: ' . bin2hex($hash->hash($source)) . "\r\n";
|
821 |
|
822 |
return $key;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
823 |
default: // eg. self::PRIVATE_FORMAT_PKCS1
|
824 |
$components = array();
|
825 |
foreach ($raw as $name => $value) {
|
@@ -1333,9 +1389,14 @@ class RSA
|
|
1333 |
xml_set_character_data_handler($xml, '_data_handler');
|
1334 |
// add <xml></xml> to account for "dangling" tags like <BitStrength>...</BitStrength> that are sometimes added
|
1335 |
if (!xml_parse($xml, '<xml>' . $key . '</xml>')) {
|
|
|
|
|
1336 |
return false;
|
1337 |
}
|
1338 |
|
|
|
|
|
|
|
1339 |
return isset($this->components['modulus']) && isset($this->components['publicExponent']) ? $this->components : false;
|
1340 |
// from PuTTY's SSHPUBK.C
|
1341 |
case self::PRIVATE_FORMAT_PUTTY:
|
@@ -1407,6 +1468,75 @@ class RSA
|
|
1407 |
}
|
1408 |
$components['coefficients'] = array(2 => new BigInteger($this->_string_shift($private, $length), -256));
|
1409 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1410 |
return $components;
|
1411 |
}
|
1412 |
}
|
@@ -1506,7 +1636,7 @@ class RSA
|
|
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)
|
@@ -1564,7 +1694,8 @@ class RSA
|
|
1564 |
self::PRIVATE_FORMAT_PKCS1,
|
1565 |
self::PRIVATE_FORMAT_XML,
|
1566 |
self::PRIVATE_FORMAT_PUTTY,
|
1567 |
-
self::PUBLIC_FORMAT_OPENSSH
|
|
|
1568 |
);
|
1569 |
foreach ($types as $type) {
|
1570 |
$components = $this->_parseKey($key, $type);
|
@@ -2212,16 +2343,21 @@ class RSA
|
|
2212 |
*/
|
2213 |
function _equals($x, $y)
|
2214 |
{
|
|
|
|
|
|
|
|
|
2215 |
if (strlen($x) != strlen($y)) {
|
2216 |
return false;
|
2217 |
}
|
2218 |
|
2219 |
-
$result = 0;
|
|
|
2220 |
for ($i = 0; $i < strlen($x); $i++) {
|
2221 |
-
$result
|
2222 |
}
|
2223 |
|
2224 |
-
return $result
|
2225 |
}
|
2226 |
|
2227 |
/**
|
@@ -2428,19 +2564,26 @@ class RSA
|
|
2428 |
$db = $maskedDB ^ $dbMask;
|
2429 |
$lHash2 = substr($db, 0, $this->hLen);
|
2430 |
$m = substr($db, $this->hLen);
|
2431 |
-
|
2432 |
-
|
2433 |
-
|
2434 |
-
|
2435 |
-
$
|
2436 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2437 |
user_error('Decryption error');
|
2438 |
return false;
|
2439 |
}
|
2440 |
|
2441 |
// Output the message M
|
2442 |
|
2443 |
-
return substr($m, 1);
|
2444 |
}
|
2445 |
|
2446 |
/**
|
182 |
* PKCS#8 formatted private key
|
183 |
*/
|
184 |
const PRIVATE_FORMAT_PKCS8 = 8;
|
185 |
+
/**
|
186 |
+
* OpenSSH formatted private key
|
187 |
+
*/
|
188 |
+
const PRIVATE_FORMAT_OPENSSH = 9;
|
189 |
/**#@-*/
|
190 |
|
191 |
/**#@+
|
824 |
$key.= 'Private-MAC: ' . bin2hex($hash->hash($source)) . "\r\n";
|
825 |
|
826 |
return $key;
|
827 |
+
case self::PRIVATE_FORMAT_OPENSSH:
|
828 |
+
if ($num_primes != 2) {
|
829 |
+
return false;
|
830 |
+
}
|
831 |
+
$publicKey = pack('Na*Na*Na*', strlen('ssh-rsa'), 'ssh-rsa', strlen($raw['publicExponent']), $raw['publicExponent'], strlen($raw['modulus']), $raw['modulus']);
|
832 |
+
$privateKey = pack(
|
833 |
+
'Na*Na*Na*Na*Na*Na*Na*',
|
834 |
+
strlen('ssh-rsa'),
|
835 |
+
'ssh-rsa',
|
836 |
+
strlen($raw['modulus']),
|
837 |
+
$raw['modulus'],
|
838 |
+
strlen($raw['publicExponent']),
|
839 |
+
$raw['publicExponent'],
|
840 |
+
strlen($raw['privateExponent']),
|
841 |
+
$raw['privateExponent'],
|
842 |
+
strlen($raw['coefficient']),
|
843 |
+
$raw['coefficient'],
|
844 |
+
strlen($raw['prime1']),
|
845 |
+
$raw['prime1'],
|
846 |
+
strlen($raw['prime2']),
|
847 |
+
$raw['prime2']
|
848 |
+
);
|
849 |
+
$checkint = Random::string(4);
|
850 |
+
$paddedKey = pack(
|
851 |
+
'a*Na*',
|
852 |
+
$checkint . $checkint . $privateKey,
|
853 |
+
strlen($this->comment),
|
854 |
+
$this->comment
|
855 |
+
);
|
856 |
+
$paddingLength = (7 * strlen($paddedKey)) % 8;
|
857 |
+
for ($i = 1; $i <= $paddingLength; $i++) {
|
858 |
+
$paddedKey.= chr($i);
|
859 |
+
}
|
860 |
+
$key = pack(
|
861 |
+
'Na*Na*Na*NNa*Na*',
|
862 |
+
strlen('none'),
|
863 |
+
'none',
|
864 |
+
strlen('none'),
|
865 |
+
'none',
|
866 |
+
0,
|
867 |
+
'',
|
868 |
+
1,
|
869 |
+
strlen($publicKey),
|
870 |
+
$publicKey,
|
871 |
+
strlen($paddedKey),
|
872 |
+
$paddedKey
|
873 |
+
);
|
874 |
+
$key = "openssh-key-v1\0$key";
|
875 |
+
|
876 |
+
return "-----BEGIN OPENSSH PRIVATE KEY-----\r\n" .
|
877 |
+
chunk_split(base64_encode($key), 70) .
|
878 |
+
"-----END OPENSSH PRIVATE KEY-----";
|
879 |
default: // eg. self::PRIVATE_FORMAT_PKCS1
|
880 |
$components = array();
|
881 |
foreach ($raw as $name => $value) {
|
1389 |
xml_set_character_data_handler($xml, '_data_handler');
|
1390 |
// add <xml></xml> to account for "dangling" tags like <BitStrength>...</BitStrength> that are sometimes added
|
1391 |
if (!xml_parse($xml, '<xml>' . $key . '</xml>')) {
|
1392 |
+
xml_parser_free($xml);
|
1393 |
+
unset($xml);
|
1394 |
return false;
|
1395 |
}
|
1396 |
|
1397 |
+
xml_parser_free($xml);
|
1398 |
+
unset($xml);
|
1399 |
+
|
1400 |
return isset($this->components['modulus']) && isset($this->components['publicExponent']) ? $this->components : false;
|
1401 |
// from PuTTY's SSHPUBK.C
|
1402 |
case self::PRIVATE_FORMAT_PUTTY:
|
1468 |
}
|
1469 |
$components['coefficients'] = array(2 => new BigInteger($this->_string_shift($private, $length), -256));
|
1470 |
|
1471 |
+
return $components;
|
1472 |
+
case self::PRIVATE_FORMAT_OPENSSH:
|
1473 |
+
$components = array();
|
1474 |
+
$decoded = $this->_extractBER($key);
|
1475 |
+
$magic = $this->_string_shift($decoded, 15);
|
1476 |
+
if ($magic !== "openssh-key-v1\0") {
|
1477 |
+
return false;
|
1478 |
+
}
|
1479 |
+
$options = $this->_string_shift($decoded, 24);
|
1480 |
+
// \0\0\0\4none = ciphername
|
1481 |
+
// \0\0\0\4none = kdfname
|
1482 |
+
// \0\0\0\0 = kdfoptions
|
1483 |
+
// \0\0\0\1 = numkeys
|
1484 |
+
if ($options != "\0\0\0\4none\0\0\0\4none\0\0\0\0\0\0\0\1") {
|
1485 |
+
return false;
|
1486 |
+
}
|
1487 |
+
extract(unpack('Nlength', $this->_string_shift($decoded, 4)));
|
1488 |
+
if (strlen($decoded) < $length) {
|
1489 |
+
return false;
|
1490 |
+
}
|
1491 |
+
$publicKey = $this->_string_shift($decoded, $length);
|
1492 |
+
extract(unpack('Nlength', $this->_string_shift($decoded, 4)));
|
1493 |
+
if (strlen($decoded) < $length) {
|
1494 |
+
return false;
|
1495 |
+
}
|
1496 |
+
$paddedKey = $this->_string_shift($decoded, $length);
|
1497 |
+
|
1498 |
+
if ($this->_string_shift($publicKey, 11) !== "\0\0\0\7ssh-rsa") {
|
1499 |
+
return false;
|
1500 |
+
}
|
1501 |
+
|
1502 |
+
$checkint1 = $this->_string_shift($paddedKey, 4);
|
1503 |
+
$checkint2 = $this->_string_shift($paddedKey, 4);
|
1504 |
+
if (strlen($checkint1) != 4 || $checkint1 !== $checkint2) {
|
1505 |
+
return false;
|
1506 |
+
}
|
1507 |
+
|
1508 |
+
if ($this->_string_shift($paddedKey, 11) !== "\0\0\0\7ssh-rsa") {
|
1509 |
+
return false;
|
1510 |
+
}
|
1511 |
+
|
1512 |
+
$values = array(
|
1513 |
+
&$components['modulus'],
|
1514 |
+
&$components['publicExponent'],
|
1515 |
+
&$components['privateExponent'],
|
1516 |
+
&$components['coefficients'][2],
|
1517 |
+
&$components['primes'][1],
|
1518 |
+
&$components['primes'][2]
|
1519 |
+
);
|
1520 |
+
|
1521 |
+
foreach ($values as &$value) {
|
1522 |
+
extract(unpack('Nlength', $this->_string_shift($paddedKey, 4)));
|
1523 |
+
if (strlen($paddedKey) < $length) {
|
1524 |
+
return false;
|
1525 |
+
}
|
1526 |
+
$value = new BigInteger($this->_string_shift($paddedKey, $length), -256);
|
1527 |
+
}
|
1528 |
+
|
1529 |
+
extract(unpack('Nlength', $this->_string_shift($paddedKey, 4)));
|
1530 |
+
if (strlen($paddedKey) < $length) {
|
1531 |
+
return false;
|
1532 |
+
}
|
1533 |
+
$components['comment'] = $this->_string_shift($decoded, $length);
|
1534 |
+
|
1535 |
+
$temp = $components['primes'][1]->subtract($this->one);
|
1536 |
+
$components['exponents'] = array(1 => $components['publicExponent']->modInverse($temp));
|
1537 |
+
$temp = $components['primes'][2]->subtract($this->one);
|
1538 |
+
$components['exponents'][] = $components['publicExponent']->modInverse($temp);
|
1539 |
+
|
1540 |
return $components;
|
1541 |
}
|
1542 |
}
|
1636 |
*
|
1637 |
* @access public
|
1638 |
* @param string|RSA|array $key
|
1639 |
+
* @param bool|int $type optional
|
1640 |
* @return bool
|
1641 |
*/
|
1642 |
function loadKey($key, $type = false)
|
1694 |
self::PRIVATE_FORMAT_PKCS1,
|
1695 |
self::PRIVATE_FORMAT_XML,
|
1696 |
self::PRIVATE_FORMAT_PUTTY,
|
1697 |
+
self::PUBLIC_FORMAT_OPENSSH,
|
1698 |
+
self::PRIVATE_FORMAT_OPENSSH
|
1699 |
);
|
1700 |
foreach ($types as $type) {
|
1701 |
$components = $this->_parseKey($key, $type);
|
2343 |
*/
|
2344 |
function _equals($x, $y)
|
2345 |
{
|
2346 |
+
if (function_exists('hash_equals')) {
|
2347 |
+
return hash_equals($x, $y);
|
2348 |
+
}
|
2349 |
+
|
2350 |
if (strlen($x) != strlen($y)) {
|
2351 |
return false;
|
2352 |
}
|
2353 |
|
2354 |
+
$result = "\0";
|
2355 |
+
$x^= $y;
|
2356 |
for ($i = 0; $i < strlen($x); $i++) {
|
2357 |
+
$result|= $x[$i];
|
2358 |
}
|
2359 |
|
2360 |
+
return $result === "\0";
|
2361 |
}
|
2362 |
|
2363 |
/**
|
2564 |
$db = $maskedDB ^ $dbMask;
|
2565 |
$lHash2 = substr($db, 0, $this->hLen);
|
2566 |
$m = substr($db, $this->hLen);
|
2567 |
+
$hashesMatch = $this->_equals($lHash, $lHash2);
|
2568 |
+
$leadingZeros = 1;
|
2569 |
+
$patternMatch = 0;
|
2570 |
+
$offset = 0;
|
2571 |
+
for ($i = 0; $i < strlen($m); $i++) {
|
2572 |
+
$patternMatch|= $leadingZeros & ($m[$i] === "\1");
|
2573 |
+
$leadingZeros&= $m[$i] === "\0";
|
2574 |
+
$offset+= $patternMatch ? 0 : 1;
|
2575 |
+
}
|
2576 |
+
|
2577 |
+
// we do & instead of && to avoid https://en.wikipedia.org/wiki/Short-circuit_evaluation
|
2578 |
+
// to protect against timing attacks
|
2579 |
+
if (!$hashesMatch & !$patternMatch) {
|
2580 |
user_error('Decryption error');
|
2581 |
return false;
|
2582 |
}
|
2583 |
|
2584 |
// Output the message M
|
2585 |
|
2586 |
+
return substr($m, $offset + 1);
|
2587 |
}
|
2588 |
|
2589 |
/**
|
vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger.php
CHANGED
@@ -445,6 +445,9 @@ class BigInteger
|
|
445 |
// (?<=^|-)0*: find any 0's that are preceded by the start of the string or by a - (ie. octals)
|
446 |
// [^-0-9].*: find any non-numeric characters and then any characters that follow that
|
447 |
$x = preg_replace('#(?<!^)(?:-).*|(?<=^|-)0*|[^-0-9].*#', '', $x);
|
|
|
|
|
|
|
448 |
|
449 |
switch (MATH_BIGINTEGER_MODE) {
|
450 |
case self::MODE_GMP:
|
@@ -1558,7 +1561,9 @@ class BigInteger
|
|
1558 |
$temp_value = array($quotient_value[$q_index]);
|
1559 |
$temp = $temp->multiply($y);
|
1560 |
$temp_value = &$temp->value;
|
1561 |
-
|
|
|
|
|
1562 |
|
1563 |
$x = $x->subtract($temp);
|
1564 |
|
@@ -2691,7 +2696,14 @@ class BigInteger
|
|
2691 |
{
|
2692 |
switch (MATH_BIGINTEGER_MODE) {
|
2693 |
case self::MODE_GMP:
|
2694 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2695 |
case self::MODE_BCMATH:
|
2696 |
return bccomp($this->value, $y->value, 0);
|
2697 |
}
|
@@ -3572,6 +3584,7 @@ class BigInteger
|
|
3572 |
$value = &$result->value;
|
3573 |
|
3574 |
if (!count($value)) {
|
|
|
3575 |
return $result;
|
3576 |
}
|
3577 |
|
445 |
// (?<=^|-)0*: find any 0's that are preceded by the start of the string or by a - (ie. octals)
|
446 |
// [^-0-9].*: find any non-numeric characters and then any characters that follow that
|
447 |
$x = preg_replace('#(?<!^)(?:-).*|(?<=^|-)0*|[^-0-9].*#', '', $x);
|
448 |
+
if (!strlen($x) || $x == '-') {
|
449 |
+
$x = '0';
|
450 |
+
}
|
451 |
|
452 |
switch (MATH_BIGINTEGER_MODE) {
|
453 |
case self::MODE_GMP:
|
1561 |
$temp_value = array($quotient_value[$q_index]);
|
1562 |
$temp = $temp->multiply($y);
|
1563 |
$temp_value = &$temp->value;
|
1564 |
+
if (count($temp_value)) {
|
1565 |
+
$temp_value = array_merge($adjust, $temp_value);
|
1566 |
+
}
|
1567 |
|
1568 |
$x = $x->subtract($temp);
|
1569 |
|
2696 |
{
|
2697 |
switch (MATH_BIGINTEGER_MODE) {
|
2698 |
case self::MODE_GMP:
|
2699 |
+
$r = gmp_cmp($this->value, $y->value);
|
2700 |
+
if ($r < -1) {
|
2701 |
+
$r = -1;
|
2702 |
+
}
|
2703 |
+
if ($r > 1) {
|
2704 |
+
$r = 1;
|
2705 |
+
}
|
2706 |
+
return $r;
|
2707 |
case self::MODE_BCMATH:
|
2708 |
return bccomp($this->value, $y->value, 0);
|
2709 |
}
|
3584 |
$value = &$result->value;
|
3585 |
|
3586 |
if (!count($value)) {
|
3587 |
+
$result->is_negative = false;
|
3588 |
return $result;
|
3589 |
}
|
3590 |
|
vendor/{composer → ralouphie/getallheaders}/LICENSE
RENAMED
@@ -1,12 +1,13 @@
|
|
|
|
1 |
|
2 |
-
Copyright (c)
|
3 |
|
4 |
Permission is hereby granted, free of charge, to any person obtaining a copy
|
5 |
of this software and associated documentation files (the "Software"), to deal
|
6 |
in the Software without restriction, including without limitation the rights
|
7 |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8 |
-
copies of the Software, and to permit persons to whom the Software is
|
9 |
-
to do so, subject to the following conditions:
|
10 |
|
11 |
The above copyright notice and this permission notice shall be included in all
|
12 |
copies or substantial portions of the Software.
|
@@ -16,6 +17,5 @@ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16 |
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
17 |
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
18 |
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
19 |
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
20 |
-
|
21 |
-
|
1 |
+
The MIT License (MIT)
|
2 |
|
3 |
+
Copyright (c) 2014 Ralph Khattar
|
4 |
|
5 |
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6 |
of this software and associated documentation files (the "Software"), to deal
|
7 |
in the Software without restriction, including without limitation the rights
|
8 |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9 |
+
copies of the Software, and to permit persons to whom the Software is
|
10 |
+
furnished to do so, subject to the following conditions:
|
11 |
|
12 |
The above copyright notice and this permission notice shall be included in all
|
13 |
copies or substantial portions of the Software.
|
17 |
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18 |
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19 |
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21 |
+
SOFTWARE.
|
|
vendor/ralouphie/getallheaders/src/getallheaders.php
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if (!function_exists('getallheaders')) {
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Get all HTTP header key/values as an associative array for the current request.
|
7 |
+
*
|
8 |
+
* @return string[string] The HTTP header key/value pairs.
|
9 |
+
*/
|
10 |
+
function getallheaders()
|
11 |
+
{
|
12 |
+
$headers = array();
|
13 |
+
|
14 |
+
$copy_server = array(
|
15 |
+
'CONTENT_TYPE' => 'Content-Type',
|
16 |
+
'CONTENT_LENGTH' => 'Content-Length',
|
17 |
+
'CONTENT_MD5' => 'Content-Md5',
|
18 |
+
);
|
19 |
+
|
20 |
+
foreach ($_SERVER as $key => $value) {
|
21 |
+
if (substr($key, 0, 5) === 'HTTP_') {
|
22 |
+
$key = substr($key, 5);
|
23 |
+
if (!isset($copy_server[$key]) || !isset($_SERVER[$key])) {
|
24 |
+
$key = str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', $key))));
|
25 |
+
$headers[$key] = $value;
|
26 |
+
}
|
27 |
+
} elseif (isset($copy_server[$key])) {
|
28 |
+
$headers[$copy_server[$key]] = $value;
|
29 |
+
}
|
30 |
+
}
|
31 |
+
|
32 |
+
if (!isset($headers['Authorization'])) {
|
33 |
+
if (isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION'])) {
|
34 |
+
$headers['Authorization'] = $_SERVER['REDIRECT_HTTP_AUTHORIZATION'];
|
35 |
+
} elseif (isset($_SERVER['PHP_AUTH_USER'])) {
|
36 |
+
$basic_pass = isset($_SERVER['PHP_AUTH_PW']) ? $_SERVER['PHP_AUTH_PW'] : '';
|
37 |
+
$headers['Authorization'] = 'Basic ' . base64_encode($_SERVER['PHP_AUTH_USER'] . ':' . $basic_pass);
|
38 |
+
} elseif (isset($_SERVER['PHP_AUTH_DIGEST'])) {
|
39 |
+
$headers['Authorization'] = $_SERVER['PHP_AUTH_DIGEST'];
|
40 |
+
}
|
41 |
+
}
|
42 |
+
|
43 |
+
return $headers;
|
44 |
+
}
|
45 |
+
|
46 |
+
}
|
wp-mail-smtp-0.11.2.php
ADDED
@@ -0,0 +1,802 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* This is an obsolete version of the plugin, as of 0.11.2 released on 2017-11-28.
|
4 |
+
* This code is loaded only when the site runs on PHP 5.2.
|
5 |
+
*/
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Array of options and their default values.
|
9 |
+
* This is horrible, should be cleaned up at some point.
|
10 |
+
*/
|
11 |
+
global $wpms_options;
|
12 |
+
$wpms_options = array(
|
13 |
+
'mail_from' => '',
|
14 |
+
'mail_from_name' => '',
|
15 |
+
'mailer' => 'smtp',
|
16 |
+
'mail_set_return_path' => 'false',
|
17 |
+
'smtp_host' => 'localhost',
|
18 |
+
'smtp_port' => '25',
|
19 |
+
'smtp_ssl' => 'none',
|
20 |
+
'smtp_auth' => false,
|
21 |
+
'smtp_user' => '',
|
22 |
+
'smtp_pass' => '',
|
23 |
+
'pepipost_user' => '',
|
24 |
+
'pepipost_pass' => '',
|
25 |
+
'pepipost_port' => '2525',
|
26 |
+
'pepipost_ssl' => 'none',
|
27 |
+
'wp_mail_smtp_am_notifications_hidden' => '',
|
28 |
+
);
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Activation function. This function creates the required options and defaults.
|
32 |
+
*/
|
33 |
+
if ( ! function_exists( 'wp_mail_smtp_activate' ) ) :
|
34 |
+
/**
|
35 |
+
* What to do on plugin activation.
|
36 |
+
*/
|
37 |
+
function wp_mail_smtp_activate() {
|
38 |
+
|
39 |
+
global $wpms_options;
|
40 |
+
|
41 |
+
// Create the required options...
|
42 |
+
foreach ( $wpms_options as $name => $val ) {
|
43 |
+
add_option( $name, $val );
|
44 |
+
}
|
45 |
+
}
|
46 |
+
endif;
|
47 |
+
|
48 |
+
if ( ! function_exists( 'wp_mail_smtp_whitelist_options' ) ) :
|
49 |
+
/**
|
50 |
+
* Whitelist plugin options.
|
51 |
+
*
|
52 |
+
* @param array $whitelist_options
|
53 |
+
*
|
54 |
+
* @return mixed
|
55 |
+
*/
|
56 |
+
function wp_mail_smtp_whitelist_options( $whitelist_options ) {
|
57 |
+
|
58 |
+
global $wpms_options;
|
59 |
+
|
60 |
+
// Add our options to the array.
|
61 |
+
$whitelist_options['email'] = array_keys( $wpms_options );
|
62 |
+
|
63 |
+
return $whitelist_options;
|
64 |
+
}
|
65 |
+
endif;
|
66 |
+
|
67 |
+
/**
|
68 |
+
* To avoid any (very unlikely) clashes, check if the function already exists.
|
69 |
+
*/
|
70 |
+
if ( ! function_exists( 'phpmailer_init_smtp' ) ) :
|
71 |
+
/**
|
72 |
+
* This code is copied, from wp-includes/pluggable.php as at version 2.2.2.
|
73 |
+
*
|
74 |
+
* @param PHPMailer $phpmailer It's passed by reference, so no need to return anything.
|
75 |
+
*/
|
76 |
+
function phpmailer_init_smtp( $phpmailer ) {
|
77 |
+
/*
|
78 |
+
* If constants are defined, apply them.
|
79 |
+
* We should have defined all required constants before using them.
|
80 |
+
*/
|
81 |
+
if (
|
82 |
+
defined( 'WPMS_ON' ) && WPMS_ON &&
|
83 |
+
defined( 'WPMS_MAILER' )
|
84 |
+
) {
|
85 |
+
$phpmailer->Mailer = WPMS_MAILER;
|
86 |
+
|
87 |
+
if ( defined( 'WPMS_SET_RETURN_PATH' ) && WPMS_SET_RETURN_PATH ) {
|
88 |
+
$phpmailer->Sender = $phpmailer->From;
|
89 |
+
}
|
90 |
+
|
91 |
+
if (
|
92 |
+
WPMS_MAILER === 'smtp' &&
|
93 |
+
defined( 'WPMS_SSL' ) &&
|
94 |
+
defined( 'WPMS_SMTP_HOST' ) &&
|
95 |
+
defined( 'WPMS_SMTP_PORT' )
|
96 |
+
) {
|
97 |
+
$phpmailer->SMTPSecure = WPMS_SSL;
|
98 |
+
$phpmailer->Host = WPMS_SMTP_HOST;
|
99 |
+
$phpmailer->Port = WPMS_SMTP_PORT;
|
100 |
+
|
101 |
+
if (
|
102 |
+
defined( 'WPMS_SMTP_AUTH' ) && WPMS_SMTP_AUTH &&
|
103 |
+
defined( 'WPMS_SMTP_USER' ) &&
|
104 |
+
defined( 'WPMS_SMTP_PASS' )
|
105 |
+
) {
|
106 |
+
$phpmailer->SMTPAuth = true;
|
107 |
+
$phpmailer->Username = WPMS_SMTP_USER;
|
108 |
+
$phpmailer->Password = WPMS_SMTP_PASS;
|
109 |
+
}
|
110 |
+
}
|
111 |
+
} else {
|
112 |
+
$option_mailer = get_option( 'mailer' );
|
113 |
+
$option_smtp_host = get_option( 'smtp_host' );
|
114 |
+
$option_smtp_ssl = get_option( 'smtp_ssl' );
|
115 |
+
|
116 |
+
// Check that mailer is not blank, and if mailer=smtp, host is not blank.
|
117 |
+
if (
|
118 |
+
! $option_mailer ||
|
119 |
+
( 'smtp' === $option_mailer && ! $option_smtp_host )
|
120 |
+
) {
|
121 |
+
return;
|
122 |
+
}
|
123 |
+
|
124 |
+
// If the mailer is pepipost, make sure we have a username and password.
|
125 |
+
if ( 'pepipost' === $option_mailer && ( ! get_option( 'pepipost_user' ) && ! get_option( 'pepipost_pass' ) ) ) {
|
126 |
+
return;
|
127 |
+
}
|
128 |
+
|
129 |
+
// Set the mailer type as per config above, this overrides the already called isMail method.
|
130 |
+
$phpmailer->Mailer = $option_mailer;
|
131 |
+
|
132 |
+
// Set the Sender (return-path) if required.
|
133 |
+
if ( get_option( 'mail_set_return_path' ) ) {
|
134 |
+
$phpmailer->Sender = $phpmailer->From;
|
135 |
+
}
|
136 |
+
|
137 |
+
// Set the SMTPSecure value, if set to none, leave this blank.
|
138 |
+
$phpmailer->SMTPSecure = $option_smtp_ssl;
|
139 |
+
if ( 'none' === $option_smtp_ssl ) {
|
140 |
+
$phpmailer->SMTPSecure = '';
|
141 |
+
$phpmailer->SMTPAutoTLS = false;
|
142 |
+
}
|
143 |
+
|
144 |
+
// If we're sending via SMTP, set the host.
|
145 |
+
if ( 'smtp' === $option_mailer ) {
|
146 |
+
// Set the other options.
|
147 |
+
$phpmailer->Host = $option_smtp_host;
|
148 |
+
$phpmailer->Port = get_option( 'smtp_port' );
|
149 |
+
|
150 |
+
// If we're using smtp auth, set the username & password.
|
151 |
+
if ( get_option( 'smtp_auth' ) === 'true' ) {
|
152 |
+
$phpmailer->SMTPAuth = true;
|
153 |
+
$phpmailer->Username = get_option( 'smtp_user' );
|
154 |
+
$phpmailer->Password = get_option( 'smtp_pass' );
|
155 |
+
}
|
156 |
+
} elseif ( 'pepipost' === $option_mailer ) {
|
157 |
+
// Set the Pepipost settings.
|
158 |
+
$phpmailer->Mailer = 'smtp';
|
159 |
+
$phpmailer->Host = 'smtp.pepipost.com';
|
160 |
+
$phpmailer->Port = get_option( 'pepipost_port' );
|
161 |
+
$phpmailer->SMTPSecure = get_option( 'pepipost_ssl' ) === 'none' ? '' : get_option( 'pepipost_ssl' );
|
162 |
+
$phpmailer->SMTPAuth = true;
|
163 |
+
$phpmailer->Username = get_option( 'pepipost_user' );
|
164 |
+
$phpmailer->Password = get_option( 'pepipost_pass' );
|
165 |
+
}
|
166 |
+
}
|
167 |
+
|
168 |
+
// You can add your own options here, see the phpmailer documentation for more info: http://phpmailer.sourceforge.net/docs/.
|
169 |
+
/** @noinspection PhpUnusedLocalVariableInspection It's passed by reference. */
|
170 |
+
$phpmailer = apply_filters( 'wp_mail_smtp_custom_options', $phpmailer );
|
171 |
+
}
|
172 |
+
endif;
|
173 |
+
|
174 |
+
if ( ! function_exists( 'wp_mail_smtp_options_page' ) ) :
|
175 |
+
/**
|
176 |
+
* This function outputs the plugin options page.
|
177 |
+
*/
|
178 |
+
function wp_mail_smtp_options_page() {
|
179 |
+
|
180 |
+
global $phpmailer;
|
181 |
+
|
182 |
+
// Make sure the PHPMailer class has been instantiated
|
183 |
+
// (copied verbatim from wp-includes/pluggable.php)
|
184 |
+
// (Re)create it, if it's gone missing.
|
185 |
+
if ( ! is_object( $phpmailer ) || ! is_a( $phpmailer, 'PHPMailer' ) ) {
|
186 |
+
require_once ABSPATH . WPINC . '/class-phpmailer.php';
|
187 |
+
$phpmailer = new PHPMailer( true );
|
188 |
+
}
|
189 |
+
|
190 |
+
// Send a test mail if necessary.
|
191 |
+
if (
|
192 |
+
isset( $_POST['wpms_action'] ) &&
|
193 |
+
esc_html__( 'Send Test', 'wp-mail-smtp' ) === sanitize_text_field( $_POST['wpms_action'] ) &&
|
194 |
+
is_email( $_POST['to'] )
|
195 |
+
) {
|
196 |
+
|
197 |
+
check_admin_referer( 'test-email' );
|
198 |
+
|
199 |
+
// Set up the mail variables.
|
200 |
+
$to = sanitize_text_field( $_POST['to'] );
|
201 |
+
/* translators: %s - email address where test mail will be sent to. */
|
202 |
+
$subject = 'WP Mail SMTP: ' . sprintf( esc_html__( 'Test mail to %s', 'wp-mail-smtp' ), $to );
|
203 |
+
$message = esc_html__( 'This is a test email generated by the WP Mail SMTP WordPress plugin.', 'wp-mail-smtp' );
|
204 |
+
|
205 |
+
// Set SMTPDebug level, default is 2 (commands + data + connection status).
|
206 |
+
$phpmailer->SMTPDebug = apply_filters( 'wp_mail_smtp_admin_test_email_smtp_debug', 2 );
|
207 |
+
|
208 |
+
// Start output buffering to grab smtp debugging output.
|
209 |
+
ob_start();
|
210 |
+
|
211 |
+
// Send the test mail.
|
212 |
+
$result = wp_mail( $to, $subject, $message );
|
213 |
+
|
214 |
+
// Grab the smtp debugging output.
|
215 |
+
$smtp_debug = ob_get_clean();
|
216 |
+
|
217 |
+
// Output the response.
|
218 |
+
?>
|
219 |
+
<div id="message" class="updated notice is-dismissible"><p><strong><?php esc_html_e( 'Test Message Sent', 'wp-mail-smtp' ); ?></strong></p>
|
220 |
+
<p><?php esc_html_e( 'The result was:', 'wp-mail-smtp' ); ?></p>
|
221 |
+
<pre><?php var_dump( $result ); ?></pre>
|
222 |
+
|
223 |
+
<p><?php esc_html_e( 'The full debugging output is shown below:', 'wp-mail-smtp' ); ?></p>
|
224 |
+
<pre><?php print_r( $phpmailer ); ?></pre>
|
225 |
+
|
226 |
+
<p><?php esc_html_e( 'The SMTP debugging output is shown below:', 'wp-mail-smtp' ); ?></p>
|
227 |
+
<pre><?php echo $smtp_debug; ?></pre>
|
228 |
+
</div>
|
229 |
+
<?php
|
230 |
+
|
231 |
+
// Destroy $phpmailer so it doesn't cause issues later.
|
232 |
+
unset( $phpmailer );
|
233 |
+
}
|
234 |
+
|
235 |
+
?>
|
236 |
+
<div class="wrap">
|
237 |
+
<h2>
|
238 |
+
<?php esc_html_e( 'WP Mail SMTP Settings', 'wp-mail-smtp' ); ?>
|
239 |
+
</h2>
|
240 |
+
|
241 |
+
<form method="post" action="<?php echo esc_url( admin_url( 'options.php' ) ); ?>">
|
242 |
+
<?php wp_nonce_field( 'email-options' ); ?>
|
243 |
+
|
244 |
+
<table class="form-table">
|
245 |
+
<tr valign="top">
|
246 |
+
<th scope="row">
|
247 |
+
<label for="mail_from"><?php esc_html_e( 'From Email', 'wp-mail-smtp' ); ?></label>
|
248 |
+
</th>
|
249 |
+
<td>
|
250 |
+
<input name="mail_from" type="email" id="mail_from" value="<?php echo esc_attr( get_option( 'mail_from' ) ); ?>" size="40" class="regular-text"/>
|
251 |
+
|
252 |
+
<p class="description">
|
253 |
+
<?php
|
254 |
+
esc_html_e( 'You can specify the email address that emails should be sent from. If you leave this blank, the default email will be used.', 'wp-mail-smtp' );
|
255 |
+
if ( get_option( 'db_version' ) < 6124 ) {
|
256 |
+
print( '<br /><span style="color: red;">' );
|
257 |
+
_e( '<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<email@domain.com> in this field.', 'wp-mail-smtp' );
|
258 |
+
print( '</span>' );
|
259 |
+
}
|
260 |
+
?>
|
261 |
+
</p>
|
262 |
+
</td>
|
263 |
+
</tr>
|
264 |
+
<tr valign="top">
|
265 |
+
<th scope="row">
|
266 |
+
<label for="mail_from_name"><?php esc_html_e( 'From Name', 'wp-mail-smtp' ); ?></label>
|
267 |
+
</th>
|
268 |
+
<td>
|
269 |
+
<input name="mail_from_name" type="text" id="mail_from_name" value="<?php echo esc_attr( get_option( 'mail_from_name' ) ); ?>" size="40" class="regular-text"/>
|
270 |
+
|
271 |
+
<p class="description">
|
272 |
+
<?php esc_html_e( 'You can specify the name that emails should be sent from. If you leave this blank, the emails will be sent from WordPress.', 'wp-mail-smtp' ); ?>
|
273 |
+
</p>
|
274 |
+
</td>
|
275 |
+
</tr>
|
276 |
+
</table>
|
277 |
+
|
278 |
+
<table class="form-table">
|
279 |
+
<tr valign="top">
|
280 |
+
<th scope="row">
|
281 |
+
<?php esc_html_e( 'Mailer', 'wp-mail-smtp' ); ?>
|
282 |
+
</th>
|
283 |
+
<td>
|
284 |
+
<fieldset>
|
285 |
+
<legend class="screen-reader-text">
|
286 |
+
<span><?php esc_html_e( 'Mailer', 'wp-mail-smtp' ); ?></span>
|
287 |
+
</legend>
|
288 |
+
|
289 |
+
<p>
|
290 |
+
<input id="mailer_smtp" class="wpms_mailer" type="radio" name="mailer" value="smtp" <?php checked( 'smtp', get_option( 'mailer' ) ); ?> />
|
291 |
+
<label for="mailer_smtp"><?php esc_html_e( 'Send all WordPress emails via SMTP.', 'wp-mail-smtp' ); ?></label>
|
292 |
+
</p>
|
293 |
+
<p>
|
294 |
+
<input id="mailer_mail" class="wpms_mailer" type="radio" name="mailer" value="mail" <?php checked( 'mail', get_option( 'mailer' ) ); ?> />
|
295 |
+
<label for="mailer_mail"><?php esc_html_e( 'Use the PHP mail() function to send emails.', 'wp-mail-smtp' ); ?></label>
|
296 |
+
</p>
|
297 |
+
|
298 |
+
<?php if ( wp_mail_smtp_is_pepipost_active() ) : ?>
|
299 |
+
<p>
|
300 |
+
<input id="mailer_pepipost" class="wpms_mailer" type="radio" name="mailer" value="pepipost" <?php checked( 'pepipost', get_option( 'mailer' ) ); ?> />
|
301 |
+
<label for="mailer_pepipost"><?php esc_html_e( 'Use Pepipost SMTP to send emails.', 'wp-mail-smtp' ); ?></label>
|
302 |
+
</p>
|
303 |
+
<p class="description">
|
304 |
+
<?php
|
305 |
+
printf(
|
306 |
+
/* translators: %1$s - link start; %2$s - link end. */
|
307 |
+
esc_html__( 'Looking for high inbox delivery? Try Pepipost with easy setup and free emails. Learn more %1$shere%2$s.', 'wp-mail-smtp' ),
|
308 |
+
'<a href="https://app1.pepipost.com/index.php/login/wp_mail_smtp?page=signup&utm_source=WordPress&utm_campaign=Plugins&utm_medium=wp_mail_smtp&utm_term=organic&code=WP-MAIL-SMTP" target="_blank">',
|
309 |
+
'</a>'
|
310 |
+
);
|
311 |
+
?>
|
312 |
+
</p>
|
313 |
+
<?php endif; ?>
|
314 |
+
</fieldset>
|
315 |
+
</td>
|
316 |
+
</tr>
|
317 |
+
</table>
|
318 |
+
|
319 |
+
<table class="form-table">
|
320 |
+
<tr valign="top">
|
321 |
+
<th scope="row">
|
322 |
+
<?php esc_html_e( 'Return Path', 'wp-mail-smtp' ); ?>
|
323 |
+
</th>
|
324 |
+
<td>
|
325 |
+
<fieldset>
|
326 |
+
<legend class="screen-reader-text">
|
327 |
+
<span><?php esc_html_e( 'Return Path', 'wp-mail-smtp' ); ?></span>
|
328 |
+
</legend>
|
329 |
+
|
330 |
+
<label for="mail_set_return_path">
|
331 |
+
<input name="mail_set_return_path" type="checkbox" id="mail_set_return_path" value="true" <?php checked( 'true', get_option( 'mail_set_return_path' ) ); ?> />
|
332 |
+
<?php esc_html_e( 'Set the return-path to match the From Email', 'wp-mail-smtp' ); ?>
|
333 |
+
</label>
|
334 |
+
|
335 |
+
<p class="description">
|
336 |
+
<?php esc_html_e( 'Return Path indicates where non-delivery receipts - or bounce messages - are to be sent.', 'wp-mail-smtp' ); ?>
|
337 |
+
</p>
|
338 |
+
</fieldset>
|
339 |
+
</td>
|
340 |
+
</tr>
|
341 |
+
</table>
|
342 |
+
|
343 |
+
<table class="form-table">
|
344 |
+
<tr valign="top">
|
345 |
+
<th scope="row">
|
346 |
+
<?php _e( 'Hide Announcements', 'wp-mail-smtp' ); ?>
|
347 |
+
</th>
|
348 |
+
<td>
|
349 |
+
<fieldset>
|
350 |
+
<legend class="screen-reader-text">
|
351 |
+
<span><?php _e( 'Hide Announcements', 'wp-mail-smtp' ); ?></span>
|
352 |
+
</legend>
|
353 |
+
|
354 |
+
<label for="wp_mail_smtp_am_notifications_hidden">
|
355 |
+
<input name="wp_mail_smtp_am_notifications_hidden" type="checkbox" id="wp_mail_smtp_am_notifications_hidden" value="true" <?php checked( 'true', get_option( 'wp_mail_smtp_am_notifications_hidden' ) ); ?> />
|
356 |
+
<?php _e( 'Check this if you would like to hide plugin announcements and update details.', 'wp-mail-smtp' ); ?>
|
357 |
+
</label>
|
358 |
+
</fieldset>
|
359 |
+
</td>
|
360 |
+
</tr>
|
361 |
+
</table>
|
362 |
+
|
363 |
+
<p class="submit">
|
364 |
+
<input type="submit" name="submit" id="submit" class="button-primary" value="<?php esc_attr_e( 'Save Changes', 'wp-mail-smtp' ); ?>"/>
|
365 |
+
</p>
|
366 |
+
|
367 |
+
<div id="wpms_section_smtp" class="wpms_section">
|
368 |
+
<h3>
|
369 |
+
<?php esc_html_e( 'SMTP Options', 'wp-mail-smtp' ); ?>
|
370 |
+
</h3>
|
371 |
+
<p><?php esc_html_e( 'These options only apply if you have chosen to send mail by SMTP above.', 'wp-mail-smtp' ); ?></p>
|
372 |
+
|
373 |
+
<table class="form-table">
|
374 |
+
<tr valign="top">
|
375 |
+
<th scope="row">
|
376 |
+
<label for="smtp_host"><?php esc_html_e( 'SMTP Host', 'wp-mail-smtp' ); ?></label>
|
377 |
+
</th>
|
378 |
+
<td>
|
379 |
+
<input name="smtp_host" type="text" id="smtp_host" value="<?php echo intval( get_option( 'smtp_host' ) ); ?>" size="40" class="regular-text"/>
|
380 |
+
</td>
|
381 |
+
</tr>
|
382 |
+
<tr valign="top">
|
383 |
+
<th scope="row">
|
384 |
+
<label for="smtp_port"><?php esc_html_e( 'SMTP Port', 'wp-mail-smtp' ); ?></label>
|
385 |
+
</th>
|
386 |
+
<td>
|
387 |
+
<input name="smtp_port" type="text" id="smtp_port" value="<?php echo esc_attr( get_option( 'smtp_port' ) ); ?>" size="6" class="regular-text"/>
|
388 |
+
</td>
|
389 |
+
</tr>
|
390 |
+
<tr valign="top">
|
391 |
+
<th scope="row"><?php esc_html_e( 'Encryption', 'wp-mail-smtp' ); ?> </th>
|
392 |
+
<td>
|
393 |
+
<fieldset>
|
394 |
+
<legend class="screen-reader-text">
|
395 |
+
<span><?php esc_html_e( 'Encryption', 'wp-mail-smtp' ); ?></span>
|
396 |
+
</legend>
|
397 |
+
|
398 |
+
<input id="smtp_ssl_none" type="radio" name="smtp_ssl" value="none" <?php checked( 'none', get_option( 'smtp_ssl' ) ); ?> />
|
399 |
+
<label for="smtp_ssl_none">
|
400 |
+
<span><?php esc_html_e( 'No encryption.', 'wp-mail-smtp' ); ?></span>
|
401 |
+
</label><br/>
|
402 |
+
|
403 |
+
<input id="smtp_ssl_ssl" type="radio" name="smtp_ssl" value="ssl" <?php checked( 'ssl', get_option( 'smtp_ssl' ) ); ?> />
|
404 |
+
<label for="smtp_ssl_ssl">
|
405 |
+
<span><?php esc_html_e( 'Use SSL encryption.', 'wp-mail-smtp' ); ?></span>
|
406 |
+
</label><br/>
|
407 |
+
|
408 |
+
<input id="smtp_ssl_tls" type="radio" name="smtp_ssl" value="tls" <?php checked( 'tls', get_option( 'smtp_ssl' ) ); ?> />
|
409 |
+
<label for="smtp_ssl_tls">
|
410 |
+
<span><?php esc_html_e( 'Use TLS encryption.', 'wp-mail-smtp' ); ?></span>
|
411 |
+
</label>
|
412 |
+
|
413 |
+
<p class="description"><?php esc_html_e( 'TLS is not the same as STARTTLS. For most servers SSL is the recommended option.', 'wp-mail-smtp' ); ?></p>
|
414 |
+
</fieldset>
|
415 |
+
</td>
|
416 |
+
</tr>
|
417 |
+
<tr valign="top">
|
418 |
+
<th scope="row"><?php esc_html_e( 'Authentication', 'wp-mail-smtp' ); ?> </th>
|
419 |
+
<td>
|
420 |
+
<fieldset>
|
421 |
+
<legend class="screen-reader-text">
|
422 |
+
<span><?php esc_html_e( 'Authentication', 'wp-mail-smtp' ); ?></span>
|
423 |
+
</legend>
|
424 |
+
|
425 |
+
<input id="smtp_auth_false" type="radio" name="smtp_auth" value="false" <?php checked( 'false', get_option( 'smtp_auth' ) ); ?> />
|
426 |
+
<label for="smtp_auth_false">
|
427 |
+
<span><?php esc_html_e( 'No: Do not use SMTP authentication.', 'wp-mail-smtp' ); ?></span>
|
428 |
+
</label><br/>
|
429 |
+
|
430 |
+
<input id="smtp_auth_true" type="radio" name="smtp_auth" value="true" <?php checked( 'true', get_option( 'smtp_auth' ) ); ?> />
|
431 |
+
<label for="smtp_auth_true">
|
432 |
+
<span><?php esc_html_e( 'Yes: Use SMTP authentication.', 'wp-mail-smtp' ); ?></span>
|
433 |
+
</label><br/>
|
434 |
+
|
435 |
+
<p class="description">
|
436 |
+
<?php esc_html_e( 'If this is set to no, the values below are ignored.', 'wp-mail-smtp' ); ?>
|
437 |
+
</p>
|
438 |
+
</fieldset>
|
439 |
+
</td>
|
440 |
+
</tr>
|
441 |
+
<tr valign="top">
|
442 |
+
<th scope="row">
|
443 |
+
<label for="smtp_user"><?php esc_html_e( 'Username', 'wp-mail-smtp' ); ?></label>
|
444 |
+
</th>
|
445 |
+
<td>
|
446 |
+
<input name="smtp_user" type="text" id="smtp_user" value="<?php echo esc_attr( get_option( 'smtp_user' ) ); ?>" size="40" class="code" autocomplete="off"/>
|
447 |
+
</td>
|
448 |
+
</tr>
|
449 |
+
<tr valign="top">
|
450 |
+
<th scope="row">
|
451 |
+
<label for="smtp_pass"><?php esc_html_e( 'Password', 'wp-mail-smtp' ); ?></label>
|
452 |
+
</th>
|
453 |
+
<td>
|
454 |
+
<input name="smtp_pass" type="password" id="smtp_pass" value="<?php echo esc_attr( get_option( 'smtp_pass' ) ); ?>" size="40" class="code" autocomplete="off"/>
|
455 |
+
|
456 |
+
<p class="description">
|
457 |
+
<?php esc_html_e( 'This is in plain text because it must not be stored encrypted.', 'wp-mail-smtp' ); ?>
|
458 |
+
</p>
|
459 |
+
</td>
|
460 |
+
</tr>
|
461 |
+
</table>
|
462 |
+
|
463 |
+
<p class="submit">
|
464 |
+
<input type="submit" name="submit" id="submit" class="button-primary" value="<?php esc_attr_e( 'Save Changes', 'wp-mail-smtp' ); ?>"/>
|
465 |
+
</p>
|
466 |
+
</div><!-- #wpms_section_smtp -->
|
467 |
+
|
468 |
+
<?php if ( wp_mail_smtp_is_pepipost_active() ) : ?>
|
469 |
+
<div id="wpms_section_pepipost" class="wpms_section">
|
470 |
+
<h3>
|
471 |
+
<?php esc_html_e( 'Pepipost SMTP Options', 'wp-mail-smtp' ); ?>
|
472 |
+
</h3>
|
473 |
+
<p>
|
474 |
+
<?php
|
475 |
+
printf(
|
476 |
+
/* translators: %s - Pepipost registration URL. */
|
477 |
+
esc_html__( 'You need to signup on %s to get the SMTP username/password.', 'wp-mail-smtp' ),
|
478 |
+
'<a href="https://app1.pepipost.com/index.php/login/wp_mail_smtp?page=signup&utm_source=WordPress&utm_campaign=Plugins&utm_medium=wp_mail_smtp&utm_term=organic&code=WP-MAIL-SMTP" target="_blank">Pepipost</a>',
|
479 |
+
''
|
480 |
+
);
|
481 |
+
?>
|
482 |
+
</p>
|
483 |
+
<table class="form-table">
|
484 |
+
<tr valign="top">
|
485 |
+
<th scope="row">
|
486 |
+
<label for="pepipost_user"><?php esc_html_e( 'Username', 'wp-mail-smtp' ); ?></label>
|
487 |
+
</th>
|
488 |
+
<td>
|
489 |
+
<input name="pepipost_user" type="text" id="pepipost_user" value="<?php echo esc_attr( get_option( 'pepipost_user' ) ); ?>" size="40" class="code"/>
|
490 |
+
</td>
|
491 |
+
</tr>
|
492 |
+
<tr valign="top">
|
493 |
+
<th scope="row">
|
494 |
+
<label for="pepipost_pass"><?php esc_html_e( 'Password', 'wp-mail-smtp' ); ?></label>
|
495 |
+
</th>
|
496 |
+
<td>
|
497 |
+
<input name="pepipost_pass" type="text" id="pepipost_pass" value="<?php echo esc_attr( get_option( 'pepipost_pass' ) ); ?>" size="40" class="code"/>
|
498 |
+
</td>
|
499 |
+
</tr>
|
500 |
+
<tr valign="top">
|
501 |
+
<th scope="row">
|
502 |
+
<label for="pepipost_port"><?php esc_html_e( 'SMTP Port', 'wp-mail-smtp' ); ?></label>
|
503 |
+
</th>
|
504 |
+
<td>
|
505 |
+
<input name="pepipost_port" type="text" id="pepipost_port" value="<?php echo intval( get_option( 'pepipost_port' ) ); ?>" size="6" class="regular-text"/>
|
506 |
+
</td>
|
507 |
+
</tr>
|
508 |
+
<tr valign="top">
|
509 |
+
<th scope="row">
|
510 |
+
<?php esc_html_e( 'Encryption', 'wp-mail-smtp' ); ?>
|
511 |
+
</th>
|
512 |
+
<td>
|
513 |
+
<fieldset>
|
514 |
+
<legend class="screen-reader-text">
|
515 |
+
<span>
|
516 |
+
<?php esc_html_e( 'Encryption', 'wp-mail-smtp' ); ?>
|
517 |
+
</span>
|
518 |
+
</legend>
|
519 |
+
|
520 |
+
<input id="pepipost_ssl_none" type="radio" name="pepipost_ssl" value="none" <?php checked( 'none', get_option( 'pepipost_ssl' ) ); ?> />
|
521 |
+
<label for="pepipost_ssl_none">
|
522 |
+
<span><?php esc_html_e( 'No encryption.', 'wp-mail-smtp' ); ?></span>
|
523 |
+
</label><br/>
|
524 |
+
|
525 |
+
<input id="pepipost_ssl_ssl" type="radio" name="pepipost_ssl" value="ssl" <?php checked( 'ssl', get_option( 'pepipost_ssl' ) ); ?> />
|
526 |
+
<label for="pepipost_ssl_ssl">
|
527 |
+
<span><?php esc_html_e( 'Use SSL encryption.', 'wp-mail-smtp' ); ?></span>
|
528 |
+
</label><br/>
|
529 |
+
|
530 |
+
<input id="pepipost_ssl_tls" type="radio" name="pepipost_ssl" value="tls" <?php checked( 'tls', get_option( 'pepipost_ssl' ) ); ?> />
|
531 |
+
<label for="pepipost_ssl_tls">
|
532 |
+
<span><?php esc_html_e( 'Use TLS encryption.', 'wp-mail-smtp' ); ?></span>
|
533 |
+
</label>
|
534 |
+
</fieldset>
|
535 |
+
</td>
|
536 |
+
</tr>
|
537 |
+
</table>
|
538 |
+
|
539 |
+
<p class="submit">
|
540 |
+
<input type="submit" name="submit" id="submit" class="button-primary" value="<?php esc_attr_e( 'Save Changes', 'wp-mail-smtp' ); ?>"/>
|
541 |
+
</p>
|
542 |
+
</div><!-- #wpms_section_pepipost -->
|
543 |
+
<?php endif; ?>
|
544 |
+
|
545 |
+
<input type="hidden" name="action" value="update"/>
|
546 |
+
<input type="hidden" name="option_page" value="email">
|
547 |
+
</form>
|
548 |
+
|
549 |
+
<h3><?php esc_html_e( 'Send a Test Email', 'wp-mail-smtp' ); ?></h3>
|
550 |
+
|
551 |
+
<form method="POST" action="">
|
552 |
+
<?php wp_nonce_field( 'test-email' ); ?>
|
553 |
+
|
554 |
+
<table class="form-table">
|
555 |
+
<tr valign="top">
|
556 |
+
<th scope="row">
|
557 |
+
<label for="to"><?php esc_html_e( 'To', 'wp-mail-smtp' ); ?></label>
|
558 |
+
</th>
|
559 |
+
<td>
|
560 |
+
<input name="to" type="email" id="to" value="" size="40" class="code"/>
|
561 |
+
<p class="description"><?php esc_html_e( 'Type an email address here and then click Send Test to generate a test email.', 'wp-mail-smtp' ); ?></p>
|
562 |
+
</td>
|
563 |
+
</tr>
|
564 |
+
</table>
|
565 |
+
|
566 |
+
<p class="submit">
|
567 |
+
<input type="submit" name="wpms_action" id="wpms_action" class="button-primary" value="<?php esc_attr_e( 'Send Test', 'wp-mail-smtp' ); ?>"/>
|
568 |
+
</p>
|
569 |
+
</form>
|
570 |
+
|
571 |
+
<script type="text/javascript">
|
572 |
+
/* globals jQuery */
|
573 |
+
var wpmsOnMailerChange = function ( mailer ) {
|
574 |
+
// Hide all the mailer forms.
|
575 |
+
jQuery( '.wpms_section' ).hide();
|
576 |
+
// Show the target mailer form.
|
577 |
+
jQuery( '#wpms_section_' + mailer ).show();
|
578 |
+
};
|
579 |
+
jQuery( document ).ready( function () {
|
580 |
+
// Call wpmsOnMailerChange() on startup with the current mailer.
|
581 |
+
wpmsOnMailerChange( jQuery( 'input.wpms_mailer:checked' ).val() );
|
582 |
+
|
583 |
+
// Watch the mailer for any changes
|
584 |
+
jQuery( 'input.wpms_mailer' ).on( 'change', function ( e ) {
|
585 |
+
// Call the wpmsOnMailerChange() handler, passing the value of the newly selected mailer.
|
586 |
+
wpmsOnMailerChange( jQuery( e.target ).val() );
|
587 |
+
} );
|
588 |
+
} );
|
589 |
+
</script>
|
590 |
+
|
591 |
+
</div>
|
592 |
+
<?php
|
593 |
+
} // End of wp_mail_smtp_options_page() function definition.
|
594 |
+
endif;
|
595 |
+
|
596 |
+
if ( ! function_exists( 'wp_mail_smtp_menus' ) ) :
|
597 |
+
/**
|
598 |
+
* This function adds the required page (only 1 at the moment).
|
599 |
+
*/
|
600 |
+
function wp_mail_smtp_menus() {
|
601 |
+
|
602 |
+
if ( function_exists( 'add_submenu_page' ) ) {
|
603 |
+
add_options_page( esc_html__( 'WP Mail SMTP Settings', 'wp-mail-smtp' ), esc_html__( 'WP Mail SMTP', 'wp-mail-smtp' ), 'manage_options', __FILE__, 'wp_mail_smtp_options_page' );
|
604 |
+
}
|
605 |
+
} // End of wp_mail_smtp_menus() function definition.
|
606 |
+
endif;
|
607 |
+
|
608 |
+
if ( ! function_exists( 'wp_mail_smtp_mail_from' ) ) :
|
609 |
+
/**
|
610 |
+
* This function sets the from email value.
|
611 |
+
*
|
612 |
+
* @param string $orig
|
613 |
+
*
|
614 |
+
* @return string
|
615 |
+
*/
|
616 |
+
function wp_mail_smtp_mail_from( $orig ) {
|
617 |
+
/*
|
618 |
+
* This is copied from pluggable.php lines 348-354 as at revision 10150
|
619 |
+
* http://trac.wordpress.org/browser/branches/2.7/wp-includes/pluggable.php#L348.
|
620 |
+
*/
|
621 |
+
|
622 |
+
// In case of CLI we don't have SERVER_NAME, so use host name instead, may be not a domain name.
|
623 |
+
$server_name = ! empty( $_SERVER['SERVER_NAME'] ) ? $_SERVER['SERVER_NAME'] : wp_parse_url( get_home_url( get_current_blog_id() ), PHP_URL_HOST );
|
624 |
+
|
625 |
+
// Get the site domain and get rid of www.
|
626 |
+
$sitename = strtolower( $server_name );
|
627 |
+
if ( substr( $sitename, 0, 4 ) === 'www.' ) {
|
628 |
+
$sitename = substr( $sitename, 4 );
|
629 |
+
}
|
630 |
+
|
631 |
+
$default_from = 'wordpress@' . $sitename;
|
632 |
+
|
633 |
+
/*
|
634 |
+
* End of copied code.
|
635 |
+
*/
|
636 |
+
|
637 |
+
// If the from email is not the default, return it unchanged.
|
638 |
+
if ( $orig !== $default_from ) {
|
639 |
+
return $orig;
|
640 |
+
}
|
641 |
+
|
642 |
+
if (
|
643 |
+
defined( 'WPMS_ON' ) && WPMS_ON &&
|
644 |
+
defined( 'WPMS_MAIL_FROM' )
|
645 |
+
) {
|
646 |
+
$mail_from_email = WPMS_MAIL_FROM;
|
647 |
+
|
648 |
+
if ( ! empty( $mail_from_email ) ) {
|
649 |
+
return $mail_from_email;
|
650 |
+
}
|
651 |
+
}
|
652 |
+
|
653 |
+
if ( is_email( get_option( 'mail_from' ), false ) ) {
|
654 |
+
return get_option( 'mail_from' );
|
655 |
+
}
|
656 |
+
|
657 |
+
// If in doubt, return the original value.
|
658 |
+
return $orig;
|
659 |
+
} // End of wp_mail_smtp_mail_from() function definition.
|
660 |
+
endif;
|
661 |
+
|
662 |
+
if ( ! function_exists( 'wp_mail_smtp_mail_from_name' ) ) :
|
663 |
+
/**
|
664 |
+
* This function sets the from name value.
|
665 |
+
*
|
666 |
+
* @param string $orig
|
667 |
+
*
|
668 |
+
* @return string
|
669 |
+
*/
|
670 |
+
function wp_mail_smtp_mail_from_name( $orig ) {
|
671 |
+
|
672 |
+
// Only filter if the from name is the default.
|
673 |
+
if ( 'WordPress' === $orig ) {
|
674 |
+
if (
|
675 |
+
defined( 'WPMS_ON' ) && WPMS_ON &&
|
676 |
+
defined( 'WPMS_MAIL_FROM_NAME' )
|
677 |
+
) {
|
678 |
+
$mail_from_name = WPMS_MAIL_FROM_NAME;
|
679 |
+
|
680 |
+
if ( ! empty( $mail_from_name ) ) {
|
681 |
+
return $mail_from_name;
|
682 |
+
}
|
683 |
+
}
|
684 |
+
|
685 |
+
$from_name = get_option( 'mail_from_name' );
|
686 |
+
if ( ! empty( $from_name ) && is_string( $from_name ) ) {
|
687 |
+
return $from_name;
|
688 |
+
}
|
689 |
+
}
|
690 |
+
|
691 |
+
return $orig;
|
692 |
+
}
|
693 |
+
endif;
|
694 |
+
|
695 |
+
/**
|
696 |
+
* Add a link to Settings page of a plugin on Plugins page.
|
697 |
+
*
|
698 |
+
* @param array $links
|
699 |
+
* @param string $file
|
700 |
+
*
|
701 |
+
* @return mixed
|
702 |
+
*/
|
703 |
+
function wp_mail_plugin_action_links( $links, $file ) {
|
704 |
+
|
705 |
+
if ( plugin_basename( __FILE__ ) !== $file ) {
|
706 |
+
return $links;
|
707 |
+
}
|
708 |
+
|
709 |
+
$settings_link = '<a href="options-general.php?page=' . plugin_basename( __FILE__ ) . '">' . esc_html__( 'Settings', 'wp-mail-smtp' ) . '</a>';
|
710 |
+
|
711 |
+
array_unshift( $links, $settings_link );
|
712 |
+
|
713 |
+
return $links;
|
714 |
+
}
|
715 |
+
|
716 |
+
/**
|
717 |
+
* Awesome Motive Notifications.
|
718 |
+
*
|
719 |
+
* @since 0.11
|
720 |
+
*/
|
721 |
+
function wp_mail_smtp_am_notifications() {
|
722 |
+
|
723 |
+
$is_hidden = get_option( 'wp_mail_smtp_am_notifications_hidden', '' );
|
724 |
+
|
725 |
+
if ( 'true' === $is_hidden ) {
|
726 |
+
return;
|
727 |
+
}
|
728 |
+
|
729 |
+
if ( ! class_exists( 'WPMS_AM_Notification' ) ) {
|
730 |
+
require_once dirname( __FILE__ ) . '/class-wpms-am-notification.php';
|
731 |
+
}
|
732 |
+
|
733 |
+
new WPMS_AM_Notification( 'smtp', WPMS_PLUGIN_VER );
|
734 |
+
}
|
735 |
+
|
736 |
+
add_action( 'plugins_loaded', 'wp_mail_smtp_am_notifications' );
|
737 |
+
|
738 |
+
/**
|
739 |
+
* Check whether the site is using Pepipost or not.
|
740 |
+
*
|
741 |
+
* @since 0.11
|
742 |
+
*
|
743 |
+
* @return bool
|
744 |
+
*/
|
745 |
+
function wp_mail_smtp_is_pepipost_active() {
|
746 |
+
return apply_filters( 'wp_mail_smtp_options_is_pepipost_active', 'pepipost' === get_option( 'mailer' ) );
|
747 |
+
}
|
748 |
+
|
749 |
+
/**
|
750 |
+
* Check the current PHP version and display a notice if on unsupported PHP.
|
751 |
+
*
|
752 |
+
* @since 0.11
|
753 |
+
*/
|
754 |
+
function wp_mail_smtp_check_php_version() {
|
755 |
+
|
756 |
+
// Display for admins only.
|
757 |
+
if ( ! is_super_admin() ) {
|
758 |
+
return;
|
759 |
+
}
|
760 |
+
|
761 |
+
// Display on Dashboard page only.
|
762 |
+
if ( isset( $GLOBALS['pagenow'] ) && 'index.php' !== $GLOBALS['pagenow'] ) {
|
763 |
+
return;
|
764 |
+
}
|
765 |
+
|
766 |
+
echo '<div class="notice notice-error">' .
|
767 |
+
'<p>' .
|
768 |
+
sprintf(
|
769 |
+
/* translators: %1$s - WP Mail SMTP plugin name; %2$s - opening a link tag; %3$s - closing a link tag. */
|
770 |
+
esc_html__(
|
771 |
+
'Your site is running an outdated version of PHP that is no longer supported and may cause issues with %1$s. %2$sRead more%3$s for additional information.',
|
772 |
+
'wp-mail-smtp'
|
773 |
+
),
|
774 |
+
'<strong>WP Mail SMTP</strong>',
|
775 |
+
'<a href="https://wpforms.com/docs/supported-php-version/" target="_blank">',
|
776 |
+
'</a>'
|
777 |
+
) .
|
778 |
+
'</p>' .
|
779 |
+
'</div>';
|
780 |
+
}
|
781 |
+
|
782 |
+
add_action( 'admin_notices', 'wp_mail_smtp_check_php_version' );
|
783 |
+
|
784 |
+
// Add an action on phpmailer_init.
|
785 |
+
add_action( 'phpmailer_init', 'phpmailer_init_smtp' );
|
786 |
+
|
787 |
+
if ( ! defined( 'WPMS_ON' ) || ! WPMS_ON ) {
|
788 |
+
// Whitelist our options.
|
789 |
+
add_filter( 'whitelist_options', 'wp_mail_smtp_whitelist_options' );
|
790 |
+
// Add the create pages options.
|
791 |
+
add_action( 'admin_menu', 'wp_mail_smtp_menus' );
|
792 |
+
// Add an activation hook for this plugin.
|
793 |
+
register_activation_hook( __FILE__, 'wp_mail_smtp_activate' );
|
794 |
+
// Adds "Settings" link to the Plugins page.
|
795 |
+
add_filter( 'plugin_action_links', 'wp_mail_plugin_action_links', 10, 2 );
|
796 |
+
}
|
797 |
+
|
798 |
+
// Add filters to replace the mail from name and email address.
|
799 |
+
add_filter( 'wp_mail_from', 'wp_mail_smtp_mail_from' );
|
800 |
+
add_filter( 'wp_mail_from_name', 'wp_mail_smtp_mail_from_name' );
|
801 |
+
|
802 |
+
load_plugin_textdomain( 'wp-mail-smtp', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
|
wp-mail-smtp.php
CHANGED
@@ -20,10 +20,13 @@ spl_autoload_register( function ( $class ) {
|
|
20 |
return;
|
21 |
}
|
22 |
|
23 |
-
|
|
|
|
|
|
|
24 |
|
25 |
// Default directory for all code is plugin's /src/.
|
26 |
-
$base_dir = plugin_dir_path( __DIR__ ) . '/' . $
|
27 |
|
28 |
// Get the relative class name.
|
29 |
$relative_class = substr( $class, strlen( $plugin_space ) + 1 );
|
20 |
return;
|
21 |
}
|
22 |
|
23 |
+
/*
|
24 |
+
* This folder can be both "wp-mail-smtp" and "wp-mail-smtp-pro".
|
25 |
+
*/
|
26 |
+
$plugin_dir = basename( __DIR__ );
|
27 |
|
28 |
// Default directory for all code is plugin's /src/.
|
29 |
+
$base_dir = plugin_dir_path( __DIR__ ) . '/' . $plugin_dir . '/src/';
|
30 |
|
31 |
// Get the relative class name.
|
32 |
$relative_class = substr( $class, strlen( $plugin_space ) + 1 );
|
wp_mail_smtp.php
CHANGED
@@ -1,26 +1,23 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Plugin Name: WP Mail SMTP
|
4 |
-
* Version: 1.
|
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 |
*/
|
13 |
|
14 |
/**
|
15 |
-
* @author
|
16 |
-
* @copyright WPForms, 2007-
|
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.2' );
|
22 |
-
define( 'WPMS_PHP_VER', '5.3.6' );
|
23 |
-
|
24 |
/**
|
25 |
* Setting options in wp-config.php
|
26 |
*
|
@@ -58,814 +55,104 @@ define( 'WPMS_SENDGRID_API_KEY', '' );
|
|
58 |
*/
|
59 |
|
60 |
/**
|
61 |
-
*
|
62 |
-
* with better code and newer logic.
|
63 |
*
|
64 |
-
* @since 1.
|
65 |
-
*/
|
66 |
-
if ( version_compare( phpversion(), WPMS_PHP_VER, '>=' ) ) {
|
67 |
-
require_once dirname( __FILE__ ) . '/wp-mail-smtp.php';
|
68 |
-
return;
|
69 |
-
}
|
70 |
-
|
71 |
-
/**
|
72 |
-
* Array of options and their default values.
|
73 |
-
* This is horrible, should be cleaned up at some point.
|
74 |
*/
|
75 |
-
|
76 |
-
|
77 |
-
'
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
'smtp_ssl' => 'none',
|
84 |
-
'smtp_auth' => false,
|
85 |
-
'smtp_user' => '',
|
86 |
-
'smtp_pass' => '',
|
87 |
-
'pepipost_user' => '',
|
88 |
-
'pepipost_pass' => '',
|
89 |
-
'pepipost_port' => '2525',
|
90 |
-
'pepipost_ssl' => 'none',
|
91 |
-
'wp_mail_smtp_am_notifications_hidden' => '',
|
92 |
-
);
|
93 |
-
|
94 |
-
/**
|
95 |
-
* Activation function. This function creates the required options and defaults.
|
96 |
-
*/
|
97 |
-
if ( ! function_exists( 'wp_mail_smtp_activate' ) ) :
|
98 |
-
/**
|
99 |
-
* What to do on plugin activation.
|
100 |
-
*/
|
101 |
-
function wp_mail_smtp_activate() {
|
102 |
-
|
103 |
-
global $wpms_options;
|
104 |
-
|
105 |
-
// Create the required options...
|
106 |
-
foreach ( $wpms_options as $name => $val ) {
|
107 |
-
add_option( $name, $val );
|
108 |
-
}
|
109 |
-
}
|
110 |
-
endif;
|
111 |
-
|
112 |
-
if ( ! function_exists( 'wp_mail_smtp_whitelist_options' ) ) :
|
113 |
-
/**
|
114 |
-
* Whitelist plugin options.
|
115 |
-
*
|
116 |
-
* @param array $whitelist_options
|
117 |
-
*
|
118 |
-
* @return mixed
|
119 |
-
*/
|
120 |
-
function wp_mail_smtp_whitelist_options( $whitelist_options ) {
|
121 |
-
|
122 |
-
global $wpms_options;
|
123 |
-
|
124 |
-
// Add our options to the array.
|
125 |
-
$whitelist_options['email'] = array_keys( $wpms_options );
|
126 |
-
|
127 |
-
return $whitelist_options;
|
128 |
-
}
|
129 |
-
endif;
|
130 |
-
|
131 |
-
/**
|
132 |
-
* To avoid any (very unlikely) clashes, check if the function already exists.
|
133 |
-
*/
|
134 |
-
if ( ! function_exists( 'phpmailer_init_smtp' ) ) :
|
135 |
-
/**
|
136 |
-
* This code is copied, from wp-includes/pluggable.php as at version 2.2.2.
|
137 |
-
*
|
138 |
-
* @param PHPMailer $phpmailer It's passed by reference, so no need to return anything.
|
139 |
-
*/
|
140 |
-
function phpmailer_init_smtp( $phpmailer ) {
|
141 |
-
/*
|
142 |
-
* If constants are defined, apply them.
|
143 |
-
* We should have defined all required constants before using them.
|
144 |
*/
|
145 |
-
|
146 |
-
defined( 'WPMS_ON' ) && WPMS_ON &&
|
147 |
-
defined( 'WPMS_MAILER' )
|
148 |
-
) {
|
149 |
-
$phpmailer->Mailer = WPMS_MAILER;
|
150 |
-
|
151 |
-
if ( defined( 'WPMS_SET_RETURN_PATH' ) && WPMS_SET_RETURN_PATH ) {
|
152 |
-
$phpmailer->Sender = $phpmailer->From;
|
153 |
-
}
|
154 |
-
|
155 |
-
if (
|
156 |
-
WPMS_MAILER === 'smtp' &&
|
157 |
-
defined( 'WPMS_SSL' ) &&
|
158 |
-
defined( 'WPMS_SMTP_HOST' ) &&
|
159 |
-
defined( 'WPMS_SMTP_PORT' )
|
160 |
-
) {
|
161 |
-
$phpmailer->SMTPSecure = WPMS_SSL;
|
162 |
-
$phpmailer->Host = WPMS_SMTP_HOST;
|
163 |
-
$phpmailer->Port = WPMS_SMTP_PORT;
|
164 |
-
|
165 |
-
if (
|
166 |
-
defined( 'WPMS_SMTP_AUTH' ) && WPMS_SMTP_AUTH &&
|
167 |
-
defined( 'WPMS_SMTP_USER' ) &&
|
168 |
-
defined( 'WPMS_SMTP_PASS' )
|
169 |
-
) {
|
170 |
-
$phpmailer->SMTPAuth = true;
|
171 |
-
$phpmailer->Username = WPMS_SMTP_USER;
|
172 |
-
$phpmailer->Password = WPMS_SMTP_PASS;
|
173 |
-
}
|
174 |
-
}
|
175 |
-
} else {
|
176 |
-
$option_mailer = get_option( 'mailer' );
|
177 |
-
$option_smtp_host = get_option( 'smtp_host' );
|
178 |
-
$option_smtp_ssl = get_option( 'smtp_ssl' );
|
179 |
-
|
180 |
-
// Check that mailer is not blank, and if mailer=smtp, host is not blank.
|
181 |
-
if (
|
182 |
-
! $option_mailer ||
|
183 |
-
( 'smtp' === $option_mailer && ! $option_smtp_host )
|
184 |
-
) {
|
185 |
-
return;
|
186 |
-
}
|
187 |
-
|
188 |
-
// If the mailer is pepipost, make sure we have a username and password.
|
189 |
-
if ( 'pepipost' === $option_mailer && ( ! get_option( 'pepipost_user' ) && ! get_option( 'pepipost_pass' ) ) ) {
|
190 |
-
return;
|
191 |
-
}
|
192 |
-
|
193 |
-
// Set the mailer type as per config above, this overrides the already called isMail method.
|
194 |
-
$phpmailer->Mailer = $option_mailer;
|
195 |
|
196 |
-
|
197 |
-
if ( get_option( 'mail_set_return_path' ) ) {
|
198 |
-
$phpmailer->Sender = $phpmailer->From;
|
199 |
-
}
|
200 |
-
|
201 |
-
// Set the SMTPSecure value, if set to none, leave this blank.
|
202 |
-
$phpmailer->SMTPSecure = $option_smtp_ssl;
|
203 |
-
if ( 'none' === $option_smtp_ssl ) {
|
204 |
-
$phpmailer->SMTPSecure = '';
|
205 |
-
$phpmailer->SMTPAutoTLS = false;
|
206 |
-
}
|
207 |
-
|
208 |
-
// If we're sending via SMTP, set the host.
|
209 |
-
if ( 'smtp' === $option_mailer ) {
|
210 |
-
// Set the other options.
|
211 |
-
$phpmailer->Host = $option_smtp_host;
|
212 |
-
$phpmailer->Port = get_option( 'smtp_port' );
|
213 |
-
|
214 |
-
// If we're using smtp auth, set the username & password.
|
215 |
-
if ( get_option( 'smtp_auth' ) === 'true' ) {
|
216 |
-
$phpmailer->SMTPAuth = true;
|
217 |
-
$phpmailer->Username = get_option( 'smtp_user' );
|
218 |
-
$phpmailer->Password = get_option( 'smtp_pass' );
|
219 |
-
}
|
220 |
-
} elseif ( 'pepipost' === $option_mailer ) {
|
221 |
-
// Set the Pepipost settings.
|
222 |
-
$phpmailer->Mailer = 'smtp';
|
223 |
-
$phpmailer->Host = 'smtp.pepipost.com';
|
224 |
-
$phpmailer->Port = get_option( 'pepipost_port' );
|
225 |
-
$phpmailer->SMTPSecure = get_option( 'pepipost_ssl' ) === 'none' ? '' : get_option( 'pepipost_ssl' );
|
226 |
-
$phpmailer->SMTPAuth = true;
|
227 |
-
$phpmailer->Username = get_option( 'pepipost_user' );
|
228 |
-
$phpmailer->Password = get_option( 'pepipost_pass' );
|
229 |
-
}
|
230 |
}
|
231 |
-
|
232 |
-
// You can add your own options here, see the phpmailer documentation for more info: http://phpmailer.sourceforge.net/docs/.
|
233 |
-
/** @noinspection PhpUnusedLocalVariableInspection It's passed by reference. */
|
234 |
-
$phpmailer = apply_filters( 'wp_mail_smtp_custom_options', $phpmailer );
|
235 |
}
|
236 |
-
|
237 |
-
|
238 |
-
if ( ! function_exists( 'wp_mail_smtp_options_page' ) ) :
|
239 |
-
/**
|
240 |
-
* This function outputs the plugin options page.
|
241 |
-
*/
|
242 |
-
function wp_mail_smtp_options_page() {
|
243 |
-
|
244 |
-
global $phpmailer;
|
245 |
-
|
246 |
-
// Make sure the PHPMailer class has been instantiated
|
247 |
-
// (copied verbatim from wp-includes/pluggable.php)
|
248 |
-
// (Re)create it, if it's gone missing.
|
249 |
-
if ( ! is_object( $phpmailer ) || ! is_a( $phpmailer, 'PHPMailer' ) ) {
|
250 |
-
require_once ABSPATH . WPINC . '/class-phpmailer.php';
|
251 |
-
$phpmailer = new PHPMailer( true );
|
252 |
-
}
|
253 |
-
|
254 |
-
// Send a test mail if necessary.
|
255 |
-
if (
|
256 |
-
isset( $_POST['wpms_action'] ) &&
|
257 |
-
esc_html__( 'Send Test', 'wp-mail-smtp' ) === sanitize_text_field( $_POST['wpms_action'] ) &&
|
258 |
-
is_email( $_POST['to'] )
|
259 |
-
) {
|
260 |
-
|
261 |
-
check_admin_referer( 'test-email' );
|
262 |
-
|
263 |
-
// Set up the mail variables.
|
264 |
-
$to = sanitize_text_field( $_POST['to'] );
|
265 |
-
/* translators: %s - email address where test mail will be sent to. */
|
266 |
-
$subject = 'WP Mail SMTP: ' . sprintf( esc_html__( 'Test mail to %s', 'wp-mail-smtp' ), $to );
|
267 |
-
$message = esc_html__( 'This is a test email generated by the WP Mail SMTP WordPress plugin.', 'wp-mail-smtp' );
|
268 |
-
|
269 |
-
// Set SMTPDebug level, default is 2 (commands + data + connection status).
|
270 |
-
$phpmailer->SMTPDebug = apply_filters( 'wp_mail_smtp_admin_test_email_smtp_debug', 2 );
|
271 |
-
|
272 |
-
// Start output buffering to grab smtp debugging output.
|
273 |
-
ob_start();
|
274 |
-
|
275 |
-
// Send the test mail.
|
276 |
-
$result = wp_mail( $to, $subject, $message );
|
277 |
-
|
278 |
-
// Grab the smtp debugging output.
|
279 |
-
$smtp_debug = ob_get_clean();
|
280 |
-
|
281 |
-
// Output the response.
|
282 |
-
?>
|
283 |
-
<div id="message" class="updated notice is-dismissible"><p><strong><?php esc_html_e( 'Test Message Sent', 'wp-mail-smtp' ); ?></strong></p>
|
284 |
-
<p><?php esc_html_e( 'The result was:', 'wp-mail-smtp' ); ?></p>
|
285 |
-
<pre><?php var_dump( $result ); ?></pre>
|
286 |
-
|
287 |
-
<p><?php esc_html_e( 'The full debugging output is shown below:', 'wp-mail-smtp' ); ?></p>
|
288 |
-
<pre><?php print_r( $phpmailer ); ?></pre>
|
289 |
-
|
290 |
-
<p><?php esc_html_e( 'The SMTP debugging output is shown below:', 'wp-mail-smtp' ); ?></p>
|
291 |
-
<pre><?php echo $smtp_debug; ?></pre>
|
292 |
-
</div>
|
293 |
-
<?php
|
294 |
-
|
295 |
-
// Destroy $phpmailer so it doesn't cause issues later.
|
296 |
-
unset( $phpmailer );
|
297 |
-
}
|
298 |
-
|
299 |
-
?>
|
300 |
-
<div class="wrap">
|
301 |
-
<h2>
|
302 |
-
<?php esc_html_e( 'WP Mail SMTP Settings', 'wp-mail-smtp' ); ?>
|
303 |
-
</h2>
|
304 |
-
|
305 |
-
<form method="post" action="<?php echo esc_url( admin_url( 'options.php' ) ); ?>">
|
306 |
-
<?php wp_nonce_field( 'email-options' ); ?>
|
307 |
-
|
308 |
-
<table class="form-table">
|
309 |
-
<tr valign="top">
|
310 |
-
<th scope="row">
|
311 |
-
<label for="mail_from"><?php esc_html_e( 'From Email', 'wp-mail-smtp' ); ?></label>
|
312 |
-
</th>
|
313 |
-
<td>
|
314 |
-
<input name="mail_from" type="email" id="mail_from" value="<?php echo esc_attr( get_option( 'mail_from' ) ); ?>" size="40" class="regular-text"/>
|
315 |
-
|
316 |
-
<p class="description">
|
317 |
-
<?php
|
318 |
-
esc_html_e( 'You can specify the email address that emails should be sent from. If you leave this blank, the default email will be used.', 'wp-mail-smtp' );
|
319 |
-
if ( get_option( 'db_version' ) < 6124 ) {
|
320 |
-
print( '<br /><span style="color: red;">' );
|
321 |
-
_e( '<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<email@domain.com> in this field.', 'wp-mail-smtp' );
|
322 |
-
print( '</span>' );
|
323 |
-
}
|
324 |
-
?>
|
325 |
-
</p>
|
326 |
-
</td>
|
327 |
-
</tr>
|
328 |
-
<tr valign="top">
|
329 |
-
<th scope="row">
|
330 |
-
<label for="mail_from_name"><?php esc_html_e( 'From Name', 'wp-mail-smtp' ); ?></label>
|
331 |
-
</th>
|
332 |
-
<td>
|
333 |
-
<input name="mail_from_name" type="text" id="mail_from_name" value="<?php echo esc_attr( get_option( 'mail_from_name' ) ); ?>" size="40" class="regular-text"/>
|
334 |
-
|
335 |
-
<p class="description">
|
336 |
-
<?php esc_html_e( 'You can specify the name that emails should be sent from. If you leave this blank, the emails will be sent from WordPress.', 'wp-mail-smtp' ); ?>
|
337 |
-
</p>
|
338 |
-
</td>
|
339 |
-
</tr>
|
340 |
-
</table>
|
341 |
-
|
342 |
-
<table class="form-table">
|
343 |
-
<tr valign="top">
|
344 |
-
<th scope="row">
|
345 |
-
<?php esc_html_e( 'Mailer', 'wp-mail-smtp' ); ?>
|
346 |
-
</th>
|
347 |
-
<td>
|
348 |
-
<fieldset>
|
349 |
-
<legend class="screen-reader-text">
|
350 |
-
<span><?php esc_html_e( 'Mailer', 'wp-mail-smtp' ); ?></span>
|
351 |
-
</legend>
|
352 |
-
|
353 |
-
<p>
|
354 |
-
<input id="mailer_smtp" class="wpms_mailer" type="radio" name="mailer" value="smtp" <?php checked( 'smtp', get_option( 'mailer' ) ); ?> />
|
355 |
-
<label for="mailer_smtp"><?php esc_html_e( 'Send all WordPress emails via SMTP.', 'wp-mail-smtp' ); ?></label>
|
356 |
-
</p>
|
357 |
-
<p>
|
358 |
-
<input id="mailer_mail" class="wpms_mailer" type="radio" name="mailer" value="mail" <?php checked( 'mail', get_option( 'mailer' ) ); ?> />
|
359 |
-
<label for="mailer_mail"><?php esc_html_e( 'Use the PHP mail() function to send emails.', 'wp-mail-smtp' ); ?></label>
|
360 |
-
</p>
|
361 |
-
|
362 |
-
<?php if ( wp_mail_smtp_is_pepipost_active() ) : ?>
|
363 |
-
<p>
|
364 |
-
<input id="mailer_pepipost" class="wpms_mailer" type="radio" name="mailer" value="pepipost" <?php checked( 'pepipost', get_option( 'mailer' ) ); ?> />
|
365 |
-
<label for="mailer_pepipost"><?php esc_html_e( 'Use Pepipost SMTP to send emails.', 'wp-mail-smtp' ); ?></label>
|
366 |
-
</p>
|
367 |
-
<p class="description">
|
368 |
-
<?php
|
369 |
-
printf(
|
370 |
-
/* translators: %1$s - link start; %2$s - link end. */
|
371 |
-
esc_html__( 'Looking for high inbox delivery? Try Pepipost with easy setup and free emails. Learn more %1$shere%2$s.', 'wp-mail-smtp' ),
|
372 |
-
'<a href="https://app1.pepipost.com/index.php/login/wp_mail_smtp?page=signup&utm_source=WordPress&utm_campaign=Plugins&utm_medium=wp_mail_smtp&utm_term=organic&code=WP-MAIL-SMTP" target="_blank">',
|
373 |
-
'</a>'
|
374 |
-
);
|
375 |
-
?>
|
376 |
-
</p>
|
377 |
-
<?php endif; ?>
|
378 |
-
</fieldset>
|
379 |
-
</td>
|
380 |
-
</tr>
|
381 |
-
</table>
|
382 |
-
|
383 |
-
<table class="form-table">
|
384 |
-
<tr valign="top">
|
385 |
-
<th scope="row">
|
386 |
-
<?php esc_html_e( 'Return Path', 'wp-mail-smtp' ); ?>
|
387 |
-
</th>
|
388 |
-
<td>
|
389 |
-
<fieldset>
|
390 |
-
<legend class="screen-reader-text">
|
391 |
-
<span><?php esc_html_e( 'Return Path', 'wp-mail-smtp' ); ?></span>
|
392 |
-
</legend>
|
393 |
-
|
394 |
-
<label for="mail_set_return_path">
|
395 |
-
<input name="mail_set_return_path" type="checkbox" id="mail_set_return_path" value="true" <?php checked( 'true', get_option( 'mail_set_return_path' ) ); ?> />
|
396 |
-
<?php esc_html_e( 'Set the return-path to match the From Email', 'wp-mail-smtp' ); ?>
|
397 |
-
</label>
|
398 |
-
|
399 |
-
<p class="description">
|
400 |
-
<?php esc_html_e( 'Return Path indicates where non-delivery receipts - or bounce messages - are to be sent.', 'wp-mail-smtp' ); ?>
|
401 |
-
</p>
|
402 |
-
</fieldset>
|
403 |
-
</td>
|
404 |
-
</tr>
|
405 |
-
</table>
|
406 |
-
|
407 |
-
<table class="form-table">
|
408 |
-
<tr valign="top">
|
409 |
-
<th scope="row">
|
410 |
-
<?php _e( 'Hide Announcements', 'wp-mail-smtp' ); ?>
|
411 |
-
</th>
|
412 |
-
<td>
|
413 |
-
<fieldset>
|
414 |
-
<legend class="screen-reader-text">
|
415 |
-
<span><?php _e( 'Hide Announcements', 'wp-mail-smtp' ); ?></span>
|
416 |
-
</legend>
|
417 |
-
|
418 |
-
<label for="wp_mail_smtp_am_notifications_hidden">
|
419 |
-
<input name="wp_mail_smtp_am_notifications_hidden" type="checkbox" id="wp_mail_smtp_am_notifications_hidden" value="true" <?php checked( 'true', get_option( 'wp_mail_smtp_am_notifications_hidden' ) ); ?> />
|
420 |
-
<?php _e( 'Check this if you would like to hide plugin announcements and update details.', 'wp-mail-smtp' ); ?>
|
421 |
-
</label>
|
422 |
-
</fieldset>
|
423 |
-
</td>
|
424 |
-
</tr>
|
425 |
-
</table>
|
426 |
-
|
427 |
-
<p class="submit">
|
428 |
-
<input type="submit" name="submit" id="submit" class="button-primary" value="<?php esc_attr_e( 'Save Changes', 'wp-mail-smtp' ); ?>"/>
|
429 |
-
</p>
|
430 |
-
|
431 |
-
<div id="wpms_section_smtp" class="wpms_section">
|
432 |
-
<h3>
|
433 |
-
<?php esc_html_e( 'SMTP Options', 'wp-mail-smtp' ); ?>
|
434 |
-
</h3>
|
435 |
-
<p><?php esc_html_e( 'These options only apply if you have chosen to send mail by SMTP above.', 'wp-mail-smtp' ); ?></p>
|
436 |
-
|
437 |
-
<table class="form-table">
|
438 |
-
<tr valign="top">
|
439 |
-
<th scope="row">
|
440 |
-
<label for="smtp_host"><?php esc_html_e( 'SMTP Host', 'wp-mail-smtp' ); ?></label>
|
441 |
-
</th>
|
442 |
-
<td>
|
443 |
-
<input name="smtp_host" type="text" id="smtp_host" value="<?php echo intval( get_option( 'smtp_host' ) ); ?>" size="40" class="regular-text"/>
|
444 |
-
</td>
|
445 |
-
</tr>
|
446 |
-
<tr valign="top">
|
447 |
-
<th scope="row">
|
448 |
-
<label for="smtp_port"><?php esc_html_e( 'SMTP Port', 'wp-mail-smtp' ); ?></label>
|
449 |
-
</th>
|
450 |
-
<td>
|
451 |
-
<input name="smtp_port" type="text" id="smtp_port" value="<?php echo esc_attr( get_option( 'smtp_port' ) ); ?>" size="6" class="regular-text"/>
|
452 |
-
</td>
|
453 |
-
</tr>
|
454 |
-
<tr valign="top">
|
455 |
-
<th scope="row"><?php esc_html_e( 'Encryption', 'wp-mail-smtp' ); ?> </th>
|
456 |
-
<td>
|
457 |
-
<fieldset>
|
458 |
-
<legend class="screen-reader-text">
|
459 |
-
<span><?php esc_html_e( 'Encryption', 'wp-mail-smtp' ); ?></span>
|
460 |
-
</legend>
|
461 |
-
|
462 |
-
<input id="smtp_ssl_none" type="radio" name="smtp_ssl" value="none" <?php checked( 'none', get_option( 'smtp_ssl' ) ); ?> />
|
463 |
-
<label for="smtp_ssl_none">
|
464 |
-
<span><?php esc_html_e( 'No encryption.', 'wp-mail-smtp' ); ?></span>
|
465 |
-
</label><br/>
|
466 |
-
|
467 |
-
<input id="smtp_ssl_ssl" type="radio" name="smtp_ssl" value="ssl" <?php checked( 'ssl', get_option( 'smtp_ssl' ) ); ?> />
|
468 |
-
<label for="smtp_ssl_ssl">
|
469 |
-
<span><?php esc_html_e( 'Use SSL encryption.', 'wp-mail-smtp' ); ?></span>
|
470 |
-
</label><br/>
|
471 |
-
|
472 |
-
<input id="smtp_ssl_tls" type="radio" name="smtp_ssl" value="tls" <?php checked( 'tls', get_option( 'smtp_ssl' ) ); ?> />
|
473 |
-
<label for="smtp_ssl_tls">
|
474 |
-
<span><?php esc_html_e( 'Use TLS encryption.', 'wp-mail-smtp' ); ?></span>
|
475 |
-
</label>
|
476 |
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
</tr>
|
481 |
-
<tr valign="top">
|
482 |
-
<th scope="row"><?php esc_html_e( 'Authentication', 'wp-mail-smtp' ); ?> </th>
|
483 |
-
<td>
|
484 |
-
<fieldset>
|
485 |
-
<legend class="screen-reader-text">
|
486 |
-
<span><?php esc_html_e( 'Authentication', 'wp-mail-smtp' ); ?></span>
|
487 |
-
</legend>
|
488 |
-
|
489 |
-
<input id="smtp_auth_false" type="radio" name="smtp_auth" value="false" <?php checked( 'false', get_option( 'smtp_auth' ) ); ?> />
|
490 |
-
<label for="smtp_auth_false">
|
491 |
-
<span><?php esc_html_e( 'No: Do not use SMTP authentication.', 'wp-mail-smtp' ); ?></span>
|
492 |
-
</label><br/>
|
493 |
-
|
494 |
-
<input id="smtp_auth_true" type="radio" name="smtp_auth" value="true" <?php checked( 'true', get_option( 'smtp_auth' ) ); ?> />
|
495 |
-
<label for="smtp_auth_true">
|
496 |
-
<span><?php esc_html_e( 'Yes: Use SMTP authentication.', 'wp-mail-smtp' ); ?></span>
|
497 |
-
</label><br/>
|
498 |
-
|
499 |
-
<p class="description">
|
500 |
-
<?php esc_html_e( 'If this is set to no, the values below are ignored.', 'wp-mail-smtp' ); ?>
|
501 |
-
</p>
|
502 |
-
</fieldset>
|
503 |
-
</td>
|
504 |
-
</tr>
|
505 |
-
<tr valign="top">
|
506 |
-
<th scope="row">
|
507 |
-
<label for="smtp_user"><?php esc_html_e( 'Username', 'wp-mail-smtp' ); ?></label>
|
508 |
-
</th>
|
509 |
-
<td>
|
510 |
-
<input name="smtp_user" type="text" id="smtp_user" value="<?php echo esc_attr( get_option( 'smtp_user' ) ); ?>" size="40" class="code" autocomplete="off"/>
|
511 |
-
</td>
|
512 |
-
</tr>
|
513 |
-
<tr valign="top">
|
514 |
-
<th scope="row">
|
515 |
-
<label for="smtp_pass"><?php esc_html_e( 'Password', 'wp-mail-smtp' ); ?></label>
|
516 |
-
</th>
|
517 |
-
<td>
|
518 |
-
<input name="smtp_pass" type="password" id="smtp_pass" value="<?php echo esc_attr( get_option( 'smtp_pass' ) ); ?>" size="40" class="code" autocomplete="off"/>
|
519 |
-
|
520 |
-
<p class="description">
|
521 |
-
<?php esc_html_e( 'This is in plain text because it must not be stored encrypted.', 'wp-mail-smtp' ); ?>
|
522 |
-
</p>
|
523 |
-
</td>
|
524 |
-
</tr>
|
525 |
-
</table>
|
526 |
-
|
527 |
-
<p class="submit">
|
528 |
-
<input type="submit" name="submit" id="submit" class="button-primary" value="<?php esc_attr_e( 'Save Changes', 'wp-mail-smtp' ); ?>"/>
|
529 |
-
</p>
|
530 |
-
</div><!-- #wpms_section_smtp -->
|
531 |
-
|
532 |
-
<?php if ( wp_mail_smtp_is_pepipost_active() ) : ?>
|
533 |
-
<div id="wpms_section_pepipost" class="wpms_section">
|
534 |
-
<h3>
|
535 |
-
<?php esc_html_e( 'Pepipost SMTP Options', 'wp-mail-smtp' ); ?>
|
536 |
-
</h3>
|
537 |
-
<p>
|
538 |
-
<?php
|
539 |
-
printf(
|
540 |
-
/* translators: %s - Pepipost registration URL. */
|
541 |
-
esc_html__( 'You need to signup on %s to get the SMTP username/password.', 'wp-mail-smtp' ),
|
542 |
-
'<a href="https://app1.pepipost.com/index.php/login/wp_mail_smtp?page=signup&utm_source=WordPress&utm_campaign=Plugins&utm_medium=wp_mail_smtp&utm_term=organic&code=WP-MAIL-SMTP" target="_blank">Pepipost</a>',
|
543 |
-
''
|
544 |
-
);
|
545 |
-
?>
|
546 |
-
</p>
|
547 |
-
<table class="form-table">
|
548 |
-
<tr valign="top">
|
549 |
-
<th scope="row">
|
550 |
-
<label for="pepipost_user"><?php esc_html_e( 'Username', 'wp-mail-smtp' ); ?></label>
|
551 |
-
</th>
|
552 |
-
<td>
|
553 |
-
<input name="pepipost_user" type="text" id="pepipost_user" value="<?php echo esc_attr( get_option( 'pepipost_user' ) ); ?>" size="40" class="code"/>
|
554 |
-
</td>
|
555 |
-
</tr>
|
556 |
-
<tr valign="top">
|
557 |
-
<th scope="row">
|
558 |
-
<label for="pepipost_pass"><?php esc_html_e( 'Password', 'wp-mail-smtp' ); ?></label>
|
559 |
-
</th>
|
560 |
-
<td>
|
561 |
-
<input name="pepipost_pass" type="text" id="pepipost_pass" value="<?php echo esc_attr( get_option( 'pepipost_pass' ) ); ?>" size="40" class="code"/>
|
562 |
-
</td>
|
563 |
-
</tr>
|
564 |
-
<tr valign="top">
|
565 |
-
<th scope="row">
|
566 |
-
<label for="pepipost_port"><?php esc_html_e( 'SMTP Port', 'wp-mail-smtp' ); ?></label>
|
567 |
-
</th>
|
568 |
-
<td>
|
569 |
-
<input name="pepipost_port" type="text" id="pepipost_port" value="<?php echo intval( get_option( 'pepipost_port' ) ); ?>" size="6" class="regular-text"/>
|
570 |
-
</td>
|
571 |
-
</tr>
|
572 |
-
<tr valign="top">
|
573 |
-
<th scope="row">
|
574 |
-
<?php esc_html_e( 'Encryption', 'wp-mail-smtp' ); ?>
|
575 |
-
</th>
|
576 |
-
<td>
|
577 |
-
<fieldset>
|
578 |
-
<legend class="screen-reader-text">
|
579 |
-
<span>
|
580 |
-
<?php esc_html_e( 'Encryption', 'wp-mail-smtp' ); ?>
|
581 |
-
</span>
|
582 |
-
</legend>
|
583 |
-
|
584 |
-
<input id="pepipost_ssl_none" type="radio" name="pepipost_ssl" value="none" <?php checked( 'none', get_option( 'pepipost_ssl' ) ); ?> />
|
585 |
-
<label for="pepipost_ssl_none">
|
586 |
-
<span><?php esc_html_e( 'No encryption.', 'wp-mail-smtp' ); ?></span>
|
587 |
-
</label><br/>
|
588 |
-
|
589 |
-
<input id="pepipost_ssl_ssl" type="radio" name="pepipost_ssl" value="ssl" <?php checked( 'ssl', get_option( 'pepipost_ssl' ) ); ?> />
|
590 |
-
<label for="pepipost_ssl_ssl">
|
591 |
-
<span><?php esc_html_e( 'Use SSL encryption.', 'wp-mail-smtp' ); ?></span>
|
592 |
-
</label><br/>
|
593 |
-
|
594 |
-
<input id="pepipost_ssl_tls" type="radio" name="pepipost_ssl" value="tls" <?php checked( 'tls', get_option( 'pepipost_ssl' ) ); ?> />
|
595 |
-
<label for="pepipost_ssl_tls">
|
596 |
-
<span><?php esc_html_e( 'Use TLS encryption.', 'wp-mail-smtp' ); ?></span>
|
597 |
-
</label>
|
598 |
-
</fieldset>
|
599 |
-
</td>
|
600 |
-
</tr>
|
601 |
-
</table>
|
602 |
-
|
603 |
-
<p class="submit">
|
604 |
-
<input type="submit" name="submit" id="submit" class="button-primary" value="<?php esc_attr_e( 'Save Changes', 'wp-mail-smtp' ); ?>"/>
|
605 |
-
</p>
|
606 |
-
</div><!-- #wpms_section_pepipost -->
|
607 |
-
<?php endif; ?>
|
608 |
-
|
609 |
-
<input type="hidden" name="action" value="update"/>
|
610 |
-
<input type="hidden" name="option_page" value="email">
|
611 |
-
</form>
|
612 |
-
|
613 |
-
<h3><?php esc_html_e( 'Send a Test Email', 'wp-mail-smtp' ); ?></h3>
|
614 |
-
|
615 |
-
<form method="POST" action="">
|
616 |
-
<?php wp_nonce_field( 'test-email' ); ?>
|
617 |
-
|
618 |
-
<table class="form-table">
|
619 |
-
<tr valign="top">
|
620 |
-
<th scope="row">
|
621 |
-
<label for="to"><?php esc_html_e( 'To', 'wp-mail-smtp' ); ?></label>
|
622 |
-
</th>
|
623 |
-
<td>
|
624 |
-
<input name="to" type="email" id="to" value="" size="40" class="code"/>
|
625 |
-
<p class="description"><?php esc_html_e( 'Type an email address here and then click Send Test to generate a test email.', 'wp-mail-smtp' ); ?></p>
|
626 |
-
</td>
|
627 |
-
</tr>
|
628 |
-
</table>
|
629 |
-
|
630 |
-
<p class="submit">
|
631 |
-
<input type="submit" name="wpms_action" id="wpms_action" class="button-primary" value="<?php esc_attr_e( 'Send Test', 'wp-mail-smtp' ); ?>"/>
|
632 |
-
</p>
|
633 |
-
</form>
|
634 |
-
|
635 |
-
<script type="text/javascript">
|
636 |
-
/* globals jQuery */
|
637 |
-
var wpmsOnMailerChange = function ( mailer ) {
|
638 |
-
// Hide all the mailer forms.
|
639 |
-
jQuery( '.wpms_section' ).hide();
|
640 |
-
// Show the target mailer form.
|
641 |
-
jQuery( '#wpms_section_' + mailer ).show();
|
642 |
-
};
|
643 |
-
jQuery( document ).ready( function () {
|
644 |
-
// Call wpmsOnMailerChange() on startup with the current mailer.
|
645 |
-
wpmsOnMailerChange( jQuery( 'input.wpms_mailer:checked' ).val() );
|
646 |
-
|
647 |
-
// Watch the mailer for any changes
|
648 |
-
jQuery( 'input.wpms_mailer' ).on( 'change', function ( e ) {
|
649 |
-
// Call the wpmsOnMailerChange() handler, passing the value of the newly selected mailer.
|
650 |
-
wpmsOnMailerChange( jQuery( e.target ).val() );
|
651 |
-
} );
|
652 |
-
} );
|
653 |
-
</script>
|
654 |
-
|
655 |
-
</div>
|
656 |
-
<?php
|
657 |
-
} // End of wp_mail_smtp_options_page() function definition.
|
658 |
-
endif;
|
659 |
-
|
660 |
-
if ( ! function_exists( 'wp_mail_smtp_menus' ) ) :
|
661 |
-
/**
|
662 |
-
* This function adds the required page (only 1 at the moment).
|
663 |
-
*/
|
664 |
-
function wp_mail_smtp_menus() {
|
665 |
-
|
666 |
-
if ( function_exists( 'add_submenu_page' ) ) {
|
667 |
-
add_options_page( esc_html__( 'WP Mail SMTP Settings', 'wp-mail-smtp' ), esc_html__( 'WP Mail SMTP', 'wp-mail-smtp' ), 'manage_options', __FILE__, 'wp_mail_smtp_options_page' );
|
668 |
-
}
|
669 |
-
} // End of wp_mail_smtp_menus() function definition.
|
670 |
-
endif;
|
671 |
|
672 |
-
if ( ! function_exists( '
|
673 |
/**
|
674 |
-
*
|
675 |
-
*
|
676 |
-
* @param string $orig
|
677 |
*
|
678 |
-
* @
|
679 |
*/
|
680 |
-
function
|
681 |
-
/*
|
682 |
-
* This is copied from pluggable.php lines 348-354 as at revision 10150
|
683 |
-
* http://trac.wordpress.org/browser/branches/2.7/wp-includes/pluggable.php#L348.
|
684 |
-
*/
|
685 |
-
|
686 |
-
// In case of CLI we don't have SERVER_NAME, so use host name instead, may be not a domain name.
|
687 |
-
$server_name = ! empty( $_SERVER['SERVER_NAME'] ) ? $_SERVER['SERVER_NAME'] : wp_parse_url( get_home_url( get_current_blog_id() ), PHP_URL_HOST );
|
688 |
|
689 |
-
//
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
}
|
694 |
|
695 |
-
|
696 |
-
|
697 |
-
/*
|
698 |
-
* End of copied code.
|
699 |
-
*/
|
700 |
-
|
701 |
-
// If the from email is not the default, return it unchanged.
|
702 |
-
if ( $orig !== $default_from ) {
|
703 |
-
return $orig;
|
704 |
}
|
705 |
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
$mail_from_email = WPMS_MAIL_FROM;
|
711 |
|
712 |
-
|
713 |
-
return $mail_from_email;
|
714 |
-
}
|
715 |
-
}
|
716 |
|
717 |
-
|
718 |
-
return get_option( 'mail_from' );
|
719 |
}
|
720 |
|
721 |
-
|
722 |
-
|
723 |
-
} // End of wp_mail_smtp_mail_from() function definition.
|
724 |
-
endif;
|
725 |
-
|
726 |
-
if ( ! function_exists( 'wp_mail_smtp_mail_from_name' ) ) :
|
727 |
-
/**
|
728 |
-
* This function sets the from name value.
|
729 |
-
*
|
730 |
-
* @param string $orig
|
731 |
-
*
|
732 |
-
* @return string
|
733 |
-
*/
|
734 |
-
function wp_mail_smtp_mail_from_name( $orig ) {
|
735 |
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
|
744 |
-
|
745 |
-
return $mail_from_name;
|
746 |
-
}
|
747 |
-
}
|
748 |
|
749 |
-
|
750 |
-
|
751 |
-
return $from_name;
|
752 |
}
|
753 |
}
|
754 |
-
|
755 |
-
return $orig;
|
756 |
}
|
757 |
-
endif;
|
758 |
|
759 |
-
|
760 |
-
|
761 |
-
*
|
762 |
-
* @param array $links
|
763 |
-
* @param string $file
|
764 |
-
*
|
765 |
-
* @return mixed
|
766 |
-
*/
|
767 |
-
function wp_mail_plugin_action_links( $links, $file ) {
|
768 |
-
|
769 |
-
if ( plugin_basename( __FILE__ ) !== $file ) {
|
770 |
-
return $links;
|
771 |
-
}
|
772 |
-
|
773 |
-
$settings_link = '<a href="options-general.php?page=' . plugin_basename( __FILE__ ) . '">' . esc_html__( 'Settings', 'wp-mail-smtp' ) . '</a>';
|
774 |
-
|
775 |
-
array_unshift( $links, $settings_link );
|
776 |
-
|
777 |
-
return $links;
|
778 |
-
}
|
779 |
-
|
780 |
-
/**
|
781 |
-
* Awesome Motive Notifications.
|
782 |
-
*
|
783 |
-
* @since 0.11
|
784 |
-
*/
|
785 |
-
function wp_mail_smtp_am_notifications() {
|
786 |
-
|
787 |
-
$is_hidden = get_option( 'wp_mail_smtp_am_notifications_hidden', '' );
|
788 |
-
|
789 |
-
if ( 'true' === $is_hidden ) {
|
790 |
return;
|
791 |
}
|
792 |
-
|
793 |
-
if ( ! class_exists( 'WPMS_AM_Notification' ) ) {
|
794 |
-
require_once dirname( __FILE__ ) . '/class-wpms-am-notification.php';
|
795 |
-
}
|
796 |
-
|
797 |
-
new WPMS_AM_Notification( 'smtp', WPMS_PLUGIN_VER );
|
798 |
}
|
799 |
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
* @since 0.11
|
806 |
-
*
|
807 |
-
* @return bool
|
808 |
-
*/
|
809 |
-
function wp_mail_smtp_is_pepipost_active() {
|
810 |
-
return apply_filters( 'wp_mail_smtp_options_is_pepipost_active', 'pepipost' === get_option( 'mailer' ) );
|
811 |
}
|
812 |
|
813 |
/**
|
814 |
-
*
|
|
|
815 |
*
|
816 |
-
* @since 0.
|
817 |
*/
|
818 |
-
|
819 |
-
|
820 |
-
// Display for PHP below 5.3.
|
821 |
-
if ( version_compare( PHP_VERSION, '5.3.0', '>=' ) ) {
|
822 |
-
return;
|
823 |
-
}
|
824 |
-
|
825 |
-
// Display for admins only.
|
826 |
-
if ( ! is_super_admin() ) {
|
827 |
-
return;
|
828 |
-
}
|
829 |
-
|
830 |
-
// Display on Dashboard page only.
|
831 |
-
if ( isset( $GLOBALS['pagenow'] ) && 'index.php' !== $GLOBALS['pagenow'] ) {
|
832 |
-
return;
|
833 |
-
}
|
834 |
-
|
835 |
-
echo '<div class="notice notice-error">' .
|
836 |
-
'<p>' .
|
837 |
-
sprintf(
|
838 |
-
/* translators: %1$s - WP Mail SMTP plugin name; %2$s - opening a link tag; %3$s - closing a link tag. */
|
839 |
-
esc_html__(
|
840 |
-
'Your site is running an outdated version of PHP that is no longer supported and may cause issues with %1$s. %2$sRead more%3$s for additional information.',
|
841 |
-
'wpforms'
|
842 |
-
),
|
843 |
-
'<strong>WP Mail SMTP</strong>',
|
844 |
-
'<a href="https://wpforms.com/docs/supported-php-version/" target="_blank">',
|
845 |
-
'</a>'
|
846 |
-
) .
|
847 |
-
'</p>' .
|
848 |
-
'</div>';
|
849 |
-
}
|
850 |
-
|
851 |
-
add_action( 'admin_notices', 'wp_mail_smtp_check_php_version' );
|
852 |
-
|
853 |
-
// Add an action on phpmailer_init.
|
854 |
-
add_action( 'phpmailer_init', 'phpmailer_init_smtp' );
|
855 |
|
856 |
-
|
857 |
-
// Whitelist our options.
|
858 |
-
add_filter( 'whitelist_options', 'wp_mail_smtp_whitelist_options' );
|
859 |
-
// Add the create pages options.
|
860 |
-
add_action( 'admin_menu', 'wp_mail_smtp_menus' );
|
861 |
-
// Add an activation hook for this plugin.
|
862 |
-
register_activation_hook( __FILE__, 'wp_mail_smtp_activate' );
|
863 |
-
// Adds "Settings" link to the Plugins page.
|
864 |
-
add_filter( 'plugin_action_links', 'wp_mail_plugin_action_links', 10, 2 );
|
865 |
}
|
866 |
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
load_plugin_textdomain( 'wp-mail-smtp', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
|
1 |
<?php
|
2 |
/**
|
3 |
* Plugin Name: WP Mail SMTP
|
4 |
+
* Version: 1.5.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: /assets/languages
|
12 |
*/
|
13 |
|
14 |
/**
|
15 |
+
* @author WPForms
|
16 |
+
* @copyright WPForms, 2007-19, 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 |
/**
|
22 |
* Setting options in wp-config.php
|
23 |
*
|
55 |
*/
|
56 |
|
57 |
/**
|
58 |
+
* Don't allow multiple versions of 1.5.x (Lite and Pro) and above to be active.
|
|
|
59 |
*
|
60 |
+
* @since 1.5.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
*/
|
62 |
+
if ( function_exists( 'wp_mail_smtp' ) ) {
|
63 |
+
|
64 |
+
if ( ! function_exists( 'wp_mail_smtp_deactivate' ) ) {
|
65 |
+
/**
|
66 |
+
* Deactivate if plugin already activated.
|
67 |
+
* Needed when transitioning from 1.5+ Lite to Pro.
|
68 |
+
*
|
69 |
+
* @since 1.5.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
*/
|
71 |
+
function wp_mail_smtp_deactivate() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
|
73 |
+
deactivate_plugins( plugin_basename( __FILE__ ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
}
|
|
|
|
|
|
|
|
|
75 |
}
|
76 |
+
add_action( 'admin_init', 'wp_mail_smtp_deactivate' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
|
78 |
+
// Do not process the plugin code further.
|
79 |
+
return;
|
80 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
|
82 |
+
if ( ! function_exists( 'wp_mail_smtp_check_pro_loading_allowed' ) ) {
|
83 |
/**
|
84 |
+
* Don't allow 1.4.x and below to break when 1.5+ Pro is activated.
|
85 |
+
* This will stop the current plugin from loading and display a message in admin area.
|
|
|
86 |
*
|
87 |
+
* @since 1.5.0
|
88 |
*/
|
89 |
+
function wp_mail_smtp_check_pro_loading_allowed() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
|
91 |
+
// Check for pro without using wp_mail_smtp()->is_pro(), because at this point it's too early.
|
92 |
+
if ( ! is_readable( rtrim( plugin_dir_path( __FILE__ ), '/\\' ) . '/src/Pro/Pro.php' ) ) {
|
93 |
+
// Currently, not a pro version of the plugin is loaded.
|
94 |
+
return false;
|
95 |
}
|
96 |
|
97 |
+
if ( ! function_exists( 'is_plugin_active' ) ) {
|
98 |
+
require_once ABSPATH . '/wp-admin/includes/plugin.php';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
}
|
100 |
|
101 |
+
// Search for old plugin name.
|
102 |
+
if ( is_plugin_active( 'wp-mail-smtp/wp_mail_smtp.php' ) ) {
|
103 |
+
// As Pro is loaded and Lite too - deactivate *silently* itself not to break older SMTP plugin.
|
104 |
+
deactivate_plugins( plugin_basename( __FILE__ ) );
|
|
|
105 |
|
106 |
+
add_action( 'admin_notices', 'wp_mail_smtp_lite_deactivation_notice' );
|
|
|
|
|
|
|
107 |
|
108 |
+
return true;
|
|
|
109 |
}
|
110 |
|
111 |
+
return false;
|
112 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
|
114 |
+
if ( ! function_exists( 'wp_mail_smtp_lite_deactivation_notice' ) ) {
|
115 |
+
/**
|
116 |
+
* Display the notice after deactivation.
|
117 |
+
*
|
118 |
+
* @since 1.5.0
|
119 |
+
*/
|
120 |
+
function wp_mail_smtp_lite_deactivation_notice() {
|
121 |
|
122 |
+
echo '<div class="notice notice-warning"><p>' . esc_html__( 'Please deactivate the free version of the WP Mail SMTP plugin before activating WP Mail SMTP Pro.', 'wp-mail-smtp' ) . '</p></div>';
|
|
|
|
|
|
|
123 |
|
124 |
+
if ( isset( $_GET['activate'] ) ) { // phpcs:ignore
|
125 |
+
unset( $_GET['activate'] ); // phpcs:ignore
|
|
|
126 |
}
|
127 |
}
|
|
|
|
|
128 |
}
|
|
|
129 |
|
130 |
+
// Stop the plugin loading.
|
131 |
+
if ( wp_mail_smtp_check_pro_loading_allowed() === true ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
return;
|
133 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
134 |
}
|
135 |
|
136 |
+
if ( ! defined( 'WPMS_PLUGIN_VER' ) ) {
|
137 |
+
define( 'WPMS_PLUGIN_VER', '1.5.0' );
|
138 |
+
}
|
139 |
+
if ( ! defined( 'WPMS_PHP_VER' ) ) {
|
140 |
+
define( 'WPMS_PHP_VER', '5.3.6' );
|
|
|
|
|
|
|
|
|
|
|
|
|
141 |
}
|
142 |
|
143 |
/**
|
144 |
+
* Newer PHP version 5.3+ will be handled a lot differently,
|
145 |
+
* with better code and newer logic.
|
146 |
*
|
147 |
+
* @since 1.0.0
|
148 |
*/
|
149 |
+
if ( version_compare( phpversion(), WPMS_PHP_VER, '>=' ) ) {
|
150 |
+
require_once dirname( __FILE__ ) . '/wp-mail-smtp.php';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
151 |
|
152 |
+
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
153 |
}
|
154 |
|
155 |
+
/**
|
156 |
+
* PHP 5.2 only.
|
157 |
+
*/
|
158 |
+
require_once dirname( __FILE__ ) . '/wp-mail-smtp-0.11.2.php';
|
|