所以我的问题是,我有多个露天商店,当使用"内置"联系表格时,我们收件箱中的电子邮件只在主题字段中显示所问的特定问题,这就一团糟。所以我想你可以说很难判断电子邮件来自哪家商店。
我一直在寻找contact.php的控制器,它看起来像这样:
$mail->setTo($this->config->get('config_email'));
$mail->setFrom($this->request->post['email']);
$mail->setSender(html_entity_decode($this->request->post['name'],ENT_QUOTES,'UTF-8'));
$mail->setSubject(html_entity_decode(sprintf($this->language->get('email_subject'), $this->request->post['name']), ENT_QUOTES, 'UTF-8'));
$mail->setText($this->request->post['enquiry']);
$mail->send();
所以我需要在setSubject中添加一些内容,但我真的不知道是什么。尝试以某种方式添加"config_name",但在商店的联系人表单上按"提交"后,它只显示了一个空白页面。
最好的选择是在所有收到的联系人电子邮件的主题行中添加我想要的任何文本。
感谢您的帮助!提前感谢!
更改:
$mail->setSubject(html_entity_decode(sprintf($this->language->get('email_subject'), $this->request->post['name']), ENT_QUOTES, 'UTF-8'));
至
$mail->setSubject(html_entity_decode(sprintf($this->language->get('email_subject').': '.$this->config->get('config_name'), $this->request->post['name']), ENT_QUOTES, 'UTF-8'));