-2
<?php
$subject = $this->language->get('text_subject');
$message = "este es el mensaje";
$html = "<html><head><title>Documento sin título</title></head><table>
<tr>
<td>Ticket</td>
<td>Status</td>
<td>action</td>
<td>account type</td>
</tr>
<tr>
<td>1</td>
<td>COMPLETED</td>
<td>CREATE</td>
<td>DEMO</td>
</tr>
</table><body></body></html>"
$mail = new Mail();
$mail->protocol = $this->config->get('config_mail_protocol');
$mail->parameter = $this->config->get('config_mail_parameter');
$mail->hostname = $this->config->get('config_smtp_host');
$mail->username = $this->config->get('config_smtp_username');
$mail->password = $this->config->get('config_smtp_password');
$mail->port = $this->config->get('config_smtp_port');
$mail->timeout = $this->config->get('config_smtp_timeout');
$mail->setTo($customer_query->row['email']);
$mail->setFrom($this->config->get('config_email'));
$mail->setSender($this->config->get('config_name'));
$mail->setSubject(html_entity_decode($subject, ENT_QUOTES, 'UTF-8'));
$mail->setHtml($html);
$mail->setText(html_entity_decode($message, ENT_QUOTES, 'UTF-8'));
$mail->send();?>
이메일을 보내려면이 코드가 필요합니다. $html
에는 코드 html이 포함되어 있지만 html 코드 만 나타나고 텍스트는 나타나지 않습니다. 코드에 오류가 있습니까?PHP와 HTML 콘텐츠로 이메일 보내기
이메일에 사용하는 클래스입니다. HTML 메일을 보내도록 설정해야합니다. 및 $ html 희망이 어딘가에 통해 UR 스크립트에 정의 된 –
코드를 수정했습니다 –
텍스트 본문은 그냥 "este es el mensaje"입니다 $ 메시지로 설정됩니다 - 당신이 보내고 싶은 무엇입니까? – PeterK