💦 FULL SET: Changeset/ - Full Archive

Changeset 1895322


Ignore:
Timestamp:
06/19/2018 07:02:57 PM (8 years ago)
Author:
kstover
Message:

Updating to version 1.0.1. See changelog for details.

Location:
ninja-mail
Files:
22 added
5 edited

Legend:

Unmodified
Added
Removed
  • ninja-mail/trunk/README.md

    r1891096 r1895322  
    22
    33A transactional email service for Ninja Forms.
     4
     5## Development with a local server
     6
     7When developing with a local copy of the Ninja Mail server, be sure to filter `https_ssl_verify`.
     8
     9```php
     10add_filter( 'https_local_ssl_verify', '__return_false' );
     11add_filter( 'https_ssl_verify', '__return_false' );
     12```.
  • ninja-mail/trunk/includes/app/mailer.php

    r1891096 r1895322  
    6868        'message' => $this->Body,
    6969        'text' => $this->AltBody
    70       ]
     70      ],
    7171    ];
    7272
     
    7777    $response = wp_remote_post( $this->server_url, $args );
    7878
     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
    7984    /**
    8085     * @param array $args The request arguments.
     
    8388    do_action( 'ninja_mail_send', $args, $response );
    8489
    85     return true; // Assume that the non-blocking request was successful.
     90    return true; // Sent by the Service.
    8691  }
    8792
  • ninja-mail/trunk/includes/app/service.php

    r1891126 r1895322  
    1515
    1616  public function setup() {
     17
    1718    add_action( 'ninja_forms_oauth_disconnect', [ $this, 'disconnect' ] );
    1819    add_filter( 'ninja_forms_services', [ $this, 'register_service' ] );
    1920    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
    2126    return $this;
    2227  }
     
    3641      'name' => __( 'Ninja Mail - Transactional Email', 'ninja-mail' ),
    3742      '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.',
    3944      'connect_url' => \NinjaForms\OAuth::connect_url( 'txnmail/app' ),
    4045      'successMessage' => '<div style="padding:0 20px 20xp"><h2>You did it!</h2>
     
    5459      ];
    5560    } 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      ';
    5778      $services[ 'ninja-mail' ][ 'serviceLink' ] = [
    5879        'text' => 'Setup',
     
    85106  protected function is_service_enabled() {
    86107    $args = [];
    87     if( defined( 'WP_DEBUG' ) && WP_DEBUG ) $args[ 'sslverify' ] = false;
    88108    $response = wp_remote_get( $this->base_url . \NinjaForms\OAuth::get_client_id(), $args );
    89109    $service_data = json_decode( wp_remote_retrieve_body( $response ) );
  • ninja-mail/trunk/ninja-mail.php

    r1891096 r1895322  
    55 * Plugin URI: http://ninjaforms.com/
    66 * Description: A transactional email service for Ninja Forms.
    7  * Version: 1.0
     7 * Version: 1.0.1
    88 * Author: Ninja Forms
    99 * Author URI: http://ninjaforms.com
     
    1717  require_once( plugin_dir_path( __FILE__ ) . 'bootstrap.php' );
    1818
    19   \NinjaMail\Plugin::getInstance()->setup( '1.0', __FILE__ );
     19  \NinjaMail\Plugin::getInstance()->setup( '1.0.1', __FILE__ );
    2020
    2121  register_activation_hook( __FILE__, function() {
  • ninja-mail/trunk/readme.txt

    r1891096 r1895322  
    55Requires at least: 4.7
    66Tested up to: 4.9
    7 Stable Tag: 1.0
     7Stable Tag: 1.0.1
    88License: GPLv2 or later
    99
     
    3535== Upgrade Notice ==
    3636
    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.
    3842
    3943== Changelog ==
    4044
    41 = 1.0.0 =
     45= 1.0.1 (19 June 2018) =
     46
     47*Changes:*
     48