設置$die
參數真正顯示錯誤。您將需要_PS_MODE_DEV_
設置爲true
才能看到它。
/**
* Send Email
*
* @param int $id_lang Language ID of the email (to translate the template)
* @param string $template Template: the name of template not be a var but a string !
* @param string $subject Subject of the email
* @param string $template_vars Template variables for the email
* @param string $to To email
* @param string $to_name To name
* @param string $from From email
* @param string $from_name To email
* @param array $file_attachment Array with three parameters (content, mime and name). You can use an array of array to attach multiple files
* @param bool $mode_smtp SMTP mode (deprecated)
* @param string $template_path Template path
* @param bool $die Die after error
* @param string $bcc Bcc recipient
* @return bool|int Whether sending was successful. If not at all, false, otherwise amount of recipients succeeded.
*/
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, $bcc = null, $reply_to = null)
或者你可以去後臺和菜單Advanced Parameters -> Logs
,鍵入消息過濾器:error
和搜索結果。不能保證它只會顯示你的電子郵件錯誤,但它會縮小很多。