Rack_Jpmail - Version 0.3.1

Version Notes

0.3.1 fix storeview bug.
0.3.0 Update for CE 1.9.1.x. Include text templates.
0.2.5 Compatible for PHP5.5
0.2.4 FIx bug.
0.2.3 Fix bug.
0.2.2 Fix sender and recipient name broken under double byte env
0.2.1 Modify for 1.5 and 1.6
0.2.0 Add External SMTP Server setting
0.1.6 Add Sender Name Encoding
0.1.5 Separate Text and HTML mail encode.
Add Return-Path
Add Reply-To
0.1.4 Fix system.xml
0.1.3 Fix bcc problem
Add Newsletter/Template.php
0.1.2 Fix Bug.

Download this release

Release Info

Developer Hirokazu Nishi
Extension Rack_Jpmail
Version 0.3.1
Comparing to
See all releases


Code changes from version 0.3.0 to 0.3.1

app/code/community/Rack/Jpmail/Model/Email/Template.php CHANGED
@@ -24,6 +24,7 @@ class Rack_Jpmail_Model_Email_Template extends Mage_Core_Model_Email_Template {
24
 
25
  $variables['email'] = reset($emails);
26
  $variables['name'] = reset($names);
 
27
 
28
  $setReturnPath = Mage::getStoreConfig(Mage_Core_Model_Email_Template::XML_PATH_SENDING_SET_RETURN_PATH);
29
  switch ($setReturnPath) {
@@ -38,8 +39,8 @@ class Rack_Jpmail_Model_Email_Template extends Mage_Core_Model_Email_Template {
38
  break;
39
  }
40
 
41
- ini_set('SMTP', Mage::getStoreConfig('system/smtp/host'));
42
- ini_set('smtp_port', Mage::getStoreConfig('system/smtp/port'));
43
  $mail = $this->getMail();
44
 
45
  foreach ($emails as $key => $email) {
@@ -120,8 +121,8 @@ class Rack_Jpmail_Model_Email_Template extends Mage_Core_Model_Email_Template {
120
  }
121
 
122
  public function getMail() {
123
- $textencode = Mage::getStoreConfig('jpmail/jpmail/text_charset');
124
- $htmlencode = Mage::getStoreConfig('jpmail/jpmail/html_charset');
125
 
126
  $setReturnPath = Mage::getStoreConfig(Mage_Core_Model_Email_Template::XML_PATH_SENDING_SET_RETURN_PATH);
127
  switch ($setReturnPath) {
@@ -158,8 +159,8 @@ class Rack_Jpmail_Model_Email_Template extends Mage_Core_Model_Email_Template {
158
  if($returnPathEmail !== '' && !$this->_mail->getReturnPath()) {
159
  $this->_mail->setReturnPath($returnPathEmail);
160
  }
161
- if (Mage::getStoreConfig('jpmail/jpmail/use_reply_to')) {
162
- $this->setReplyTo(Mage::getStoreConfig('jpmail/jpmail/reply_to'));
163
  }
164
 
165
  return $this->_mail;
24
 
25
  $variables['email'] = reset($emails);
26
  $variables['name'] = reset($names);
27
+ $this->setStoreId($variables['store']);
28
 
29
  $setReturnPath = Mage::getStoreConfig(Mage_Core_Model_Email_Template::XML_PATH_SENDING_SET_RETURN_PATH);
30
  switch ($setReturnPath) {
39
  break;
40
  }
41
 
42
+ ini_set('SMTP', Mage::getStoreConfig('system/smtp/host', $variables['store']));
43
+ ini_set('smtp_port', Mage::getStoreConfig('system/smtp/port', $variables['store']));
44
  $mail = $this->getMail();
45
 
46
  foreach ($emails as $key => $email) {
121
  }
122
 
123
  public function getMail() {
124
+ $textencode = Mage::getStoreConfig('jpmail/jpmail/text_charset', $this->getStoreId());
125
+ $htmlencode = Mage::getStoreConfig('jpmail/jpmail/html_charset', $this->getStoreId());
126
 
127
  $setReturnPath = Mage::getStoreConfig(Mage_Core_Model_Email_Template::XML_PATH_SENDING_SET_RETURN_PATH);
128
  switch ($setReturnPath) {
159
  if($returnPathEmail !== '' && !$this->_mail->getReturnPath()) {
160
  $this->_mail->setReturnPath($returnPathEmail);
161
  }
162
+ if (Mage::getStoreConfig('jpmail/jpmail/use_reply_to', $this->getStoreId())) {
163
+ $this->setReplyTo(Mage::getStoreConfig('jpmail/jpmail/reply_to', $this->getStoreId()));
164
  }
165
 
166
  return $this->_mail;
app/code/community/Rack/Jpmail/Model/Newsletter/Template.php CHANGED
@@ -3,8 +3,8 @@ class Rack_Jpmail_Model_Newsletter_Template extends Mage_Newsletter_Model_Templa
3
  {
4
  public function getMail()
5
  {
6
- $textencode = Mage::getStoreConfig('jpmail/jpmail/text_charset');
7
- $htmlencode = Mage::getStoreConfig('jpmail/jpmail/html_charset');
8
 
9
  $setReturnPath = Mage::getStoreConfig(Mage_Core_Model_Email_Template::XML_PATH_SENDING_SET_RETURN_PATH);
10
  switch ($setReturnPath) {
@@ -38,12 +38,12 @@ class Rack_Jpmail_Model_Newsletter_Template extends Mage_Newsletter_Model_Templa
38
  $this->_mail->addBcc($this->bcc);
39
  }
40
 
41
- if(Mage::getStoreConfig('jpmail/jpmail/use_return_path')) {
42
  $this->_mail->setReturnPath($setReturnPath);
43
  }
44
 
45
- if(Mage::getStoreConfig('jpmail/jpmail/use_reply_to')) {
46
- $this->_mail->setReplyTo(Mage::getStoreConfig('jpmail/jpmail/reply_to'));
47
  }
48
 
49
  return $this->_mail;
@@ -64,9 +64,9 @@ class Rack_Jpmail_Model_Newsletter_Template extends Mage_Newsletter_Model_Templa
64
  return false;
65
  }
66
 
67
- $textencode = Mage::getStoreConfig('jpmail/jpmail/textcharset');
68
- $htmlencode = Mage::getStoreConfig('jpmail/jpmail/htmlcharset');
69
- $nameSuffix = Mage::getStoreConfig('jpmail/jpmail/name_suffix');
70
 
71
  $email = '';
72
  if ($subscriber instanceof Mage_Newsletter_Model_Subscriber) {
@@ -83,8 +83,9 @@ class Rack_Jpmail_Model_Newsletter_Template extends Mage_Newsletter_Model_Templa
83
  $this->getMail()->setReturnPath($this->getTemplateSenderEmail());
84
  }
85
 
86
- ini_set('SMTP', Mage::getStoreConfig('system/smtp/host'));
87
- ini_set('smtp_port', Mage::getStoreConfig('system/smtp/port'));
 
88
 
89
  $mail = $this->getMail();
90
  if($this->isPlain()) {
3
  {
4
  public function getMail()
5
  {
6
+ $textencode = Mage::getStoreConfig('jpmail/jpmail/text_charset', $this->getStoreId());
7
+ $htmlencode = Mage::getStoreConfig('jpmail/jpmail/html_charset', $this->getStoreId());
8
 
9
  $setReturnPath = Mage::getStoreConfig(Mage_Core_Model_Email_Template::XML_PATH_SENDING_SET_RETURN_PATH);
10
  switch ($setReturnPath) {
38
  $this->_mail->addBcc($this->bcc);
39
  }
40
 
41
+ if(Mage::getStoreConfig('jpmail/jpmail/use_return_path', $this->getStoreId())) {
42
  $this->_mail->setReturnPath($setReturnPath);
43
  }
44
 
45
+ if(Mage::getStoreConfig('jpmail/jpmail/use_reply_to', $this->getStoreId())) {
46
+ $this->_mail->setReplyTo(Mage::getStoreConfig('jpmail/jpmail/reply_to', $this->getStoreId()));
47
  }
48
 
49
  return $this->_mail;
64
  return false;
65
  }
66
 
67
+ $textencode = Mage::getStoreConfig('jpmail/jpmail/textcharset', $variables['store']);
68
+ $htmlencode = Mage::getStoreConfig('jpmail/jpmail/htmlcharset', $variables['store']);
69
+ $nameSuffix = Mage::getStoreConfig('jpmail/jpmail/name_suffix', $variables['store']);
70
 
71
  $email = '';
72
  if ($subscriber instanceof Mage_Newsletter_Model_Subscriber) {
83
  $this->getMail()->setReturnPath($this->getTemplateSenderEmail());
84
  }
85
 
86
+ ini_set('SMTP', Mage::getStoreConfig('system/smtp/host', $variables['store']));
87
+ ini_set('smtp_port', Mage::getStoreConfig('system/smtp/port', $variables['store']));
88
+ $this->setStoreId($variables['store']);
89
 
90
  $mail = $this->getMail();
91
  if($this->isPlain()) {
app/code/community/Rack/Jpmail/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Rack_Jpmail>
5
- <version>0.3.0</version>
6
  </Rack_Jpmail>
7
  </modules>
8
  <global>
2
  <config>
3
  <modules>
4
  <Rack_Jpmail>
5
+ <version>0.3.1</version>
6
  </Rack_Jpmail>
7
  </modules>
8
  <global>
package.xml CHANGED
@@ -1,14 +1,15 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Rack_Jpmail</name>
4
- <version>0.3.0</version>
5
  <stability>stable</stability>
6
  <license>OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>This module fix email encoding for multibyte environment</summary>
10
  <description>This module fix email encoding for multibyte environment</description>
11
- <notes>0.3.0 Update for CE 1.9.1.x. Include text templates.&#xD;
 
12
  0.2.5 Compatible for PHP5.5&#xD;
13
  0.2.4 FIx bug.&#xD;
14
  0.2.3 Fix bug.&#xD;
@@ -24,9 +25,9 @@
24
  Add Newsletter/Template.php&#xD;
25
  0.1.2 Fix Bug.</notes>
26
  <authors><author><name>Hirokazu Nishi</name><user>hirokazu_n</user><email>nishi@principle-works.jp</email></author></authors>
27
- <date>2015-02-23</date>
28
- <time>01:37:08</time>
29
- <contents><target name="magecommunity"><dir name="Rack"><dir name="Jpmail"><dir name="Helper"><file name="Data.php" hash="2770638148fb60a5b2678cf1c225a740"/></dir><dir name="Model"><dir name="Email"><file name="Queue.php" hash="fdf13ee929d90bd55291272bc348eec8"/><file name="Template.php" hash="7ab66574e58816166f25d69216bae926"/></dir><dir name="Newsletter"><file name="Queue.php" hash="086e8ab56db996e108c55c8dbe17b54f"/><file name="Template.php" hash="cd31baf7b198257b7352d4863aca45b1"/></dir><dir name="System"><file name="Secure.php" hash="8f084fccdc20a9924c516addf8c49725"/></dir></dir><dir name="etc"><file name="config.xml" hash="55aa365c64fd9daa4754d117d8519092"/><file name="system.xml" hash="1bbe84058ff4626f2464d1a62605ee06"/></dir></dir></dir></target><target name="magelocale"><dir name="ja_JP"><file name="Rack_Jpmail.csv" hash="58d315077af760c362924660a4b5180c"/><dir name="template"><dir name="email"><dir name="jpmail"><file name="account_new.html" hash="f6e51d215088fdec8a36d1facf917bca"/><file name="account_new_confirmation.html" hash="c758523cbe765080ba92488cc758d1ce"/><file name="account_new_confirmed.html" hash="74d8c9454f3be37dfe8ed57c9b841d25"/><file name="account_password_reset_confirmation.html" hash="86b6d0860f9719e70efd97731d64d72a"/><file name="newsletter_subscr_confirm.html" hash="e4b237b7521cd29b953c8c1773fb3c15"/><file name="newsletter_subscr_success.html" hash="a78f812186ae09d9cbdb19b31f9f228d"/><file name="newsletter_unsub_success.html" hash="1d2f3dbd11b1ccea3edc636dd9aee37f"/><file name="password_new.html" hash="c2df9b9876d32165994059f2c27ecb81"/><file name="product_price_alert.html" hash="793e9a806b2f773d3144e4f1b9735b85"/><file name="product_share.html" hash="cfcf329b1f92179d6bc146c66b0d91be"/><file name="product_stock_alert.html" hash="e481b0b907fa5162935940e5fe54bb7c"/><dir name="sales"><file name="creditmemo_new.html" hash="b17c41113127ad6e975389c55ef94576"/><file name="creditmemo_new_guest.html" hash="d2b656b338778889481af3178f6f0cca"/><file name="creditmemo_update.html" hash="91db8f68628afd1688b33c7298cddafd"/><file name="creditmemo_update_guest.html" hash="fb2e1302d7dcf7a7d0e0f03360306a3e"/><file name="invoice_new.html" hash="ad284f555eb8d6409f3f57cb08f94125"/><file name="invoice_new_guest.html" hash="248d6ac9b796f33f410acc7728fae026"/><file name="invoice_update.html" hash="bc51383cc3648401dbb812ec484f0d87"/><file name="invoice_update_guest.html" hash="53e1690253db6cd5b1ab80cca0dd5b8a"/><file name="order_cancel.html" hash="c71cb4464c65891f2b4a45d362f75b96"/><file name="order_new.html" hash="94a4be6cc755cad1e8edc07abd12a43e"/><file name="order_new_guest.html" hash="baaf742a6720c96500bd0b577dada6e9"/><file name="order_update.html" hash="df41a28e96ecb5719fe3546d06b7b3d7"/><file name="order_update_guest.html" hash="cb0b59efcc1e84c26593c991f7eeeeaa"/><file name="shipment_new.html" hash="859361977323e84f1c38e3cc383a72c0"/><file name="shipment_new_guest.html" hash="225374c178c88636c8c18f87395ceae9"/><file name="shipment_update.html" hash="cebd00858ad512edd350a964edc6358f"/><file name="shipment_update_guest.html" hash="c518644d837e1cf8e29388173006323b"/></dir><file name="token.html" hash="c2b6af9fbf792716898ad6dbde932254"/><file name="wishlist_share.html" hash="79c188aee1dc33ddc7594e08554b8ade"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Rack_Jpmail.xml" hash="15330a682c67f43d2510c0e72991bc53"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="rack_jpmail"><dir name="order"><dir name="creditmemo"><file name="items.phtml" hash="598add2bef95883a025f256d543662cb"/></dir><file name="delivery.phtml" hash="ba1b54421e89e904b3c9e12bf9bafb4b"/><dir name="invoice"><file name="items.phtml" hash="ea4bbf0656601bd1032bed43ce9dd40f"/></dir><dir name="items"><dir name="creditmemo"><file name="default.phtml" hash="4a257b7e484819d3d0ecbcc6ed0c6b32"/></dir><dir name="invoice"><file name="default.phtml" hash="4a257b7e484819d3d0ecbcc6ed0c6b32"/></dir><dir name="order"><file name="default.phtml" hash="d8d9a3ebc1a1c7a55b8576f7f6670ae9"/></dir><dir name="shipment"><file name="default.phtml" hash="cfa8d5a6f6aea775d47781afdd844935"/></dir></dir><file name="items.phtml" hash="66afbfd1756be1c434b8369fe5eedb37"/><file name="payment.phtml" hash="8cac0d74414a1e728756c50160880fe1"/><dir name="shipment"><file name="items.phtml" hash="a52eebc3105f69ab7d40ff0c4e2c6aae"/><file name="totals.phtml" hash="8e1b3c5eb4a1e1bfa3f14347dfd91bf4"/><file name="track.phtml" hash="2a78ec152bc0a7889f5c41dc8ad75fa2"/></dir><file name="tax.phtml" hash="6c7cd80ebcd4e35e9e7dcfae713d3f9b"/><file name="totals.phtml" hash="365eb1f0b13fe0439f88f1596e187a05"/></dir></dir></dir><dir name="layout"><file name="jpmail.xml" hash="10b4ee160d8078445f7352672374bdb7"/></dir></dir></dir></dir></target></contents>
30
  <compatible/>
31
  <dependencies><required><php><min>5.2.0</min><max>5.5.99</max></php><extension><name>mbstring</name><min/><max/></extension></required></dependencies>
32
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Rack_Jpmail</name>
4
+ <version>0.3.1</version>
5
  <stability>stable</stability>
6
  <license>OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>This module fix email encoding for multibyte environment</summary>
10
  <description>This module fix email encoding for multibyte environment</description>
11
+ <notes>0.3.1 fix storeview bug.&#xD;
12
+ 0.3.0 Update for CE 1.9.1.x. Include text templates.&#xD;
13
  0.2.5 Compatible for PHP5.5&#xD;
14
  0.2.4 FIx bug.&#xD;
15
  0.2.3 Fix bug.&#xD;
25
  Add Newsletter/Template.php&#xD;
26
  0.1.2 Fix Bug.</notes>
27
  <authors><author><name>Hirokazu Nishi</name><user>hirokazu_n</user><email>nishi@principle-works.jp</email></author></authors>
28
+ <date>2015-03-19</date>
29
+ <time>02:02:24</time>
30
+ <contents><target name="magecommunity"><dir name="Rack"><dir name="Jpmail"><dir name="Helper"><file name="Data.php" hash="2770638148fb60a5b2678cf1c225a740"/></dir><dir name="Model"><dir name="Email"><file name="Queue.php" hash="fdf13ee929d90bd55291272bc348eec8"/><file name="Template.php" hash="2fb0e5c2fba305a4019da3df374c9792"/></dir><dir name="Newsletter"><file name="Queue.php" hash="086e8ab56db996e108c55c8dbe17b54f"/><file name="Template.php" hash="9297d446a90ba823feb194c788e9f9a8"/></dir><dir name="System"><file name="Secure.php" hash="8f084fccdc20a9924c516addf8c49725"/></dir></dir><dir name="etc"><file name="config.xml" hash="1fee0a83f1167caf00a6431fa808981a"/><file name="system.xml" hash="1bbe84058ff4626f2464d1a62605ee06"/></dir></dir></dir></target><target name="magelocale"><dir name="ja_JP"><file name="Rack_Jpmail.csv" hash="58d315077af760c362924660a4b5180c"/><dir name="template"><dir name="email"><dir name="jpmail"><file name="account_new.html" hash="f6e51d215088fdec8a36d1facf917bca"/><file name="account_new_confirmation.html" hash="c758523cbe765080ba92488cc758d1ce"/><file name="account_new_confirmed.html" hash="74d8c9454f3be37dfe8ed57c9b841d25"/><file name="account_password_reset_confirmation.html" hash="86b6d0860f9719e70efd97731d64d72a"/><file name="newsletter_subscr_confirm.html" hash="e4b237b7521cd29b953c8c1773fb3c15"/><file name="newsletter_subscr_success.html" hash="a78f812186ae09d9cbdb19b31f9f228d"/><file name="newsletter_unsub_success.html" hash="1d2f3dbd11b1ccea3edc636dd9aee37f"/><file name="password_new.html" hash="c2df9b9876d32165994059f2c27ecb81"/><file name="product_price_alert.html" hash="793e9a806b2f773d3144e4f1b9735b85"/><file name="product_share.html" hash="cfcf329b1f92179d6bc146c66b0d91be"/><file name="product_stock_alert.html" hash="e481b0b907fa5162935940e5fe54bb7c"/><dir name="sales"><file name="creditmemo_new.html" hash="b17c41113127ad6e975389c55ef94576"/><file name="creditmemo_new_guest.html" hash="d2b656b338778889481af3178f6f0cca"/><file name="creditmemo_update.html" hash="91db8f68628afd1688b33c7298cddafd"/><file name="creditmemo_update_guest.html" hash="fb2e1302d7dcf7a7d0e0f03360306a3e"/><file name="invoice_new.html" hash="ad284f555eb8d6409f3f57cb08f94125"/><file name="invoice_new_guest.html" hash="248d6ac9b796f33f410acc7728fae026"/><file name="invoice_update.html" hash="bc51383cc3648401dbb812ec484f0d87"/><file name="invoice_update_guest.html" hash="53e1690253db6cd5b1ab80cca0dd5b8a"/><file name="order_cancel.html" hash="c71cb4464c65891f2b4a45d362f75b96"/><file name="order_new.html" hash="94a4be6cc755cad1e8edc07abd12a43e"/><file name="order_new_guest.html" hash="baaf742a6720c96500bd0b577dada6e9"/><file name="order_update.html" hash="df41a28e96ecb5719fe3546d06b7b3d7"/><file name="order_update_guest.html" hash="cb0b59efcc1e84c26593c991f7eeeeaa"/><file name="shipment_new.html" hash="859361977323e84f1c38e3cc383a72c0"/><file name="shipment_new_guest.html" hash="225374c178c88636c8c18f87395ceae9"/><file name="shipment_update.html" hash="cebd00858ad512edd350a964edc6358f"/><file name="shipment_update_guest.html" hash="c518644d837e1cf8e29388173006323b"/></dir><file name="token.html" hash="c2b6af9fbf792716898ad6dbde932254"/><file name="wishlist_share.html" hash="79c188aee1dc33ddc7594e08554b8ade"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Rack_Jpmail.xml" hash="15330a682c67f43d2510c0e72991bc53"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="rack_jpmail"><dir name="order"><dir name="creditmemo"><file name="items.phtml" hash="598add2bef95883a025f256d543662cb"/></dir><file name="delivery.phtml" hash="ba1b54421e89e904b3c9e12bf9bafb4b"/><dir name="invoice"><file name="items.phtml" hash="ea4bbf0656601bd1032bed43ce9dd40f"/></dir><dir name="items"><dir name="creditmemo"><file name="default.phtml" hash="4a257b7e484819d3d0ecbcc6ed0c6b32"/></dir><dir name="invoice"><file name="default.phtml" hash="4a257b7e484819d3d0ecbcc6ed0c6b32"/></dir><dir name="order"><file name="default.phtml" hash="d8d9a3ebc1a1c7a55b8576f7f6670ae9"/></dir><dir name="shipment"><file name="default.phtml" hash="cfa8d5a6f6aea775d47781afdd844935"/></dir></dir><file name="items.phtml" hash="66afbfd1756be1c434b8369fe5eedb37"/><file name="payment.phtml" hash="8cac0d74414a1e728756c50160880fe1"/><dir name="shipment"><file name="items.phtml" hash="a52eebc3105f69ab7d40ff0c4e2c6aae"/><file name="totals.phtml" hash="8e1b3c5eb4a1e1bfa3f14347dfd91bf4"/><file name="track.phtml" hash="2a78ec152bc0a7889f5c41dc8ad75fa2"/></dir><file name="tax.phtml" hash="6c7cd80ebcd4e35e9e7dcfae713d3f9b"/><file name="totals.phtml" hash="365eb1f0b13fe0439f88f1596e187a05"/></dir></dir></dir><dir name="layout"><file name="jpmail.xml" hash="10b4ee160d8078445f7352672374bdb7"/></dir></dir></dir></dir></target></contents>
31
  <compatible/>
32
  <dependencies><required><php><min>5.2.0</min><max>5.5.99</max></php><extension><name>mbstring</name><min/><max/></extension></required></dependencies>
33
  </package>