Mail.php という名前のオーバーライド/クラスでファイルを作成し、以下のコードを使用しようとしました。システムから送信されたすべてのメールを BCC しようとしています。基本的には、メールが送信されているかどうかを確認したいと考えています。
Prestashop 1.5.0 と SMTP メールを使用しています。modemtp を null から true に変更しようとしましたが、どちらも機能しませんでした。
私は自分の注文でこれをテストしており、通常のメールと bcced のメールを 2 回受信する予定です。1つだけ取得します。
<?php
class Mail extends MailCore
{
public static function Send($id_lang, $template, $subject, $template_vars, $to,
$to_name = null, $from = null, $from_name = null, $file_attachment = null, $mode_smtp = null, $template_path = _PS_MAIL_DIR_, $die = false, $id_shop = null)
{
// send to customer
$ret = parent::Send($id_lang, $template, $subject, $template_vars, $to, $to_name, $from, $from_name, $file_attachment, $mode_smtp, $template_path, $die, $id_shop);
// send to shop owner
parent::Send($id_lang, $template, $subject, $template_vars, "my@email.com - I really put MY email here no worries", $to_name, $from, $from_name, $file_attachment, $mode_smtp, $template_path, $die, $id_shop);
return $ret;
}
}
?>