PHP邮件图像模板

PHP邮件图像模板,php,Php,以下是我的电子邮件模板内容(图像)的代码 现在的问题是,当我收到电子邮件,它显示图像链接 如何显示图像而不是文件位置 需要用HTML制作一个模板,然后调用src tag中的图像数据这里没有生成电子邮件的代码???如果你有图像URL,并且想在普通HTML页面中而不是电子邮件中显示它,你会怎么做…?(当然,您必须在此处使用绝对URL,因此您需要在相对URL前面添加适当的前缀。)@riggsfully这是生成内容的部分。代码下面是$mailthingy@Micho我们可以看一下你的$mail吗。下面

以下是我的电子邮件模板内容(图像)的代码

现在的问题是,当我收到电子邮件,它显示图像链接


如何显示图像而不是文件位置

需要用HTML制作一个模板,然后调用src tag中的图像数据

这里没有生成电子邮件的代码???如果你有图像URL,并且想在普通HTML页面中而不是电子邮件中显示它,你会怎么做…?(当然,您必须在此处使用绝对URL,因此您需要在相对URL前面添加适当的前缀。)@riggsfully这是生成内容的部分。代码下面是$mailthingy@Micho我们可以看一下你的
$mail
吗。下面的代码是将图像放入电子邮件的代码所在,所以这个代码基本上是不相关的。我们需要看的代码是你没有给我们看的代码:)这太模糊了,对任何人都没有真正的用处。
$order_query  = $this->db->query("SELECT oi.*,des.image FROM " . DB_PREFIX ."order_items oi
                   LEFT JOIN ".DB_PREFIX ."item_description  des on oi.item_id = des.item_id
                WHERE oi.order_id = '" . (int)$order_id .  "'");

foreach ($order_query ->rows as $orderproduct) {
    $data['orderproduct'] = array();
        $data['orderproduct'][] = array(
            'name' => $orderproduct['name'],
            'image' => $orderproduct['image']

        );
}

foreach ($order_query ->rows as $orderproduct) {
    $text .= $orderproduct['quantity'] . 'x ' . $orderproduct['image'] . "\n";

}



$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($order_info['email']);
$mail->setFrom($this->config->get('config_email'));
$mail->setSender(html_entity_decode($order_info['store_name'], ENT_QUOTES, 'UTF-8'));
$mail->setSubject($language->get(html_entity_decode($language->get('subject_prefix')).' '.$order_info['store_name']));
$mail->setText($text);
$mail->send();