Skip to content
This repository was archived by the owner on Dec 18, 2022. It is now read-only.

Commit ac935db

Browse files
Adds readme
1 parent d6bbea1 commit ac935db

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
### Mautic API Helper
2+
3+
Requires the [Mautic Simple Mail](https://github.com/barnebys/MauticSimpleEmailBundle) plugin to be installed.
4+
5+
#### With basic auth
6+
7+
```
8+
BarnebysMautic\Auth::initializeHttpBasic('username', 'password');
9+
BarnebysMautic\Api::setBaseUrl('https://my.mautic.domain/api');
10+
```
11+
12+
### With oauth
13+
14+
```
15+
BarnebysMautic\Auth::initializeOAuth2
16+
```
17+
18+
### Fetch a contact id by email
19+
```
20+
$data = BarnebysMautic\Api::getContactIdByMail('[email protected]');
21+
```
22+
23+
### Other available methods
24+
```
25+
getContactIdByMail($mail)
26+
sendToLead($mail, $templateId)
27+
sendToContact($mail, $templateId)
28+
```

0 commit comments

Comments
 (0)