diff --git a/src/Aimeos/Shop/Base/Context.php b/src/Aimeos/Shop/Base/Context.php
index <HASH>..<HASH> 100644
--- a/src/Aimeos/Shop/Base/Context.php
+++ b/src/Aimeos/Shop/Base/Context.php
@@ -70,7 +70,7 @@ class Context
 			$dbm = new \MW_DB_Manager_PDO( $config );
 			$context->setDatabaseManager( $dbm );
 
-			$mail = new \MW_Mail_Swift( \Mail::getSwiftMailer() );
+			$mail = new \MW_Mail_Swift( function() { return app( 'mail' )->getSwiftMailer(); } );
 			$context->setMail( $mail );
 
 			$logger = \MAdmin_Log_Manager_Factory::createManager( $context );
Delay creating mail object for performance reasons