Version Notes
E-mail marketing made easy
Easily integrate with E-mark Mail in seconds to drive traffic and strengthen relationships with your clients.
Implemented with no effort, your contacts are synched to your E-mark Mail account, and abandoned cart triggered emails are activated simply by selecting the right campaign to send.
Transactional, Intelligent, Targeted email marketing has never been more powerfull!
You can request your account at www.emailmarketing.nl
Download this release
Release Info
Developer | E-mark |
Extension | e-mark_mail |
Version | 0.9.0 |
Comparing to | |
See all releases |
Version 0.9.0
- app/code/local/EM/Mbbwebservice/Helper/Config.php +15 -0
- app/code/local/EM/Mbbwebservice/Helper/Data.php +6 -0
- app/code/local/EM/Mbbwebservice/Model/Email/Template.php +149 -0
- app/code/local/EM/Mbbwebservice/Model/Mail.php +17 -0
- app/code/local/EM/Mbbwebservice/Model/Observer.php +106 -0
- app/code/local/EM/Mbbwebservice/etc/config.xml +151 -0
- app/code/local/EM/Mbbwebservice/etc/system.xml +93 -0
- app/etc/modules/EM_Mbbwebservice.xml +9 -0
- package.xml +34 -0
app/code/local/EM/Mbbwebservice/Helper/Config.php
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Emark
|
4 |
+
*/
|
5 |
+
class EM_Mbbwebservice_Helper_Config extends Mage_Core_Helper_Abstract{
|
6 |
+
|
7 |
+
const XML_PATH_ENABLED = 'mbbwebservice/general/enabled';
|
8 |
+
const XML_PATH_TEST = 'mbbwebservice/general/test';
|
9 |
+
const XML_PATH_TEST_ADDRESS = 'mbbwebservice/general/test_address';
|
10 |
+
const XML_PATH_SMTP_HOST = 'mbbwebservice/smtp/host';
|
11 |
+
const XML_PATH_SMTP_PORT = 'mbbwebservice/smtp/port';
|
12 |
+
const XML_PATH_SMTP_LOGIN = 'mbbwebservice/smtp/login';
|
13 |
+
const XML_PATH_SMTP_PASSWORD = 'mbbwebservice/smtp/password';
|
14 |
+
const XML_PATH_SMTP_SSL = 'mbbwebservice/smtp/ssl';
|
15 |
+
}
|
app/code/local/EM/Mbbwebservice/Helper/Data.php
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Emark
|
4 |
+
*/
|
5 |
+
class EM_Mbbwebservice_Helper_Data extends Mage_Core_Helper_Abstract{
|
6 |
+
}
|
app/code/local/EM/Mbbwebservice/Model/Email/Template.php
ADDED
@@ -0,0 +1,149 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Emark
|
5 |
+
*/
|
6 |
+
class EM_Mbbwebservice_Model_Email_Template extends Mage_Core_Model_Email_Template {
|
7 |
+
|
8 |
+
private $_saveRange = array();
|
9 |
+
|
10 |
+
protected function _saveMail($email, $name=null, array $variables = array()) {
|
11 |
+
Mage::getModel('mbbwebservice/mail')
|
12 |
+
->setSubject()
|
13 |
+
->setIsPlain()
|
14 |
+
->setBody()
|
15 |
+
->setFromEmail()
|
16 |
+
->setFromName()
|
17 |
+
->setToEmail()
|
18 |
+
->setToName()
|
19 |
+
->save();
|
20 |
+
|
21 |
+
return $this;
|
22 |
+
}
|
23 |
+
|
24 |
+
public function sendMail(EM_Mbbwebservice_Model_Mail $Mail, $config = NULL) {
|
25 |
+
|
26 |
+
if (is_null ($config))
|
27 |
+
{
|
28 |
+
$config = array('username' => Mage::getStoreConfig(EM_Mbbwebservice_Helper_Config::XML_PATH_SMTP_LOGIN),
|
29 |
+
'password' => Mage::getStoreConfig(EM_Mbbwebservice_Helper_Config::XML_PATH_SMTP_PASSWORD));
|
30 |
+
}
|
31 |
+
|
32 |
+
$config ['smtp'] = Mage::getStoreConfig(EM_Mbbwebservice_Helper_Config::XML_PATH_SMTP_HOST);
|
33 |
+
$config ['port'] = Mage::getStoreConfig(EM_Mbbwebservice_Helper_Config::XML_PATH_SMTP_PORT);
|
34 |
+
$config ['auth'] = 'login';
|
35 |
+
|
36 |
+
$ssl = Mage::getStoreConfig(EM_Mbbwebservice_Helper_Config::XML_PATH_SMTP_SSL);
|
37 |
+
|
38 |
+
if (! empty ($ssl))
|
39 |
+
{
|
40 |
+
$config ['ssl'] = $ssl;
|
41 |
+
}
|
42 |
+
|
43 |
+
$transport = new Zend_Mail_Transport_Smtp ($config ['smtp'], $config);
|
44 |
+
|
45 |
+
ini_set('SMTP', Mage::getStoreConfig('system/smtp/host'));
|
46 |
+
ini_set('smtp_port', Mage::getStoreConfig('system/smtp/port'));
|
47 |
+
|
48 |
+
$mail = $this->getMail();
|
49 |
+
|
50 |
+
$mail->addHeader ('X-Mailer', 'Emark-for-Magento/1.0', TRUE);
|
51 |
+
|
52 |
+
$mail->setSubject('=?utf-8?B?' . base64_encode($Mail->getSubject()) . '?=');
|
53 |
+
|
54 |
+
if(!empty($this->_saveRange)) {
|
55 |
+
foreach($this->_saveRange as $range) {
|
56 |
+
$mail->addTo($range['email'], '=?utf-8?B?' . base64_encode($range['name']) . '?=');
|
57 |
+
}
|
58 |
+
}
|
59 |
+
|
60 |
+
else {
|
61 |
+
$mail->addTo($Mail->getToEmail(), '=?utf-8?B?' . base64_encode($Mail->getToName()) . '?=');
|
62 |
+
}
|
63 |
+
|
64 |
+
$mail->setFrom($Mail->getFromEmail(), $Mail->getFromName());
|
65 |
+
|
66 |
+
if ($Mail->getIsPlain()) {
|
67 |
+
$mail->setBodyText($Mail->getBody());
|
68 |
+
} else {
|
69 |
+
$mail->setBodyHTML($Mail->getBody());
|
70 |
+
}
|
71 |
+
|
72 |
+
$this->setUseAbsoluteLinks(true);
|
73 |
+
|
74 |
+
try {
|
75 |
+
$mail->send($transport);
|
76 |
+
$this->_mail = null;
|
77 |
+
} catch (Exception $e) {
|
78 |
+
|
79 |
+
throw($e);
|
80 |
+
return false;
|
81 |
+
}
|
82 |
+
return true;
|
83 |
+
}
|
84 |
+
|
85 |
+
public function send($email, $name=null, array $variables = array()) {
|
86 |
+
|
87 |
+
if (!Mage::getStoreConfig(EM_Mbbwebservice_Helper_Config::XML_PATH_ENABLED)) {
|
88 |
+
return parent::send($email, $name, $variables);
|
89 |
+
}
|
90 |
+
|
91 |
+
if (!$this->isValidForSend() || !$email) {
|
92 |
+
return false;
|
93 |
+
}
|
94 |
+
|
95 |
+
$Mail = Mage::getModel('mbbwebservice/mail');
|
96 |
+
|
97 |
+
if (is_null($name)) {
|
98 |
+
$name = substr($email, 0, strpos($email, '@'));
|
99 |
+
}
|
100 |
+
|
101 |
+
$variables['email'] = $email;
|
102 |
+
$variables['name'] = $name;
|
103 |
+
|
104 |
+
$Mail->setBody($this->getProcessedTemplate($variables, true));
|
105 |
+
$Mail->setIsPlain($this->isPlain());
|
106 |
+
$Mail->setSubject($this->getProcessedTemplateSubject($variables));
|
107 |
+
|
108 |
+
|
109 |
+
$Mail
|
110 |
+
->setFromName($this->getSenderName())
|
111 |
+
->setFromEmail($this->getSenderEmail())
|
112 |
+
->setReplyTo($this->getReplyTo())
|
113 |
+
->setToName($name)
|
114 |
+
->setToEmail($email)
|
115 |
+
->setTemplateId($this->getTemplateId())
|
116 |
+
->setStoreId(Mage::app()->getStore()->getId());
|
117 |
+
|
118 |
+
$this->sendMail($Mail);
|
119 |
+
|
120 |
+
return true;
|
121 |
+
}
|
122 |
+
|
123 |
+
private function _getToData($email,$name) {
|
124 |
+
|
125 |
+
$range = array();
|
126 |
+
|
127 |
+
if(!is_array($name)) {
|
128 |
+
$name = (array) $name;
|
129 |
+
}
|
130 |
+
|
131 |
+
for($i=(count($email)-1);$i>=0;$i--) {
|
132 |
+
|
133 |
+
if (!isset($name[$i])) {
|
134 |
+
$name[$i] = substr($email[$i], 0, strpos($email[$i], '@'));
|
135 |
+
}
|
136 |
+
|
137 |
+
if(isset($name[$i]) && !is_array($name[$i]) && empty($name[$i])) {
|
138 |
+
$name[$i] = substr($email[$i], 0, strpos($email[$i], '@'));
|
139 |
+
}
|
140 |
+
|
141 |
+
$range[$i]['email'] = $email[$i];
|
142 |
+
$range[$i]['name'] = $name[$i];
|
143 |
+
|
144 |
+
}
|
145 |
+
|
146 |
+
return $range;
|
147 |
+
}
|
148 |
+
|
149 |
+
}
|
app/code/local/EM/Mbbwebservice/Model/Mail.php
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Emark
|
4 |
+
*/
|
5 |
+
class EM_Mbbwebservice_Model_Mail extends Mage_Core_Model_Abstract{
|
6 |
+
public function _construct(){
|
7 |
+
parent::_construct();
|
8 |
+
$this->_init('mbbwebservice/mail');
|
9 |
+
}
|
10 |
+
|
11 |
+
public function _beforeSave(){
|
12 |
+
if(!$this->getDate()){
|
13 |
+
$this->setDate(now());
|
14 |
+
}
|
15 |
+
return parent::_beforeSave();
|
16 |
+
}
|
17 |
+
}
|
app/code/local/EM/Mbbwebservice/Model/Observer.php
ADDED
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Emark
|
5 |
+
*/
|
6 |
+
class EM_Mbbwebservice_Model_Observer
|
7 |
+
{
|
8 |
+
protected static $fields = array ();
|
9 |
+
|
10 |
+
public function sendTestMail ($observer)
|
11 |
+
{
|
12 |
+
$data = $observer->getEvent ()->getData ('data_object')->getData ();
|
13 |
+
|
14 |
+
switch ($data ['field'])
|
15 |
+
{
|
16 |
+
case 'login':
|
17 |
+
{
|
18 |
+
self::$fields ['username'] = $data ['value'];
|
19 |
+
|
20 |
+
break;
|
21 |
+
}
|
22 |
+
case 'password':
|
23 |
+
case 'test':
|
24 |
+
case 'test_address':
|
25 |
+
{
|
26 |
+
self::$fields [$data ['field']] = $data ['value'];
|
27 |
+
|
28 |
+
break;
|
29 |
+
}
|
30 |
+
}
|
31 |
+
|
32 |
+
if (self::$fields ['test'] && 4 == count (self::$fields))
|
33 |
+
{
|
34 |
+
$configs = array (array ('ssl://', 465),
|
35 |
+
array ('tls://', 587),
|
36 |
+
array ('', 587),
|
37 |
+
array ('', 588),
|
38 |
+
array ('tls://', 25),
|
39 |
+
array ('', 25));
|
40 |
+
|
41 |
+
$host = Mage::getStoreConfig(EM_Mbbwebservice_Helper_Config::XML_PATH_SMTP_HOST);
|
42 |
+
$connected = FALSE;
|
43 |
+
|
44 |
+
for ($i = 0; $i < count ($configs); ++$i)
|
45 |
+
{
|
46 |
+
$soc = @ fSockOpen ($configs [$i] [0].$host, $configs [$i] [1], $errno, $errstr, 5);
|
47 |
+
|
48 |
+
if ($soc)
|
49 |
+
{
|
50 |
+
fClose ($soc);
|
51 |
+
|
52 |
+
$connected = TRUE;
|
53 |
+
|
54 |
+
break;
|
55 |
+
}
|
56 |
+
}
|
57 |
+
|
58 |
+
if ($connected)
|
59 |
+
{
|
60 |
+
if ('ssl://' == $configs [$i] [0])
|
61 |
+
{
|
62 |
+
Mage::getConfig ()->saveConfig (EM_Mbbwebservice_Helper_Config::XML_PATH_SMTP_SSL, 'SSL');
|
63 |
+
}
|
64 |
+
elseif ('tls://' == $configs [$i] [0])
|
65 |
+
{
|
66 |
+
Mage::getConfig ()->saveConfig (EM_Mbbwebservice_Helper_Config::XML_PATH_SMTP_SSL, 'TLS');
|
67 |
+
}
|
68 |
+
else
|
69 |
+
{
|
70 |
+
Mage::getConfig ()->saveConfig (EM_Mbbwebservice_Helper_Config::XML_PATH_SMTP_SSL, '');
|
71 |
+
}
|
72 |
+
|
73 |
+
Mage::getConfig ()->saveConfig (EM_Mbbwebservice_Helper_Config::XML_PATH_SMTP_PORT, $configs [$i] [1]);
|
74 |
+
|
75 |
+
Mage::getConfig ()->reinit ();
|
76 |
+
Mage::app ()->reinitStores ();
|
77 |
+
|
78 |
+
$to = self::$fields ['test_address'];
|
79 |
+
$from = Mage::getStoreConfig ('trans_email/ident_general/email');
|
80 |
+
|
81 |
+
$Mail = Mage::getModel ('mbbwebservice/mail');
|
82 |
+
|
83 |
+
$Mail->setBody (Mage::helper ('mbbwebservice')->__ ('Your Emark configuration is ok!'));
|
84 |
+
$Mail->setIsPlain (TRUE);
|
85 |
+
$Mail->setSubject (Mage::helper ('mbbwebservice')->__ ('Your test mail from Emark'));
|
86 |
+
|
87 |
+
$Mail
|
88 |
+
->setFromName('Emark')
|
89 |
+
->setFromEmail($from)
|
90 |
+
->setReplyTo($from)
|
91 |
+
->setToName($to)
|
92 |
+
->setToEmail($to);
|
93 |
+
|
94 |
+
$sender = Mage::getModel ('mbbwebservice/email_template')->load (Mage::getStoreConfig (Mage::app ()->getStore ()->getId ()));
|
95 |
+
|
96 |
+
$sender->sendMail($Mail, self::$fields);
|
97 |
+
}
|
98 |
+
else
|
99 |
+
{
|
100 |
+
throw new Exception (sPrintF ('Please contact Emark support to sort this out.<br /><br />%d - %s', $errno, $errstr));
|
101 |
+
}
|
102 |
+
}
|
103 |
+
}
|
104 |
+
}
|
105 |
+
|
106 |
+
?>
|
app/code/local/EM/Mbbwebservice/etc/config.xml
ADDED
@@ -0,0 +1,151 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<EM_Mbbwebservice>
|
5 |
+
<version>1.0.0</version>
|
6 |
+
<platform>ce</platform>
|
7 |
+
</EM_Mbbwebservice>
|
8 |
+
</modules>
|
9 |
+
<adminhtml>
|
10 |
+
<menu>
|
11 |
+
<system>
|
12 |
+
<children>
|
13 |
+
<mails translate="title" module="mbbwebservice">
|
14 |
+
<title>Emark settings</title>
|
15 |
+
<action>adminhtml/system_config/edit/section/mbbwebservice</action>
|
16 |
+
<sort_order>40</sort_order>
|
17 |
+
</mails>
|
18 |
+
</children>
|
19 |
+
</system>
|
20 |
+
</menu>
|
21 |
+
<acl>
|
22 |
+
<resources>
|
23 |
+
<all>
|
24 |
+
<title>Allow Everything</title>
|
25 |
+
</all>
|
26 |
+
<admin>
|
27 |
+
<children>
|
28 |
+
<mails>
|
29 |
+
<children>
|
30 |
+
<mails>
|
31 |
+
<title>Emark</title>
|
32 |
+
</mails>
|
33 |
+
</children>
|
34 |
+
</mails>
|
35 |
+
<system>
|
36 |
+
<children>
|
37 |
+
<config>
|
38 |
+
<children>
|
39 |
+
<mbbwebservice>
|
40 |
+
<title>Emark</title>
|
41 |
+
</mbbwebservice>
|
42 |
+
</children>
|
43 |
+
</config>
|
44 |
+
</children>
|
45 |
+
</system>
|
46 |
+
</children>
|
47 |
+
<children>
|
48 |
+
<system>
|
49 |
+
<children>
|
50 |
+
<mails translate="title" module="mbbwebservice">
|
51 |
+
<title>Emark settings</title>
|
52 |
+
<sort_order>40</sort_order>
|
53 |
+
<action>adminhtml/system_config/edit/section/mbbwebservice</action>
|
54 |
+
</mails>
|
55 |
+
</children>
|
56 |
+
</system>
|
57 |
+
</children>
|
58 |
+
</admin>
|
59 |
+
</resources>
|
60 |
+
</acl>
|
61 |
+
<translate>
|
62 |
+
<modules>
|
63 |
+
<EM_Mbbwebservice>
|
64 |
+
<files>
|
65 |
+
<default>EM_Mbbwebservice.csv</default>
|
66 |
+
</files>
|
67 |
+
</EM_Mbbwebservice>
|
68 |
+
</modules>
|
69 |
+
</translate>
|
70 |
+
</adminhtml>
|
71 |
+
<admin>
|
72 |
+
<routers>
|
73 |
+
<mbbwebservice_admin>
|
74 |
+
<use>admin</use>
|
75 |
+
<args>
|
76 |
+
<module>EM_Mbbwebservice</module>
|
77 |
+
<frontName>mails_admin</frontName>
|
78 |
+
</args>
|
79 |
+
</mbbwebservice_admin>
|
80 |
+
</routers>
|
81 |
+
</admin>
|
82 |
+
<global>
|
83 |
+
<models>
|
84 |
+
<mbbwebservice>
|
85 |
+
<class>EM_Mbbwebservice_Model</class>
|
86 |
+
</mbbwebservice>
|
87 |
+
<core>
|
88 |
+
<rewrite>
|
89 |
+
<email_template>EM_Mbbwebservice_Model_Email_Template</email_template>
|
90 |
+
</rewrite>
|
91 |
+
</core>
|
92 |
+
</models>
|
93 |
+
<events>
|
94 |
+
<core_config_data_save_commit_after>
|
95 |
+
<observers>
|
96 |
+
<test_mail>
|
97 |
+
<type>singleton</type>
|
98 |
+
<class>EM_Mbbwebservice_Model_Observer</class>
|
99 |
+
<method>sendTestMail</method>
|
100 |
+
</test_mail>
|
101 |
+
</observers>
|
102 |
+
</core_config_data_save_commit_after>
|
103 |
+
</events>
|
104 |
+
<resources>
|
105 |
+
<mbbwebservice_setup>
|
106 |
+
<setup>
|
107 |
+
<module>EM_Mbbwebservice</module>
|
108 |
+
</setup>
|
109 |
+
<connection>
|
110 |
+
<use>core_setup</use>
|
111 |
+
</connection>
|
112 |
+
</mbbwebservice_setup>
|
113 |
+
<mbbwebservice_write>
|
114 |
+
<connection>
|
115 |
+
<use>core_write</use>
|
116 |
+
</connection>
|
117 |
+
</mbbwebservice_write>
|
118 |
+
<mbbwebservice_read>
|
119 |
+
<connection>
|
120 |
+
<use>core_read</use>
|
121 |
+
</connection>
|
122 |
+
</mbbwebservice_read>
|
123 |
+
</resources>
|
124 |
+
<helpers>
|
125 |
+
<mbbwebservice>
|
126 |
+
<class>EM_Mbbwebservice_Helper</class>
|
127 |
+
</mbbwebservice>
|
128 |
+
</helpers>
|
129 |
+
<blocks>
|
130 |
+
<mbbwebservice>
|
131 |
+
<class>EM_Mbbwebservice_Block</class>
|
132 |
+
</mbbwebservice>
|
133 |
+
</blocks>
|
134 |
+
</global>
|
135 |
+
<default>
|
136 |
+
<mbbwebservice>
|
137 |
+
<general>
|
138 |
+
<enabled>0</enabled>
|
139 |
+
<test>0</test>
|
140 |
+
<test_address />
|
141 |
+
</general>
|
142 |
+
<smtp>
|
143 |
+
<host>transactional.e-mark.nl</host>
|
144 |
+
<port>2525</port>
|
145 |
+
<login>magento</login>
|
146 |
+
<password>21EC2020-3AEA-1069-A2DD-08002B3</password>
|
147 |
+
<ssl />
|
148 |
+
</smtp>
|
149 |
+
</mbbwebservice>
|
150 |
+
</default>
|
151 |
+
</config>
|
app/code/local/EM/Mbbwebservice/etc/system.xml
ADDED
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
|
3 |
+
<config>
|
4 |
+
<tabs>
|
5 |
+
<mbbwebservice translate="label" module="mbbwebservice">
|
6 |
+
<label>emark</label>
|
7 |
+
<sort_order>300</sort_order>
|
8 |
+
</mbbwebservice>
|
9 |
+
</tabs>
|
10 |
+
<sections>
|
11 |
+
<mbbwebservice translate="label" module="mbbwebservice">
|
12 |
+
<label>Settings</label>
|
13 |
+
<tab>mbbwebservice</tab>
|
14 |
+
<frontend_type>text</frontend_type>
|
15 |
+
<sort_order>100</sort_order>
|
16 |
+
<show_in_default>1</show_in_default>
|
17 |
+
<show_in_website>1</show_in_website>
|
18 |
+
<show_in_store>1</show_in_store>
|
19 |
+
<groups>
|
20 |
+
<general translate="label">
|
21 |
+
<label>General Settings</label>
|
22 |
+
<frontend_type>text</frontend_type>
|
23 |
+
<sort_order>10</sort_order>
|
24 |
+
<show_in_default>1</show_in_default>
|
25 |
+
<show_in_website>1</show_in_website>
|
26 |
+
<show_in_store>1</show_in_store>
|
27 |
+
<fields>
|
28 |
+
|
29 |
+
<enabled translate="label">
|
30 |
+
<label>Enabled</label>
|
31 |
+
<frontend_type>select</frontend_type>
|
32 |
+
<sort_order>100</sort_order>
|
33 |
+
<show_in_default>1</show_in_default>
|
34 |
+
<show_in_website>1</show_in_website>
|
35 |
+
<show_in_store>1</show_in_store>
|
36 |
+
<validate>required-entry</validate>
|
37 |
+
<comment>If enabled, overrides standart SMTP settings</comment>
|
38 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
39 |
+
</enabled>
|
40 |
+
<test translate="label">
|
41 |
+
<label>Send test mail now</label>
|
42 |
+
<frontend_type>select</frontend_type>
|
43 |
+
<sort_order>200</sort_order>
|
44 |
+
<show_in_default>1</show_in_default>
|
45 |
+
<show_in_website>1</show_in_website>
|
46 |
+
<show_in_store>1</show_in_store>
|
47 |
+
<validate>required-entry</validate>
|
48 |
+
<comment>Sender of test mail is general contact of your store</comment>
|
49 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
50 |
+
</test>
|
51 |
+
<test_address translate="label">
|
52 |
+
<label>Recipient of test mail</label>
|
53 |
+
<frontend_type>text</frontend_type>
|
54 |
+
<sort_order>300</sort_order>
|
55 |
+
<show_in_default>1</show_in_default>
|
56 |
+
<show_in_website>1</show_in_website>
|
57 |
+
<show_in_store>1</show_in_store>
|
58 |
+
<validate>required-entry</validate>
|
59 |
+
</test_address>
|
60 |
+
</fields>
|
61 |
+
</general>
|
62 |
+
<smtp translate="label">
|
63 |
+
<label>Emark settings</label>
|
64 |
+
<frontend_type>text</frontend_type>
|
65 |
+
<sort_order>20</sort_order>
|
66 |
+
<show_in_default>1</show_in_default>
|
67 |
+
<show_in_website>1</show_in_website>
|
68 |
+
<show_in_store>1</show_in_store>
|
69 |
+
<fields>
|
70 |
+
<login translate="label">
|
71 |
+
<label>API Key</label>
|
72 |
+
<frontend_type>text</frontend_type>
|
73 |
+
<sort_order>130</sort_order>
|
74 |
+
<show_in_default>1</show_in_default>
|
75 |
+
<show_in_website>1</show_in_website>
|
76 |
+
<show_in_store>1</show_in_store>
|
77 |
+
<validate>required-entry</validate>
|
78 |
+
</login>
|
79 |
+
<password translate="label">
|
80 |
+
<label>Secret Key</label>
|
81 |
+
<frontend_type>text</frontend_type>
|
82 |
+
<sort_order>140</sort_order>
|
83 |
+
<show_in_default>1</show_in_default>
|
84 |
+
<show_in_website>1</show_in_website>
|
85 |
+
<show_in_store>1</show_in_store>
|
86 |
+
<validate>required-entry</validate>
|
87 |
+
</password>
|
88 |
+
</fields>
|
89 |
+
</smtp>
|
90 |
+
</groups>
|
91 |
+
</mbbwebservice>
|
92 |
+
</sections>
|
93 |
+
</config>
|
app/etc/modules/EM_Mbbwebservice.xml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<EM_Mbbwebservice>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>local</codePool>
|
7 |
+
</EM_Mbbwebservice>
|
8 |
+
</modules>
|
9 |
+
</config>
|
package.xml
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>e-mark_mail</name>
|
4 |
+
<version>0.9.0</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license>GPL</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>E-mark_Mail 0.9</summary>
|
10 |
+
<description>E-mail marketing made easy
|
11 |
+

