Skip to content

Commit

Permalink
Merge pull request #414 from mageplaza/2.4-develop
Browse files Browse the repository at this point in the history
2.4 develop
  • Loading branch information
Linhnv1902 authored Feb 23, 2024
2 parents 131fdd7 + f21d12b commit e93b869
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 25 deletions.
16 changes: 6 additions & 10 deletions Mail/Rse/Mail.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,10 @@
namespace Mageplaza\Smtp\Mail\Rse;

use Mageplaza\Smtp\Helper\Data;
use Zend\Mail\Message;
use Zend\Mail\Transport\Smtp;
use Zend\Mail\Transport\SmtpOptions;
use Laminas\Mail\Message;
use Laminas\Mail\Transport\Smtp;
use Laminas\Mail\Transport\SmtpOptions;
use Zend_Exception;
use Zend_Mail_Transport_Smtp;

/**
* Class Mail
Expand Down Expand Up @@ -70,7 +69,7 @@ class Mail
protected $_returnPath = [];

/**
* @var Zend_Mail_Transport_Smtp
* @var Smtp
*/
protected $_transport;

Expand Down Expand Up @@ -122,7 +121,7 @@ public function setSmtpOptions($storeId, $options = [])
/**
* @param $storeId
*
* @return Zend_Mail_Transport_Smtp | Smtp
* @return Smtp
* @throws Zend_Exception
*/
public function getTransport($storeId)
Expand Down Expand Up @@ -174,10 +173,7 @@ public function getTransport($storeId)

$this->_transport = new Smtp($options);
} else {
$this->_transport = new Zend_Mail_Transport_Smtp(
$this->_smtpOptions[$storeId]['host'],
$this->_smtpOptions[$storeId]
);
$this->_transport = new Smtp();
}
}

Expand Down
2 changes: 1 addition & 1 deletion Mail/Transport.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
use Mageplaza\Smtp\Model\LogFactory;
use Psr\Log\LoggerInterface;
use ReflectionClass;
use Zend\Mail\Message;
use Laminas\Mail\Message;
use Zend_Exception;

