Php 提交价格表需求后出现未捕获错误

Php 提交价格表需求后出现未捕获错误,php,opencart,Php,Opencart,我们正在使用开放式购物车进行网站开发,最近,当一个用户在网站上注册说新客户已在网站上注册时,我将回复邮件地址更改为我想要的地址,现在我在提交另一个表单(价格请求)后收到错误 请看一下错误,这是我的代码 $mail = new Mail(); $mail->protocol = $this->config->get('config_mail_protocol'); $mail->parameter = $this->co

我们正在使用开放式购物车进行网站开发,最近,当一个用户在网站上注册说新客户已在网站上注册时,我将回复邮件地址更改为我想要的地址,现在我在提交另一个表单(价格请求)后收到错误

请看一下错误,这是我的代码

        $mail = new Mail();
        $mail->protocol = $this->config->get('config_mail_protocol');
        $mail->parameter = $this->config->get('config_mail_parameter');
        $mail->smtp_hostname = $this->config->get('config_mail_smtp_hostname');
        $mail->smtp_username = $this->config->get('config_mail_smtp_username');
        $mail->smtp_password = html_entity_decode($this->config->get('config_mail_smtp_password'), ENT_QUOTES, 'UTF-8');
        $mail->smtp_port = $this->config->get('config_mail_smtp_port');
        $mail->smtp_timeout = $this->config->get('config_mail_smtp_timeout');

        $mail->setTo($this->config->get('config_email'));
        $mail->setFrom($this->config->get('config_email'));
        $mail->setReplyTo('example@domain.com');
        $mail->setSender(html_entity_decode($this->config->get('config_name'), ENT_QUOTES, 'UTF-8'));
        $mail->setSubject(html_entity_decode($this->language->get('text_new_customer'), ENT_QUOTES, 'UTF-8') . '-' . date('d-m-y'));
        //$mail->sethtml($message);
        $mail->setText($message_admin);
        $mail->send();

你能给我们看一下你的代码吗。“错误:电子邮件是必需的!”-你真的设置了电子邮件属性吗?这通常与
ReplyTo
的属性不同。您可以使用var\u dump()
$this->config->get('config\u email')
$this->config->get('config\u email')
?其中一个可能是空的。即使我删除了代码$mail->setReplyTo('s)行,也会出现错误example@domain.com”),请为我提供更好的解决方案
        $mail = new Mail();
        $mail->protocol = $this->config->get('config_mail_protocol');
        $mail->parameter = $this->config->get('config_mail_parameter');
        $mail->smtp_hostname = $this->config->get('config_mail_smtp_hostname');
        $mail->smtp_username = $this->config->get('config_mail_smtp_username');
        $mail->smtp_password = html_entity_decode($this->config->get('config_mail_smtp_password'), ENT_QUOTES, 'UTF-8');
        $mail->smtp_port = $this->config->get('config_mail_smtp_port');
        $mail->smtp_timeout = $this->config->get('config_mail_smtp_timeout');

        $mail->setTo($this->config->get('config_email'));
        $mail->setFrom($this->config->get('config_email'));
        $mail->setReplyTo('example@domain.com');
        $mail->setSender(html_entity_decode($this->config->get('config_name'), ENT_QUOTES, 'UTF-8'));
        $mail->setSubject(html_entity_decode($this->language->get('text_new_customer'), ENT_QUOTES, 'UTF-8') . '-' . date('d-m-y'));
        //$mail->sethtml($message);
        $mail->setText($message_admin);
        $mail->send();