Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@ $variables = [
$subscriber->sendTransactionalEmail($emails, $emailTemplateId, $variables);
```

### Mailchimp options unsubscribing

Mailchimp does not support unsubscribing a user from a list with their email address, we throw an `UnsupportedUnsubscribePlatformException`.

## YMLP

### YMLP options subscriber
Expand All @@ -228,6 +232,10 @@ For getting your additional fields ID: see https://www.ymlp.com/api/Fields.GetLi

YMLP does not support transactional email, we throw an `UnsupportedTransactionalEmailPlatformException`.

### YMLP options unsubscribing

YMLP does not support unsubscribing a user from a list with their email address, we throw an `UnsupportedUnsubscribePlatformException`.

## Brevo

### Brevo subscriber options
Expand Down Expand Up @@ -286,6 +294,19 @@ $variables = [
$subscriber->sendTransactionalEmail($emails, $templateEmail, $variables);
```

### Brevo options unsubscribing

See https://developers.brevo.com/reference/removecontactfromlist

```php
$subscriber = $factory->createFor('brevo');
// Brevo only requires an API Key
$subscriber->setApiKey('brevo_api_key');
// Use Just One list Id in same time for remove contact from a list
$subscriber->setContactListId('3');
$subscriber->unsubscribe('jimmy98@example.com');
```

## Mailjet

### Mailjet subscriber options
Expand Down Expand Up @@ -322,4 +343,49 @@ $variables = [
'personalmessage' => 'Happy birthday!'
];
$subscriber->sendTransactionalEmail($emails, $templateEmail, $variables);
```

### MailJet options unsubscribing

MailJet does not support unsubscribing a user from a list with their email address, we throw an `UnsupportedUnsubscribePlatformException`.


## OxiMailing

### OxiMailing subscriber options

```php
$subscriber = $factory->createFor('oximailing');
// OxiMailing requires an API Key and an API Secret
$subscriber->setApiKey('oximailing_api_key');
$subscriber->setApiSecret('oximailing_api_secret')
// OxiMailing list identifiers are int. You can only subscribe user to one list
$subscriber->setContactListId('123');
// OxiMailing Accept 3 modes
//Allows you to explain what to do with new duplicates :
//- ignore : remove duplicates
//- insert : don't do anything (all contacts are imported even duplicates)
//- update : update existing contacts information rather than adding duplicates
// Defaults to mode: ignore
$subscriber->subscribe('hello@super.test');
// You can override subscription mode using options array
$subscriber->subscribe('hello@super.test', ['mode' => 'update']);
```

### OxiMailing sender transactional email options

OxiMailing does not support transactional email, we throw an `UnsupportedTransactionalEmailPlatformException`.

### OxiMailing options unsubscribing

See https://api.oximailing.com/doc/#/contacts/delete_lists__ListId__contacts

```php
$subscriber = $factory->createFor('oximailing');
// OxiMailing requires an API Key and an API Secret
$subscriber->setApiKey('oximailing_api_key');
$subscriber->setApiSecret('oximailing_api_secret')
// You can only unsubscribe one user to one list
$subscriber->setContactListId('123');
$subscriber->unsubscribe('jimmy98@example.com');
```
23 changes: 23 additions & 0 deletions bruno/subscribeme/Brevo/Add existing contacts to a list.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
meta {
name: Add existing contacts to a list
type: http
seq: 2
}

post {
url: {{brevo_base_url}}/v3/contacts/lists/:listId/contacts/add
body: json
auth: none
}

params:path {
listId:
}

body:json {
{
"emails": [
"john.smith@contact.com"
]
}
}
16 changes: 16 additions & 0 deletions bruno/subscribeme/Brevo/Get all the lists.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
meta {
name: Get all the lists
type: http
seq: 1
}

get {
url: {{brevo_base_url}}/v3/contacts/lists
body: none
auth: basic
}

auth:basic {
username: {{brevo_login}}
password: {{brevo_password}}
}
15 changes: 15 additions & 0 deletions bruno/subscribeme/Brevo/Get contacts in a list.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
meta {
name: Get contacts in a list
type: http
seq: 3
}

get {
url: {{brevo_base_url}}/v3/contacts/lists/:listId/contacts
body: none
auth: none
}

params:path {
listId:
}
25 changes: 25 additions & 0 deletions bruno/subscribeme/Brevo/Remove a contacts from a list.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
meta {
name: Remove a contacts from a list
type: http
seq: 4
}

post {
url: {{brevo_base_url}}/v3/contacts/lists/:listId/contacts/remove
body: json
auth: none
}

params:path {
listId:
}

headers {
content-type: application/json
}

body:json {
{
"emails": "john.smith@contact.com"
}
}
26 changes: 26 additions & 0 deletions bruno/subscribeme/MailChimp/Add member to list.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
meta {
name: Add member to list
type: http
seq: 2
}

post {
url: {{mailchimp_base_url}}/lists/:listId/members
body: json
auth: basic
}

params:path {
listId: 123
}

auth:basic {
username: {{mailchimp_login}}
password: {{mailchimp_password}}
}

body:json {
{
"email_address": "john.smith@contact.com"
}
}
16 changes: 16 additions & 0 deletions bruno/subscribeme/MailChimp/Get all lists.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
meta {
name: Get all lists
type: http
seq: 3
}

get {
url: {{mailchimp_base_url}}/lists/
body: none
auth: basic
}

auth:basic {
username: {{mailchimp_login}}
password: {{mailchimp_password}}
}
16 changes: 16 additions & 0 deletions bruno/subscribeme/MailChimp/List members info.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
meta {
name: List members info
type: http
seq: 1
}

get {
url: {{mailchimp_base_url}}/lists/:listId/members
body: none
auth: basic
}

auth:basic {
username: {{mailchimp_login}}
password: {{mailchimp_password}}
}
11 changes: 11 additions & 0 deletions bruno/subscribeme/MailJet/Add contact in a list.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
meta {
name: Add contact in a list
type: http
seq: 2
}

post {
url: {{mailjet_base_url}}
body: none
auth: none
}
15 changes: 15 additions & 0 deletions bruno/subscribeme/MailJet/Get contacts in a list.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
meta {
name: Get contacts in a list
type: http
seq: 3
}

get {
url: {{mailjet_base_url}}/v3/REST/contactslist/:listId
body: none
auth: none
}

params:path {
listId:
}
16 changes: 16 additions & 0 deletions bruno/subscribeme/MailJet/Get contactsList.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
meta {
name: Get contactsList
type: http
seq: 1
}

get {
url: {{mailjet_base_url}}/v3/REST/contactslist/
body: none
auth: basic
}

auth:basic {
username: {{mailjet_login}}
password: {{mailjet_password}}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
meta {
name: Add new contacts into the specified list.
type: http
seq: 1
}

post {
url: {{oximailing_base_url}}/lists/:listId/contacts?contacts={"email1@example.com":{"customerName":"Dupont","customerId":123}} &method=ignore
body: none
auth: basic
}

params:query {
contacts: {"email1@example.com":{"customerName":"Dupont","customerId":123}}
method: ignore
}

params:path {
listId: 841
}

auth:basic {
username: {{oximailing_login}}
password: {{oximailing_password}}
}

body:json {
{
"contacts" : {
"email@rezo-zero.com": {
"firstName": "firstName",
"lastName": "lastName"
}
},
"mode" : "ignore"
}
}

body:multipart-form {
~contacts: {"email1@example.com":{"customerName":"Dupont","customerId":123}}
~mode: ignore
}
28 changes: 28 additions & 0 deletions bruno/subscribeme/OxiMailing/Delete the specified contacts..bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
meta {
name: Delete the specified contacts.
type: http
seq: 3
}

delete {
url: {{oximailing_base_url}}/lists/:listId/contacts?emails=email1@example.com
body: none
auth: basic
}

params:query {
emails: email1@example.com
}

params:path {
listId: 841
}

auth:basic {
username: {{oximailing_login}}
password: {{oximailing_password}}
}

body:multipart-form {
emails: email1@example.com
}
16 changes: 16 additions & 0 deletions bruno/subscribeme/OxiMailing/Get your contact lists..bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
meta {
name: Get your contact lists.
type: http
seq: 4
}

get {
url: {{oximailing_base_url}}/lists
body: none
auth: basic
}

auth:basic {
username: {{oximailing_login}}
password: {{oximailing_password}}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
meta {
name: Get your contacts in the specified list.
type: http
seq: 2
}

get {
url: {{oximailing_base_url}}/lists/:listId/contacts
body: none
auth: basic
}

params:path {
listId: 841
}

auth:basic {
username: {{oximailing_login}}
password: {{oximailing_password}}
}
Loading
Loading