|
12 |
+
Easily integrate with E-mark Mail in seconds to drive traffic and strengthen relationships with your clients.
|
13 |
+

|
14 |
+
Implemented with no effort, your contacts are synched to your E-mark Mail account, and abandoned cart triggered emails are activated simply by selecting the right campaign to send.
|
15 |
+

|
16 |
+
Transactional, Intelligent, Targeted email marketing has never been more powerfull! 
|
17 |
+

|
18 |
+
You can request your account at www.emailmarketing.nl</description>
|
19 |
+
<notes>E-mail marketing made easy
|
20 |
+

|
21 |
+
Easily integrate with E-mark Mail in seconds to drive traffic and strengthen relationships with your clients.
|
22 |
+

|
23 |
+
Implemented with no effort, your contacts are synched to your E-mark Mail account, and abandoned cart triggered emails are activated simply by selecting the right campaign to send.
|
24 |
+

|
25 |
+
Transactional, Intelligent, Targeted email marketing has never been more powerfull! 
|
26 |
+

|
27 |
+
You can request your account at www.emailmarketing.nl</notes>
|
28 |
+
<authors><author><name>E-Mark</name><user>emarkmail</user><email>timd@e-mark.nl</email></author></authors>
|
29 |
+
<date>2012-10-09</date>
|
30 |
+
<time>14:36:33</time>
|
31 |
+
<contents><target name="magelocal"><dir name="EM"><dir name="Mbbwebservice"><dir name="Helper"><file name="Config.php" hash="ad6f5103f80445a36e49f365c2524432"/><file name="Data.php" hash="25cdc46c1ec2450bf2c43cf689ed5ac7"/></dir><dir name="Model"><dir name="Email"><file name="Template.php" hash="790378827c23864eeabdd28d1d0b3c50"/></dir><file name="Mail.php" hash="4322bdc0866f950d00e97a25c128cb32"/><file name="Observer.php" hash="2edca6169c85f07d6a21e049c4bc7f44"/></dir><dir name="etc"><file name="config.xml" hash="59edeba98a798cc601ecfed013bc2abc"/><file name="system.xml" hash="d4a40cc1c38f0ed8e3ede9606cdd35bc"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="EM_Mbbwebservice.xml" hash="30269dc0ef3f75897095f417564b5942"/></dir></target></contents>
|
32 |
+
<compatible/>
|
33 |
+
<dependencies><required><php><min>4.0.0</min><max>5.4.6</max></php></required></dependencies>
|
34 |
+
</package>
|