我有一个PHP
文件,我正在尝试向用户发送电子邮件,而且它有点工作......
我可以看到我想要的主题,消息和值,但是如果我发送图像(例如背景)我看不到它,(但我可以附上它,电子邮件用户会收到它...)
当我收到电子邮件时,我看到了:
有没有办法发送我的邮件,以后我的用户可以看到它和图像?
这是我的代码
$cuerpo = '
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>
</head>
<body>
<table width="650">
<tr>
<td><img width="650" src="http://pla...et/promo1/images/logo-barreras.png" /></td>
</tr>
<tr>
<td style="background-color:#E6E6E3">
<table>
<tr>
<td><img width="360" src="http://plas.net/promo1/images/barreras.png" /></td>
<td><p style="float:right; padding:20px; text-align:justify; font-family:Arial, Helvetica, sans-serif; color:#666">
<h1 style="font-family:Arial, Helvetica, sans-serif; color:#8A0E13; ">HSB 100</h1>
<ul style="font-family:Arial, Helvetica, sans-serif; font-size:12px; padding:10px;">
<li style="padding-bottom:10px">Barrera de alta velocidad hecha de acero de alta calidad, con un acabado de pintura en polvo antioxidante y anti-corrosivo.</li>
<li style="padding-bottom:10px">Este modelo fue diseñado de acuerdo a los requerimientos de las carreteras nacionales y es especial para usarlas en ellas.</li>
<li style="padding-bottom:10px">Tiempo de apertura menor a 1 segundo.</li>
<li style="padding-bottom:10px">Brazo abatible</li>
<li>Proteccion en el brazo para amortiguar golpes.</li>
</ul>
</p></td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="background-color:#9C0; padding:20px; font-family:Arial, Helvetica, sans-serif; color:#FFF; font-size:16px;">
<table width="600">
<tr>
<td><a target="_blank" href="http://playss.net/"><b>www.some.net</b></a></td>
<td>anemail@mail.net</td>
<td><b>number phone</b></td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
';
require_once('dompdf/AttachMailer.php');
$mailer = new AttachMailer("mymail@mail.com.mx", $email, "Hola", "$cuerpo");
$mailer->send() ? "Enviado": "Problema al enviar";