Giter Club home page Giter Club logo

mailin-api-php's Introduction

SendinBlue Php Library

Note: The latest API V3.0 ( LTS ) is now maintained at https://github.com/sendinblue/ and the Documentation is available here https://developers.sendinblue.com

This is the SendinBlue Php library. It implements the various exposed APIs that you can read more about on https://apidocs.sendinblue.com.

SendinBlue API's use HTTP Authentication through an api key. You can create your api key from API Console, after you sign up for an account with SendinBlue. You must use latest version 2.0, access key, for accessing APIs.

Quickstart Guide

Learn how to send email campaigns from your application using SendinBlue API.

You must sign up for SendinBlue account for using APIs. All our APIs require HTTP authentication using access key, which are accessible from your API Console.

The following guides give you a start and understanding of how to use our API.

Support and Feedback

Be sure to visit the SendinBlue official documentation website for additional information about our API.

We also support Composer.

If you find a bug, please submit the issue in Github directly.

As always, if you need additional assistance, drop us a note here.

mailin-api-php's People

Contributors

armandth avatar dipankar avatar ekta-slit avatar elmahdi avatar naffiq avatar parvindersib avatar vipinslit avatar wallyhall avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mailin-api-php's Issues

Inline Images

I noticed that the API allows to send attachments, but I can't attach inline images. Doing some tests with your "Email campaign" section I saw that this is the way you add images to your mails.

I think it would be nice to add this feature to the Transactional Emails.

Thanks

Add a List Transactional email (templates)

By now, It's possible to Send a Template, Create a Template and Update a Template, but in order to send and update it's required to add the Template's id.

I think it would be nice to have a way to list all Transactional email (templates) in order to get the template's id.

Contact transactional attributes not being updated

Simple call:

$data = array( "email" => $order_email,
		"attributes" => array(
				"FIRST_NAME"=>$order_fname,
				"LAST_NAME"=>$order_lname,
				"PRODUCT"=>$service,
				"ORDER_ID"=>$order_id,
				"ORDER_DATE"=>$order->get_date_created()->__toString(),
				"ORDER_PRICE"=>$order->get_total()
				),
		"listid" => array($mailing_list_id)
);

$mailin->create_update_user($data);

Everytime a user completes an order on my website, I want that order info to be added to the transactional attributes I've set up (product, order_id, order_date, order_price). This only works the first time a user is added as a contact... every attempt thereafter (using the same user/contact email address) does not add another row to the contact's transactions.

I'm using v2 of the library.

Possible issue using Transactional email (templates)

Hello,
it looks like both send_transactional_template and update_template functions issue a PUT to https://api.sendinblue.com/v2.0/template/ and are updating the template passed as argument.

If I issue a curl request like this one :
url -H 'api-key:<my API key>' -X PUT -d '{"to":"[email protected]","from":"[email protected]","replyto":"[email protected]","subject":"My subject","attr":{"CIV":"Mister X","AMOUNT1":"416","AMOUNT2":25},"headers":{"Content-Type":"text\/html; charset=iso-8859-1","X-Mailin-Tag":"My TAG"}}' 'https://api.sendinblue.com/v2.0/template/6'

The webservice returns response
{"code":"success","message":"Updated the Template.","data":[]}

I probably missing something but I am not able to use send_transactional_template as described in the official documentation.

Thank in advance for your precious help.

Email event reports in Campaign

By now, is it possible to to get a really detailed report with "Email event reports" function in SMTP API. On the other hand, it isn't possible to get the same info from a Campaign since the report is handled directly from your site (mail with link).

I think it would be nice to be able to have something like a "Campaign Email event reports" in order to be able to build customized reports.

Thanks in advance

Can't update custom attribute value with SendInBlue API

Hi,
I can't succeed to update user's custom attribute value with SendInBlue API.
In fact, I want to update his firstname PRENOM and his last name Nom, but only his firstname is updated (PRENOM). The other custom attribute (Nom) is not updated at all, even if get_attributes() returns it well.
I have no error, it's just like the value of attribute Nom was ignored...

Here is my code:

$data = array(
    "email" => $email,
    "attributes" => $attributes,
    "listid" => array($liste['id'])				
);

