Version Notes
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.2.3 |
Comparing to | |
See all releases |
Code changes from version 0.2.2 to 0.2.3
app/code/community/Rack/Jpmail/Model/Email/Template.php
CHANGED
@@ -35,12 +35,14 @@ class Rack_Jpmail_Model_Email_Template extends Mage_Core_Model_Email_Template {
|
|
35 |
|
36 |
foreach ($emails as $key => $email) {
|
37 |
if ($this->isPlain()) {
|
|
|
38 |
mb_internal_encoding($textencode);
|
39 |
-
$mail->addTo($email, mb_encode_mimeheader($names[$key], $textencode
|
40 |
mb_internal_encoding('utf-8');
|
41 |
} else {
|
|
|
42 |
mb_internal_encoding($htmlencode);
|
43 |
-
$mail->addTo($email, mb_encode_mimeheader($names[$key], $htmlencode
|
44 |
mb_internal_encoding('utf-8');
|
45 |
}
|
46 |
}
|
@@ -52,14 +54,16 @@ class Rack_Jpmail_Model_Email_Template extends Mage_Core_Model_Email_Template {
|
|
52 |
if ($this->isPlain()) {
|
53 |
$mail->setBodyText(mb_convert_encoding($text, $textencode, 'utf-8'));
|
54 |
$subject = mb_convert_encoding($this->getProcessedTemplateSubject($variables), $textencode, 'utf-8');
|
|
|
55 |
mb_internal_encoding($textencode);
|
56 |
-
$mail->setFrom($this->getSenderEmail(), mb_encode_mimeheader($
|
57 |
mb_internal_encoding('utf-8');
|
58 |
} else {
|
59 |
$mail->setBodyHTML(mb_convert_encoding($text, $htmlencode, 'utf-8'));
|
60 |
$subject = mb_convert_encoding($this->getProcessedTemplateSubject($variables), $htmlencode, 'utf-8');
|
61 |
-
|
62 |
-
|
|
|
63 |
mb_internal_encoding('utf-8');
|
64 |
}
|
65 |
|
35 |
|
36 |
foreach ($emails as $key => $email) {
|
37 |
if ($this->isPlain()) {
|
38 |
+
$names[$key] = mb_convert_encoding($names[$key], $textencode, 'utf-8');
|
39 |
mb_internal_encoding($textencode);
|
40 |
+
$mail->addTo($email, mb_encode_mimeheader($names[$key], $textencode));
|
41 |
mb_internal_encoding('utf-8');
|
42 |
} else {
|
43 |
+
$names[$key] = mb_convert_encoding($names[$key], $htmlencode, 'utf-8');
|
44 |
mb_internal_encoding($htmlencode);
|
45 |
+
$mail->addTo($email, mb_encode_mimeheader($names[$key], $htmlencode));
|
46 |
mb_internal_encoding('utf-8');
|
47 |
}
|
48 |
}
|
54 |
if ($this->isPlain()) {
|
55 |
$mail->setBodyText(mb_convert_encoding($text, $textencode, 'utf-8'));
|
56 |
$subject = mb_convert_encoding($this->getProcessedTemplateSubject($variables), $textencode, 'utf-8');
|
57 |
+
$senderName = mb_convert_encoding($this->getSenderName(), $textencode, 'utf-8');
|
58 |
mb_internal_encoding($textencode);
|
59 |
+
$mail->setFrom($this->getSenderEmail(), mb_encode_mimeheader($senderName, $textencode));
|
60 |
mb_internal_encoding('utf-8');
|
61 |
} else {
|
62 |
$mail->setBodyHTML(mb_convert_encoding($text, $htmlencode, 'utf-8'));
|
63 |
$subject = mb_convert_encoding($this->getProcessedTemplateSubject($variables), $htmlencode, 'utf-8');
|
64 |
+
$senderName = mb_convert_encoding($this->getSenderName(), $htmlencode, 'utf-8');
|
65 |
+
mb_internal_encoding($textencode);
|
66 |
+
$mail->setFrom($this->getSenderEmail(), mb_encode_mimeheader($senderName, $htmlencode));
|
67 |
mb_internal_encoding('utf-8');
|
68 |
}
|
69 |
|
app/code/community/Rack/Jpmail/Model/Newsletter/Template.php
CHANGED
@@ -91,30 +91,35 @@ class Rack_Jpmail_Model_Newsletter_Template extends Mage_Newsletter_Model_Templa
|
|
91 |
|
92 |
$mail = $this->getMail();
|
93 |
if($this->isPlain()) {
|
|
|
94 |
mb_internal_encoding($textencode);
|
95 |
-
$mail->addTo($email, mb_encode_mimeheader($
|
96 |
mb_internal_encoding('utf-8');
|
97 |
} else {
|
|
|
98 |
mb_internal_encoding($htmlencode);
|
99 |
-
$mail->addTo($email, mb_encode_mimeheader($
|
100 |
mb_internal_encoding('utf-8');
|
101 |
}
|
102 |
|
103 |
$text = $this->getProcessedTemplate($variables, true);
|
104 |
|
105 |
if ($this->isPlain()) {
|
106 |
-
$mail->setBodyText(
|
107 |
-
$mail->setSubject(
|
|
|
|
|
108 |
mb_internal_encoding($textencode);
|
109 |
-
$mail->setFrom($this->getSenderEmail(), mb_encode_mimeheader($
|
110 |
mb_internal_encoding('utf-8');
|
111 |
-
|
112 |
}
|
113 |
else {
|
114 |
-
$mail->setBodyHTML(
|
115 |
-
$mail->setSubject(
|
|
|
|
|
116 |
mb_internal_encoding($htmlencode);
|
117 |
-
$mail->setFrom($this->getSenderEmail(), mb_encode_mimeheader($
|
118 |
mb_internal_encoding('utf-8');
|
119 |
|
120 |
}
|
91 |
|
92 |
$mail = $this->getMail();
|
93 |
if($this->isPlain()) {
|
94 |
+
$name = mb_convert_encoding($name, $textencode, 'utf-8');
|
95 |
mb_internal_encoding($textencode);
|
96 |
+
$mail->addTo($email, mb_encode_mimeheader($name, $textencode));
|
97 |
mb_internal_encoding('utf-8');
|
98 |
} else {
|
99 |
+
$name = mb_convert_encoding($name, $htmlencode, 'utf-8');
|
100 |
mb_internal_encoding($htmlencode);
|
101 |
+
$mail->addTo($email, mb_encode_mimeheader($name, $htmlencode));
|
102 |
mb_internal_encoding('utf-8');
|
103 |
}
|
104 |
|
105 |
$text = $this->getProcessedTemplate($variables, true);
|
106 |
|
107 |
if ($this->isPlain()) {
|
108 |
+
$mail->setBodyText(mb_convert_encoding($text, $textencode, 'utf-8'));
|
109 |
+
$mail->setSubject(mb_convert_encoding($this->getProcessedTemplateSubject($variables), $textencode, 'utf-8'));
|
110 |
+
|
111 |
+
$senderName = mb_convert_encoding($$this->getTemplateSenderName(), $textencode, 'utf-8');
|
112 |
mb_internal_encoding($textencode);
|
113 |
+
$mail->setFrom($this->getSenderEmail(), mb_encode_mimeheader($senderName, $textencode));
|
114 |
mb_internal_encoding('utf-8');
|
|
|
115 |
}
|
116 |
else {
|
117 |
+
$mail->setBodyHTML(mb_convert_encoding($text, $htmlencode, 'utf-8'));
|
118 |
+
$mail->setSubject(mb_convert_encoding($this->getProcessedTemplateSubject($variables), $htmlencode, 'utf-8'));
|
119 |
+
|
120 |
+
$senderName = mb_convert_encoding($$this->getTemplateSenderName(), $htmlencode, 'utf-8');
|
121 |
mb_internal_encoding($htmlencode);
|
122 |
+
$mail->setFrom($this->getSenderEmail(), mb_encode_mimeheader($senderName, $htmlencode));
|
123 |
mb_internal_encoding('utf-8');
|
124 |
|
125 |
}
|
app/code/community/Rack/Jpmail/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Rack_Jpmail>
|
5 |
-
<version>0.2.
|
6 |
</Rack_Jpmail>
|
7 |
</modules>
|
8 |
<global>
|
@@ -47,6 +47,9 @@
|
|
47 |
<jpmail>
|
48 |
<title>Multibyte email Setting</title>
|
49 |
</jpmail>
|
|
|
|
|
|
|
50 |
</children>
|
51 |
</config>
|
52 |
</children>
|
@@ -62,6 +65,9 @@
|
|
62 |
<jpmail>
|
63 |
<title>Multibyte email Setting</title>
|
64 |
</jpmail>
|
|
|
|
|
|
|
65 |
</children>
|
66 |
</config>
|
67 |
</children>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Rack_Jpmail>
|
5 |
+
<version>0.2.3</version>
|
6 |
</Rack_Jpmail>
|
7 |
</modules>
|
8 |
<global>
|
47 |
<jpmail>
|
48 |
<title>Multibyte email Setting</title>
|
49 |
</jpmail>
|
50 |
+
<extsmtp>
|
51 |
+
<title>External SMTP Setting</title>
|
52 |
+
</extsmtp>
|
53 |
</children>
|
54 |
</config>
|
55 |
</children>
|
65 |
<jpmail>
|
66 |
<title>Multibyte email Setting</title>
|
67 |
</jpmail>
|
68 |
+
<extsmtp>
|
69 |
+
<title>External SMTP Setting</title>
|
70 |
+
</extsmtp>
|
71 |
</children>
|
72 |
</config>
|
73 |
</children>
|
app/code/community/Rack/Jpmail/etc/system.xml
CHANGED
@@ -83,6 +83,77 @@
|
|
83 |
</fields>
|
84 |
</jpmail>
|
85 |
</groups>
|
86 |
-
</jpmail>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
</sections>
|
88 |
</config>
|
83 |
</fields>
|
84 |
</jpmail>
|
85 |
</groups>
|
86 |
+
</jpmail>
|
87 |
+
<extsmtp translate="label" module="jpmail">
|
88 |
+
<label>External Smtp Settings</label>
|
89 |
+
<tab>jpmail</tab>
|
90 |
+
<frontend_type>text</frontend_type>
|
91 |
+
<sort_order>130</sort_order>
|
92 |
+
<show_in_default>1</show_in_default>
|
93 |
+
<show_in_website>1</show_in_website>
|
94 |
+
<show_in_store>1</show_in_store>
|
95 |
+
<groups>
|
96 |
+
<extsmtp translate="label">
|
97 |
+
<label>External Smtp Settings</label>
|
98 |
+
<frontend_type>text</frontend_type>
|
99 |
+
<sort_order>10</sort_order>
|
100 |
+
<show_in_default>1</show_in_default>
|
101 |
+
<show_in_website>1</show_in_website>
|
102 |
+
<show_in_store>1</show_in_store>
|
103 |
+
<fields>
|
104 |
+
<use_external translate="label">
|
105 |
+
<label>Use External SMTP</label>
|
106 |
+
<frontend_type>select</frontend_type>
|
107 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
108 |
+
<sort_order>10</sort_order>
|
109 |
+
<show_in_default>1</show_in_default>
|
110 |
+
<show_in_website>1</show_in_website>
|
111 |
+
<show_in_store>1</show_in_store>
|
112 |
+
</use_external>
|
113 |
+
<smtp_host translate="label">
|
114 |
+
<label>SMTP Host</label>
|
115 |
+
<frontend_type>text</frontend_type>
|
116 |
+
<sort_order>11</sort_order>
|
117 |
+
<show_in_default>1</show_in_default>
|
118 |
+
<show_in_website>1</show_in_website>
|
119 |
+
<show_in_store>1</show_in_store>
|
120 |
+
</smtp_host>
|
121 |
+
<smtp_port translate="label">
|
122 |
+
<label>SMTP Port</label>
|
123 |
+
<frontend_type>text</frontend_type>
|
124 |
+
<sort_order>12</sort_order>
|
125 |
+
<show_in_default>1</show_in_default>
|
126 |
+
<show_in_website>1</show_in_website>
|
127 |
+
<show_in_store>1</show_in_store>
|
128 |
+
</smtp_port>
|
129 |
+
<smtp_secure translate="label">
|
130 |
+
<label>Use SSL</label>
|
131 |
+
<frontend_type>select</frontend_type>
|
132 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
133 |
+
<sort_order>13</sort_order>
|
134 |
+
<show_in_default>1</show_in_default>
|
135 |
+
<show_in_website>1</show_in_website>
|
136 |
+
<show_in_store>1</show_in_store>
|
137 |
+
</smtp_secure>
|
138 |
+
<smtp_user translate="label">
|
139 |
+
<label>SMTP User</label>
|
140 |
+
<frontend_type>text</frontend_type>
|
141 |
+
<sort_order>14</sort_order>
|
142 |
+
<show_in_default>1</show_in_default>
|
143 |
+
<show_in_website>1</show_in_website>
|
144 |
+
<show_in_store>1</show_in_store>
|
145 |
+
</smtp_user>
|
146 |
+
<smtp_password translate="label">
|
147 |
+
<label>SMTP Password</label>
|
148 |
+
<frontend_type>password</frontend_type>
|
149 |
+
<sort_order>15</sort_order>
|
150 |
+
<show_in_default>1</show_in_default>
|
151 |
+
<show_in_website>1</show_in_website>
|
152 |
+
<show_in_store>1</show_in_store>
|
153 |
+
</smtp_password>
|
154 |
+
</fields>
|
155 |
+
</extsmtp>
|
156 |
+
</groups>
|
157 |
+
</extsmtp>
|
158 |
</sections>
|
159 |
</config>
|
app/locale/ja_JP/Rack_Jpmail.csv
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"Multibyte Email Settings","マルチバイトメール設定"
|
2 |
+
"multibyte email setting","マルチバイトメール設定"
|
3 |
+
"text mail character set","テキストメール文字コード"
|
4 |
+
"html mail character set","HTMLメール文字コード"
|
5 |
+
"use return path","Return-Pathを使用する"
|
6 |
+
"return path","return path"
|
7 |
+
"use reply to","Reply-toを使用する"
|
8 |
+
"reply to","reply to"
|
package.xml
CHANGED
@@ -1,14 +1,15 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Rack_Jpmail</name>
|
4 |
-
<version>0.2.
|
5 |
<stability>stable</stability>
|
6 |
<license>Open Software Lisence 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.2.
|
|
|
12 |
0.2.1 Modify for 1.5 and 1.6
|
13 |
0.2.0 Add External SMTP Server setting
|
14 |
0.1.6 Add Sender Name Encoding
|
@@ -20,9 +21,9 @@
|
|
20 |
Add Newsletter/Template.php
|
21 |
0.1.2 Fix Bug.</notes>
|
22 |
<authors><author><name>Hirokazu Nishi</name><user>hirokazu_n</user><email>nishi@principle-works.jp</email></author></authors>
|
23 |
-
<date>2011-12-
|
24 |
-
<time>
|
25 |
-
<contents><target name="magelocale"><dir name="ja_JP"><file name="Rack_Jpmail.csv" hash=""/></dir><dir name="en_US"><file name="Rack_Jpmail.csv" hash=""/></dir></target><target name="magecommunity"><dir name="Rack"><dir name="Jpmail"><dir name="Helper"><file name="Data.php" hash="184fbc5691c3478047810b827c919dc9"/></dir><dir name="Model"><dir name="Email"><file name="Template.php" hash="
|
26 |
<compatible/>
|
27 |
<dependencies><required><php><min>5.2.0</min><max>5.3.99</max></php><extension><name>mbstring</name><min></min><max></max></extension></required></dependencies>
|
28 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Rack_Jpmail</name>
|
4 |
+
<version>0.2.3</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>Open Software Lisence 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.2.3 Fix bug.
|
12 |
+
0.2.2 Fix sender and recipient name broken under double byte env
|
13 |
0.2.1 Modify for 1.5 and 1.6
|
14 |
0.2.0 Add External SMTP Server setting
|
15 |
0.1.6 Add Sender Name Encoding
|
21 |
Add Newsletter/Template.php
|
22 |
0.1.2 Fix Bug.</notes>
|
23 |
<authors><author><name>Hirokazu Nishi</name><user>hirokazu_n</user><email>nishi@principle-works.jp</email></author></authors>
|
24 |
+
<date>2011-12-30</date>
|
25 |
+
<time>06:57:11</time>
|
26 |
+
<contents><target name="magelocale"><dir name="ja_JP"><file name="Rack_Jpmail.csv" hash="6323d98df9db69ac9c1da46c9e122525"/></dir><dir name="en_US"><file name="Rack_Jpmail.csv" hash=""/></dir></target><target name="magecommunity"><dir name="Rack"><dir name="Jpmail"><dir name="Helper"><file name="Data.php" hash="184fbc5691c3478047810b827c919dc9"/></dir><dir name="Model"><dir name="Email"><file name="Template.php" hash="7c821d7da0def69eebff045f0e76caa9"/></dir><dir name="Newsletter"><file name="Template.php" hash="62f42463353effcd423b945c8d085a12"/></dir></dir><dir name="etc"><file name="config.xml" hash="21e15931415f96ab129d65710c0dca15"/><file name="system.xml" hash="4933a0fe7e1bd4249b8582373d312022"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Rack_Jpmail.xml" hash="15330a682c67f43d2510c0e72991bc53"/></dir></target></contents>
|
27 |
<compatible/>
|
28 |
<dependencies><required><php><min>5.2.0</min><max>5.3.99</max></php><extension><name>mbstring</name><min></min><max></max></extension></required></dependencies>
|
29 |
</package>
|