Package Data | |
---|---|
Maintainer Username: | jzpeepz |
Maintainer Contact: | jonathan@flex360.com (Jonathan Peoples) |
Package Create Date: | 2016-11-22 |
Package Last Update: | 2019-06-18 |
Home Page: | |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-23 03:26:06 |
Package Statistics | |
---|---|
Total Downloads: | 1,652 |
Monthly Downloads: | 2 |
Daily Downloads: | 0 |
Total Stars: | 5 |
Total Watchers: | 2 |
Total Forks: | 4 |
Total Open Issues: | 0 |
Install via Composer:
composer require jzpeepz/adestra
Include the service provider in your config/app.php
:
Jzpeepz\Adestra\AdestraServiceProvider::class
Publish the Adestra config file:
php artisan vendor:publish --tag=adestra
Below are descriptions of the configuration values found in the the adestra.php config file.
account
This is the account name found on the login screen.
username
This is your username.
password
This is your password.
core_table_id
This is the id of the core table where your contacts are stored.
list_id
Optional. This is just a nice place to store your main list id.
$list_id = 15;
$contact = AdestraContact::make(['email' => 'me@emailplace.com']);
$result = $contact->subscribe($list_id);
$list_id = 15;
$contact = AdestraContact::make(['email' => 'me@emailplace.com']);
$result = $contact->unsubscribe($list_id);
Returns an array of ids of the lists a contact is on.
$lists = AdestraContact::make(['email' => 'me@emailplace.com'])
->lists();
$campaign = AdestraCampaign::make([
'name' => 'My Campaign',
'description' => 'My New Campaign',
'project_id' => 31,
'list_id' => $list_id,
])
->create();
$campaign = AdestraCampaign::find($campaign_id);
$campaign = $campaign->update([
'name' => 'My Campaign',
'description' => 'My New Campaign',
'project_id' => 31,
'list_id' => $list_id,
]);
$campaign->setAllOptions([
'subject_line' => 'My Subject',
'domain' => 'email.mydomain.com',
'from_prefix' => 'mail',
'from_name' => 'My Company',
'auto_tracking' => 1,
'user_from' => 1,
'from_address' => 'me@emailplace.com',
]);
HTML: $campaign->setMessage('html', $html);
Text: $campaign->setMessage('text', $text);
$campaign->publish();
$campaign->sendTest('me@emailplace.com');
This also allows for a comma separated list:
$campaign->sendTest('me@emailplace.com,you@emailplace.com');
$campaign->launch([
'launch_label' => 'My Launch',
'date_scheduled' => date('c'),
]);