var_dump($mailin->get_attributes());
var_dump($data);
var_dump($mailin->create_update_user($data));
// $mailin->get_attributes()
array(3) {
  ["code"]=>
  string(7) "success"
  ["message"]=>
  string(45) "All attributes and values have been retrieved"
  ["data"]=>
  array(5) {
    ["normal_attributes"]=>
    array(22) {
      [0]=>
      array(2) {
        ["name"]=>
        string(3) "Nom"
        ["type"]=>
        string(4) "text"
      }
      [1]=>
      array(2) {
        ["name"]=>
        string(6) "PRENOM"
        ["type"]=>
        string(4) "text"
      }
      ...
    }
    ...
  }
  ...
}


// $data
array(3) {
  ["email"]=>
  string(15) "[email protected]"
  ["attributes"]=>
  array(4) {
    ["Nom"]=>
    string(8) "last name"
    ["PRENOM"]=>
    string(10) "firstname"
    ["PRODUIT"]=>
    string(18) "product"
    ["GAMME_PRODUIT"]=>
    string(32) "product range"
  }
  ["listid"]=>
  array(1) {
    [0]=>
    string(2) "11"
  }
}


// $mailin->create_update_user($data)
array(3) {
  ["code"]=>
  string(7) "success"
  ["message"]=>
  string(27) "User created successfully. "
  ["data"]=>
  array(1) {
    ["id"]=>
    int(57197)
  }
}

Permission

Can I (include in a bundle for Symfony / modify) this file?

Regards.

Add option to specify message_id in get_report()

It would be really handy to be able to retrieve a report for a specific message_id.

I'm trying to integrate the API into an app that easily allows users to see if a specific message has been opened (I store the message_id after sending transactional emails).

Any plans for this?

Fix composer package on Packagist

Hi,

We cannot install the library using composer, like this :

composer require mailin-api/mailin-api-ph

Composer return :

Could not find package mailin-api/mailin-api-php at any version for your minimum-stability (stable). Check the package spelling or your minimum-stability

Add "IP address" parameter on create_update_user()

Would it be possible to include a new parameter "ip" on create_update_user()?

So I can include the user's IP address when I send emails to Sendinblue via a server script, else it is always logged the server's IP address in "Activity" tab.

Here is an example of how it can be:

$data = array( 
    "email" => $email,
    "listid" => array($listid),
    "ip" => $ip,
);
 
$output = $mailin->create_update_user($data);

Thank you.

Double Opt-in

There is any way to send double opt-in when subscribing user with user/createdituser action?

Permissions on Sendinblue API

Hello,

Would it be possible to create a Sendinblue API and then set permissions on it?

For example, I want to create a Sendinblue API but I want to disable the following abilities:

  • Export\import of emails
  • Delete operations

What do you think about these additions?

Thank you.

Add predefined parameters

There are many many parts in the API doc stating optional parameters, which ARE NOT implemented like this in the PHP API wrapper.

For example create_campaign: The API Docs state, that the exclude_list, the attachmentUrl and the inline_image are optional. Which they AREN'T in the method call, as there are no predefined values!

function create_campaign($category, $from_name, $name, $bat_sent = '', $html_content = '', $html_url = '', $listid, $scheduled_date = '',$subject, $from_email, $reply_to = '', $to_field = '', $exclude_list = array(), $attachmentUrl = '', $inline_image = 0) {

The other option would be to simply use an array as ways to easily parse out just the required parameters, and also be easier to enhance with further parameters or remove outdated parameters in the future.

In this case, said example could look like this:

function create_campaign( $campaign_params = array() ) {
return $this->post('campaign',json_encode( $campaign_params ) );
}

But in other cases, it would be something like as follows

function do_something_specific( $params = array() ) {
extract( $params ); // now we got all params extracted, but are just going to use the ones we REQUIRE. 
...
}

You also might want to take a look at the array combination function of WP for improved handling of this task: http://codex.wordpress.org/Function_Reference/wp_parse_args

cu, w0lf.

Include header in Send Transactional email (templates)

By now, is it possible to add a mail header when we send a Transactional email (without templates) so it's really useful to add tags and other custom fields.

$mailin->send_email($to,$subject,$from,$html,$text,$cc,$bcc,$replyto,$attachment,$headers)

I think it would be nice to add this option when we send Transactional email (templates)

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.