Giter Club home page Giter Club logo

yii2-newsletter-mailup's Introduction

yii2-newsletter-mailup

Latest Stable Version Total Downloads Latest Unstable Version License

Newsletter module to Yii2 - mailup integration

with this module you can collect email address and store in the mailup newsletter service

Installation

Preferred way to install is through Composer:

php composer.phar require grptx/yii2-newsletter-mailup:^1.0

Or, you may add

"grptx/yii2-newsletter-mailup": "^1.0"

to the require section of your composer.json file and execute php composer.phar update.

Configuration

...
'modules' => [
    'newsletter' => [
        'class' => 'grptx\newsletter\mailup\Module',
        'client_id'=>'<your-client-id>',
        'client_secret'=>'<your-client-secret>',
        'callback_uri'=>'http://127.0.0.1/index.php',
        'username'=>'<your-username>',
        'password'=>'<your-password>',
        'group'=><your-recipents-group>,
    ],
...
]

Usage

Go to your application in your browser

  • http://localhost/pathtoapp/newsletter
  • Or you can use an ajax call:
$.ajax({
    method:'post',
    url:'/newsletter/default/ajax-call',
    data:{
        email:'email',
        first_name:'first_name',
        last_name:'last_name'
    },
    success:function(data) {
        console.log(data);
        if(data[result]=='ok') {
            console.log('success');
        } else if(data['error']) {
            console.log(data['error']);            
        } else {
            console.log('generic error');
        }
    },
    error:function(data) {
        console.log(data);
    }
});

yii2-newsletter-mailup's People

Contributors

grptx avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.