-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathose_mail_oc2.xml
123 lines (120 loc) · 5.42 KB
/
ose_mail_oc2.xml
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<modification>
<id><![CDATA[Ose email correction]]></id>
<version><![CDATA[1]]>0.2.1</version>
<vqmver><![CDATA[1]]></vqmver>
<author><![CDATA[Opensource Experts]]></author>
<file path="system/library/" name="mail.php">
<operation>
<search position="replace"><![CDATA[
$header .= 'Reply-To: =?UTF-8?B?' . base64_encode($this->replyto) . '?=' . ' <' . $this->from . '>' . $this->newline;
]]>
</search>
<add><![CDATA[
$header .= 'Reply-To: =?UTF-8?B?' . base64_encode($this->replyto) . '?=' . ' <' . $this->replyto . '>' . $this->newline;
]]></add>
</operation>
<operation>
<search position="replace"><![CDATA[
$this->setReplyTo($this->sender);
]]>
</search>
<add><![CDATA[
$this->setReplyTo($this->from);
]]></add>
</operation>
</file>
<file path="catalog/controller/information/" name="contact.php">
<operation>
<search position="replace"><![CDATA[ $mail->setFrom($this->request->post['email']); ]]>
</search>
<add>
<![CDATA[
$config_mail = $this->config->get('config_mail');
if($config_mail['protocol'] == 'smtp') {
$mail->setFrom($config_mail['smtp_emailaccount']);
}
else { $mail->setFrom($this->config->get('config_email')); }
]]></add>
</operation>
<operation>
<search position="replace"><![CDATA[ $mail->setSender($this->request->post['name']); ]]></search>
<add><![CDATA[
if($config_mail['protocol'] == 'smtp') {
$mail->setSender($config_mail['smtp_emailaccount']);
}
else { $mail->setSender($this->config->get('config_email')); }
$mail->setReplyTo($this->request->post['email']);
]]></add>
</operation>
</file>
<file path="admin/view/template/setting/" name="setting.tpl">
<operation>
<search position="after" offset="2">
<![CDATA[
<input type="text" name="config_mail[smtp_timeout]" value="<?php echo $config_smtp_timeout; ?>" placeholder="<?php echo $entry_smtp_timeout; ?>" id="input-smtp-timeout" class="form-control" />
]]>
</search>
<add>
<![CDATA[
<div class="form-group">
<label class="col-sm-2 control-label" for="input-smtp-emailaccount"><?php echo $entry_smtp_emailaccount; ?></label>
<div class="col-sm-10">
<input type="text" name="config_mail[smtp_emailaccount]" value="<?php echo $config_smtp_emailaccount; ?>" placeholder="<?php echo $entry_smtp_emailaccount; ?>" id="input-smtp-emailaccount" class="form-control" />
</div>
</div>
]]>
</add>
</operation>
</file>
<file path="admin/controller/setting/" name="setting.php">
<operation>
<search position="after">
<![CDATA[ $data['entry_smtp_timeout'] = $this->language->get('entry_smtp_timeout'); ]]>
</search>
<add>
<![CDATA[ $data['entry_smtp_emailaccount'] = $this->language->get('entry_smtp_emailaccount');]]>
</add>
</operation>
<operation>
<search position="after" index="1">
<![CDATA[ $data['config_smtp_timeout'] = $config_mail['smtp_timeout']; ]]>
</search>
<add>
<![CDATA[
$data['config_smtp_emailaccount'] = $config_mail['smtp_emailaccount'];
]]>
</add>
</operation>
<operation>
<search position="after" index="2">
<![CDATA[ $data['config_smtp_timeout'] = $config_mail['smtp_timeout']; ]]>
</search>
<add>
<![CDATA[
if (isset($config_mail['smtp_emailaccount'])){
$data['config_smtp_emailaccount'] = $config_mail['smtp_emailaccount'];
}
else {
$data['config_smtp_emailaccount'] = $this->config->get('config_email');
} ]]>
</add>
</operation>
<operation>
<search position="after">
<![CDATA[ $data['config_smtp_timeout'] = 5; ]]>
</search>
<add><![CDATA[ $data['config_smtp_emailaccount'] = $this->config->get('config_email');]]>
</add>
</operation>
</file>
<file path="admin/language/english/setting/" name="setting.php">
<operation>
<search position="after">
<![CDATA[ $_['entry_smtp_timeout'] = 'SMTP Timeout'; ]]>
</search>
<add>
<![CDATA[$_['entry_smtp_emailaccount'] = 'SMTP Email Address:'; ]]>
</add>
</operation>
</file>
</modification>