Changeset 1895322
- Timestamp:
- 06/19/2018 07:02:57 PM (8 years ago)
- Location:
- ninja-mail
- Files:
-
- 22 added
- 5 edited
-
tags/1.0.1 (added)
-
tags/1.0.1/CONTRIBUTING.md (added)
-
tags/1.0.1/README.md (added)
-
tags/1.0.1/bootstrap.php (added)
-
tags/1.0.1/includes (added)
-
tags/1.0.1/includes/admin.php (added)
-
tags/1.0.1/includes/app (added)
-
tags/1.0.1/includes/app/logger.php (added)
-
tags/1.0.1/includes/app/mailer.php (added)
-
tags/1.0.1/includes/app/service.php (added)
-
tags/1.0.1/includes/functions.php (added)
-
tags/1.0.1/includes/plugin.php (added)
-
tags/1.0.1/includes/resources (added)
-
tags/1.0.1/includes/resources/views (added)
-
tags/1.0.1/includes/resources/views/admin-mail-log.html.php (added)
-
tags/1.0.1/includes/tests.php (added)
-
tags/1.0.1/lib (added)
-
tags/1.0.1/lib/wordpress (added)
-
tags/1.0.1/lib/wordpress/mailer.php (added)
-
tags/1.0.1/lib/wordpress/plugin.php (added)
-
tags/1.0.1/ninja-mail.php (added)
-
tags/1.0.1/readme.txt (added)
-
trunk/README.md (modified) (1 diff)
-
trunk/includes/app/mailer.php (modified) (3 diffs)
-
trunk/includes/app/service.php (modified) (4 diffs)
-
trunk/ninja-mail.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ninja-mail/trunk/README.md
r1891096 r1895322 2 2 3 3 A transactional email service for Ninja Forms. 4 5 ## Development with a local server 6 7 When developing with a local copy of the Ninja Mail server, be sure to filter `https_ssl_verify`. 8 9 ```php 10 add_filter( 'https_local_ssl_verify', '__return_false' ); 11 add_filter( 'https_ssl_verify', '__return_false' ); 12 ```. -
ninja-mail/trunk/includes/app/mailer.php
r1891096 r1895322 68 68 'message' => $this->Body, 69 69 'text' => $this->AltBody 70 ] 70 ], 71 71 ]; 72 72 … … 77 77 $response = wp_remote_post( $this->server_url, $args ); 78 78 79 // Check for the server response and maybe fallback to phpmailer. 80 if( 200 !== wp_remote_retrieve_response_code( $response ) ) { 81 return $this->phpmailer->send(); 82 } 83 79 84 /** 80 85 * @param array $args The request arguments. … … 83 88 do_action( 'ninja_mail_send', $args, $response ); 84 89 85 return true; // Assume that the non-blocking request was successful.90 return true; // Sent by the Service. 86 91 } 87 92 -
ninja-mail/trunk/includes/app/service.php
r1891126 r1895322 15 15 16 16 public function setup() { 17 17 18 add_action( 'ninja_forms_oauth_disconnect', [ $this, 'disconnect' ] ); 18 19 add_filter( 'ninja_forms_services', [ $this, 'register_service' ] ); 19 20 add_action( 'wp_ajax_nf_service_ninja-mail', [ $this, 'sync_service' ] ); 20 add_filter( 'ninja-forms-dashboard-promotions', [ $this, 'remove_promotion' ] ); 21 22 if( $this->is_service_enabled() ){ 23 add_filter( 'ninja-forms-dashboard-promotions', [ $this, 'remove_promotion' ] ); 24 } 25 21 26 return $this; 22 27 } … … 36 41 'name' => __( 'Ninja Mail - Transactional Email', 'ninja-mail' ), 37 42 'slug' => 'ninja-mail', 38 'description' => 'Increase Email Deliverability with a dedicated email service by Ninja Forms .',43 'description' => 'Increase Email Deliverability with a dedicated email service by Ninja Forms for only $5/month/site.', 39 44 'connect_url' => \NinjaForms\OAuth::connect_url( 'txnmail/app' ), 40 45 'successMessage' => '<div style="padding:0 20px 20xp"><h2>You did it!</h2> … … 54 59 ]; 55 60 } else { 56 $services[ 'ninja-mail' ][ 'enabled' ] = false; 61 $services[ 'ninja-mail' ][ 'learnMoreTitle' ] = 'Improve Ninja Forms Email Reliability!'; 62 $services[ 'ninja-mail' ][ 'learnMore' ] = ' 63 <div style="padding:20px;"> 64 <h2>Frustrated that Ninja Forms email isn’t being received?</h2> 65 <p>Form submission notifications not hitting your inbox? Some of your visitors getting form feedback via email, others not? By default, your WordPress site sends emails through your web host, which can be unreliable. Your host has spent lots of time and money optimizing to serve your pages, not send your emails.</p> 66 <h3>Sign up for Ninja Mail today, and never deal with form email issues again!</h3> 67 <p>Ninja Mail is a transactional email service that removes your web host from the email equation.</p> 68 <ul style="list-style-type:initial;margin-left: 20px;"> 69 <li>Sends email through dedicated email service, increasing email deliverability.</li> 70 <li>Keeps form submission emails out of spam by using a trusted email provider.</li> 71 <li>On a shared web host? Don’t worry about emails being rejected because of blocked IP addresses.</li> 72 <li><strong>Only $5/month. Free 14-day trial. Cancel anytime!</strong></li> 73 </ul> 74 <br /> 75 <button style="display:block;width:100%;text-align:center;" class="nf-button primary" onclick="Backbone.Radio.channel( \'dashboard\' ).request( \'install:service\', \'ninja-mail\' );var spinner = document.createElement(\'span\'); spinner.classList.add(\'dashicons\', \'dashicons-update\', \'dashicons-update-spin\'); this.innerHTML = spinner.outerHTML; console.log( spinner )">SIGNUP FOR NINJA MAIL NOW!</button> 76 </div> 77 '; 57 78 $services[ 'ninja-mail' ][ 'serviceLink' ] = [ 58 79 'text' => 'Setup', … … 85 106 protected function is_service_enabled() { 86 107 $args = []; 87 if( defined( 'WP_DEBUG' ) && WP_DEBUG ) $args[ 'sslverify' ] = false;88 108 $response = wp_remote_get( $this->base_url . \NinjaForms\OAuth::get_client_id(), $args ); 89 109 $service_data = json_decode( wp_remote_retrieve_body( $response ) ); -
ninja-mail/trunk/ninja-mail.php
r1891096 r1895322 5 5 * Plugin URI: http://ninjaforms.com/ 6 6 * Description: A transactional email service for Ninja Forms. 7 * Version: 1.0 7 * Version: 1.0.1 8 8 * Author: Ninja Forms 9 9 * Author URI: http://ninjaforms.com … … 17 17 require_once( plugin_dir_path( __FILE__ ) . 'bootstrap.php' ); 18 18 19 \NinjaMail\Plugin::getInstance()->setup( '1.0 ', __FILE__ );19 \NinjaMail\Plugin::getInstance()->setup( '1.0.1', __FILE__ ); 20 20 21 21 register_activation_hook( __FILE__, function() { -
ninja-mail/trunk/readme.txt
r1891096 r1895322 5 5 Requires at least: 4.7 6 6 Tested up to: 4.9 7 Stable Tag: 1.0 7 Stable Tag: 1.0.1 8 8 License: GPLv2 or later 9 9 … … 35 35 == Upgrade Notice == 36 36 37 * Initial release. 37 *Changes:* 38 39 * Add a fallback for when mail isn't sent by the service, ie Unauthorized account. 40 * Persist sign-up prompts until sign-up is complete. 41 * Removed development specific code. 38 42 39 43 == Changelog == 40 44 41 = 1.0.0 = 45 = 1.0.1 (19 June 2018) = 46 47 *Changes:* 48