-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathiemail.php
61 lines (51 loc) · 1.58 KB
/
iemail.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
56
57
58
59
60
61
<?php
/**
* Implico Email Framework
*
* @author Bartosz Sak <[email protected]>
*
*/
if (php_sapi_name() != "cli") {
exit('This script can be run only from the command line.');
}
/*
DIRS
*/
//root dir
define('IE_ROOT_DIR', __DIR__ . DIRECTORY_SEPARATOR);
//core dir
define('IE_CORE_DIR', IE_ROOT_DIR.'core/');
//builders dir
define('IE_BUILDERS_DIR', IE_ROOT_DIR.'builders/');
//sample dir
define('IE_SAMPLES_DIR', IE_ROOT_DIR.'samples/');
//projects dir
define('IE_PROJECTS_DIR', getcwd() . DIRECTORY_SEPARATOR);//IE_ROOT_DIR.'/projects/');
//custom dir
define('IE_CUSTOM_DIR_NAME', '_custom');
define('IE_CUSTOM_DIR', IE_PROJECTS_DIR.'/' . IE_CUSTOM_DIR_NAME . '/');
//cache dir
define('IE_SMARTY_COMPILE_DIR', IE_ROOT_DIR.'.cache/');
//plugins dir
define('IE_SMARTY_PLUGINS_DIR', IE_CORE_DIR.'/plugins/');
//custom plugins dir
define('IE_SMARTY_CUSTOM_PLUGINS_DIR', IE_CUSTOM_DIR.'/plugins/');
ini_set('display_errors', 'off');
ini_set('date.timezone', 'Europe/London'); //anything to disable warnings
if (file_exists(IE_ROOT_DIR.'vendor/autoload.php')) {
require_once(IE_ROOT_DIR.'vendor/autoload.php');
}
else if (file_exists(IE_ROOT_DIR.'../../autoload.php')) {
require_once(IE_ROOT_DIR.'../../autoload.php');
}
else {
echo 'Project dependencies not found. Try re-installing.';
exit(1);
}
use Symfony\Component\Console\Application;
$app = new Application('Implico Email Framework');
$app->add(new \Implico\Email\Commands\Create());
$app->add(new \Implico\Email\Commands\Init());
$app->add(new \Implico\Email\Commands\Compile());
$app->add(new \Implico\Email\Commands\Send());
$app->run();