问题
Is there a way to tell shopware not to send email inside of function called by event "Enlight_Components_Mail_Send"?
回答1:
Do you want to deprecate all emails in shopware or certain?
If you want to deprecate all emails in shopware you need to add into
SHOPWARE_ROOT/config.php
<?php return array (
'db' =>
array (
'host' => 'YOU_HOST',
'port' => 'YOU_PORT',
'username' => 'YOU_USER',
'password' => 'YOU_PASS',
'dbname' => 'YOU_DATABASE',
),
'mail' =>
array(
'type' => 'file',
)
);
In this case mail will be saved as file instead of sending via SMTP.
来源:https://stackoverflow.com/questions/50291801/how-to-prevent-sending-of-emails-using-event-enlight-components-mail-send