-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.php
55 lines (41 loc) · 1.42 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
header('Content-Type: text/html; charset=utf-8');
require_once 'Akna.php';
$user = '';
$pass = '';
$akna = new Akna( $user, $pass );
$contacts = $akna->emailMarketing->contacts;
$messages = $akna->emailMarketing->messages;
$campaigns = $akna->emailMarketing->campaigns;
try {
// $result_1 = $contacts->get('[email protected]', 'Apiki 1');
// var_dump($result_1);
// $result_2 = $contacts->getLists();
// var_dump($result_2);
// $result_3 = $messages->create( array(
// 'nome' => 'Teste',
// 'html' => htmlspecialchars( '<h1>Curso à distância</h1>' )
// ) );
// var_dump($result_3);
// $result_4 = $messages->test( array(
// 'titulo' => 'Teste',
// 'email_remetente' => '[email protected]',
// 'assunto' => 'Teste de envio 15.07',
// 'email' => '[email protected]'
// ) );
// var_dump($result_4);
// $result_5 = $campaigns->addAction( array(
// 'nome' => 'Itaú 6',
// 'mensagem' => 'Teste',
// 'data_encerramento' => '2013-07-30',
// 'nome_remetente' => 'CESP - Relações com Investidores',
// 'email_remetente' => '[email protected]',
// 'email_retorno' => '[email protected]',
// 'assunto' => 'Assunto 1',
// 'lista' => array( 'Apiki 1', 'Apiki 2' ),
// 'agendar' => array( 'datahora' => date( 'Y-m-d H:i:s' ) )
// ) );
// var_dump($result_5);
} catch( Akna_Exception $e ){
echo $e->getmessage();
}