Skip to content

Commit

Permalink
Fix frontend and mail sending on the suite-nonsplit
Browse files Browse the repository at this point in the history
  • Loading branch information
vvs82 committed Jul 20, 2020
1 parent 04c938c commit b040893
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
43 changes: 43 additions & 0 deletions application/app_files/Mailer.nonsplit.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
--- ./src/Pyz/Zed/Mail/MailDependencyProvider.php 2020-07-15 10:36:13.198516641 +0000
+++ ./src/Pyz/Zed/Mail/MailDependencyProvider.php.old 2020-07-15 10:20:29.023345911 +0000
@@ -30,10 +30,6 @@
use Spryker\Zed\Oms\Communication\Plugin\Mail\OrderConfirmationMailTypePlugin;
use Spryker\Zed\Oms\Communication\Plugin\Mail\OrderShippedMailTypePlugin;
use Spryker\Zed\SalesInvoice\Communication\Plugin\Mail\OrderInvoiceMailTypePlugin;
-use Spryker\Zed\Mail\Dependency\Mailer\MailToMailerBridge;
-use Swift_Mailer;
-use Swift_Message;
-use Swift_SmtpTransport;

class MailDependencyProvider extends SprykerMailDependencyProvider
{
@@ -42,29 +38,6 @@
*
* @return \Spryker\Zed\Kernel\Container
*/
-
- protected function addMailer(Container $container)
- {
- $container[static::MAILER] = function () {
- $message = new Swift_Message();
- $transport = new Swift_SmtpTransport(
- $this->getConfig()->getSmtpHost(),
- $this->getConfig()->getSmtpPort()
- );
- $transport->setHost(getenv('SMTP_HOST'));
- $transport->setPort(getenv('SMTP_PORT'));
- $transport->setUsername(getenv('SMTP_USER'));
- $transport->setPassword(getenv('SMTP_PASS'));
- $transport->setEncryption("ssl");
-
- $mailer = new Swift_Mailer($transport);
-
- return new MailToMailerBridge($message, $mailer);
- };
-
- return $container;
- }
-
public function provideBusinessLayerDependencies(Container $container)
{
$container = parent::provideBusinessLayerDependencies($container);
2 changes: 1 addition & 1 deletion spryker/frontend-build-config-nonsplit.json.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"path": "assets/%theme%%namespace%",
"path": "assets/%SPRYKER_BUILD_HASH%/%theme%",
"namespaces": [
{% for store in stores %}
{
Expand Down

0 comments on commit b040893

Please sign in to comment.