/**
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"mageplaza/module-core": "^1.5.5"
},
"type": "magento2-module",
"version": "4.7.10",
"version": "4.7.11",
"license": "proprietary",
"authors": [
{
Expand Down
2 changes: 1 addition & 1 deletion view/adminhtml/templates/marketing.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ switch ($type) {
return;
}
?>
<iframe id="mp-smtp-iframe" src="<?= $iframeUrl ?>" frameborder="0" width="100%" scrolling="no"></iframe>
<iframe id="mp-smtp-iframe" src="<?= /* @noEscape */ $iframeUrl ?>" frameborder="0" width="100%" scrolling="no"></iframe>
2 changes: 1 addition & 1 deletion view/adminhtml/templates/system/config/button.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
{
"#smtp_configuration_option_test_email_to": {
"mageplaza/testemail": {
"ajaxUrl": "<?= $block->getButtonUrl() ?>"
"ajaxUrl": "<?= /* @noEscape */ $block->getButtonUrl() ?>"
}
}
}
Expand Down
22 changes: 11 additions & 11 deletions view/adminhtml/templates/view.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ $sendUrl = $block->getUrl('adminhtml/smtp_abandonedcart/send', ['id' => $quote->
?>
<div class="admin__field field field-store_view">
<label class="label admin__field-label">
<span><?= __('Store View') ?></span>
<span><?= /* @noEscape */ __('Store View') ?></span>
</label>
<div class="admin__field-control control">
<div id="store_view" class="control-value admin__field-value">
Expand All @@ -124,16 +124,16 @@ $sendUrl = $block->getUrl('adminhtml/smtp_abandonedcart/send', ['id' => $quote->
?>
<div class="admin__field field field-created_date">
<label class="label admin__field-label">
<span><?= __('Created Date') ?></span>
<span><?= /* @noEscape */ __('Created Date') ?></span>
</label>
<div class="admin__field-control control">
<div id="created_date" class="control-value admin__field-value"><?= $storeDate ?></div>
<div id="created_date" class="control-value admin__field-value"><?= /* @noEscape */ $storeDate ?></div>
</div>
</div>
<div class="admin__field field field-customer_name " >
<label class="label admin__field-label" for="customer_name" ><span><?= /* @noEscape */ __('Customer Name') ?></span></label>
<div class="admin__field-control control">
<div id="customer_name" class="control-value admin__field-value"><?= $customerName ?></div>
<div id="customer_name" class="control-value admin__field-value"><?= /* @noEscape */ $customerName ?></div>
</div>
</div>
<div class="admin__field field field-customer_email ">
Expand Down Expand Up @@ -165,7 +165,7 @@ $sendUrl = $block->getUrl('adminhtml/smtp_abandonedcart/send', ['id' => $quote->
</label>
<div class="admin__field-control control">
<div id="shipping_address" class="control-value admin__field-value">
<?= $block->getFormattedAddress($quote->getShippingAddress(), $quote->getStoreId()) ?>
<?= /* @noEscape */ $block->getFormattedAddress($quote->getShippingAddress(), $quote->getStoreId()) ?>
</div>
</div>
</div>
Expand All @@ -178,7 +178,7 @@ $sendUrl = $block->getUrl('adminhtml/smtp_abandonedcart/send', ['id' => $quote->
</label>
<div class="admin__field-control control">
<div id="billing_address" class="control-value admin__field-value">
<?= $block->getFormattedAddress($quote->getBillingAddress(), $quote->getStoreId()) ?>
<?= /* @noEscape */ $block->getFormattedAddress($quote->getBillingAddress(), $quote->getStoreId()) ?>
</div>
</div>
</div>
Expand Down Expand Up @@ -292,21 +292,21 @@ $sendUrl = $block->getUrl('adminhtml/smtp_abandonedcart/send', ['id' => $quote->

<!-- START: POPUP SEND EMAIL-->
<div id ="popup-send-email" style="display: none">
<form method="post" action="<?= $sendUrl ?>" name="cart_recovery_form">
<form method="post" action="<?= /* @noEscape */ $sendUrl ?>" name="cart_recovery_form">
<fieldset class="fieldset admin__fieldset">
<legend class="admin__legend legend admin__page-section-title">
<span><?= $block->escapeHtml(__('Cart Recovery Email')) ?></span>
</legend>
</fieldset>
<div class="admin__field field field-to" id="action" style="height: 50px;">
<button style="float: right;margin: 0 6px" id="popup-send-email-send" title="<?= $block->escapeHtml(__('Send')) ?>" type="submit" class="action-default scalable primary">
<span><?= __('Send') ?></span>
<span><?= /* @noEscape */ __('Send') ?></span>
</button>
<button style="float: right;margin: 0 6px" id="popup-send-email-preview" title="<?= $block->escapeHtml(__('Preview')) ?>" type="button" class="action-default" >
<span><?= __('Preview') ?></span>
<span><?= /* @noEscape */ __('Preview') ?></span>
</button>
<button style="float: right;margin: 0 6px;display: none" id="popup-send-email-back" title="<?= $block->escapeHtml(__('Back')) ?>" type="button" class="action-default" >
<span><?= __('Back') ?></span>
<span><?= /* @noEscape */ __('Back') ?></span>
</button>
</div>
<div id="messages" style="margin-bottom: 15px"></div>
Expand Down Expand Up @@ -334,7 +334,7 @@ $sendUrl = $block->getUrl('adminhtml/smtp_abandonedcart/send', ['id' => $quote->
<label class="label admin__field-label"><span><?= $block->escapeHtml(__('Email Template')) ?></span></label>
<div class="admin__field-control control">
<select id="email-template" name="email_template" title="Email Template" class="select admin__control-select" >
<?= $block->getEmailTemplateOptions() ?>
<?= /* @noEscape */ $block->getEmailTemplateOptions() ?>
</select>
<div class="note admin__field-note">
<?= /* @noEscape */ __('You can go to <strong>Marketing > Communications > Email Template</strong> to create new template or edit available template') ?>
Expand Down

0 comments on commit e93b869

Please sign in to comment.