Im пытается отобразить электронные письма на моем сайте. Проблема в том, что эти письма содержат html и css, что означает, что я вдруг получаю зеленый фон на странице. его не обрабатывать почту должным образом. Иногда я вижу HTML-теги и так далее. (SE изображение в ссылке ниже)Render mail in html page
Я мастерил свои мысли на IFRAME. Но, как вы видите, у меня нет ссылки на ссылку в параметре iframe src.
Это части кода, который им с помощью (MVC)
Это функция модели, что им с помощью
function get_mail_num($email_number)
{
$connection = imap_open($this->server, $this->user, $this->password);
$mail['overview'] = imap_fetch_overview($connection,$email_number,0);
$mail['message'] = imap_fetchbody($connection,$email_number,2);
imap_close($connection);
return $mail;
}
Это функция контроллера, которые featching на почту и посылки их к виду
function index() // the inbox
{
$this->load->model('mail_model');
$this->load->library('pagination');
$this->load->library('table');
// config for table
$config['total_rows'] = $this->mail_model->get_size();
$config['per_page'] = 10;
$config['full_tag_open'] = '<div id="pagination">';
$config['full_tag_close'] = '</div>';
$config['base_url'] = 'http://nullpointer.se/mailendar/mail/index';
$config['num_links'] = 4;
if(!$this->uri->segment(3)){$offset = 1;}else{$offset = $this->uri->segment(3);}
$records = $this->mail_model->get_mail_header($config['per_page'],$offset);
$data['output'] ="";
$id = $offset;
for($i = 0; $i < count($records);$i++)
{
if(empty($records[$i]->subject))
{
$records[$i]->subject = "No Subject";
}
$data['output'].= '<div onclick="funct('.$id.')" class="toggler '.($records[$i]->seen ? 'read' : 'unread').'">';
$data['output'].= '<span class="subject">'.$records[$i]->subject.'</span> ';
$data['output'].= '<span class="from">'.$records[$i]->from.'</span>';
$data['output'].= '<span class="date">on '.$records[$i]->date.'</span>';
$data['output'].= '</div>';
$data['output'].= "<div class='body' id ='{$id}'> </div>";
$id++;
}
$this->pagination->initialize($config);
$data['page'] = "pages/mail";
$this->load->view('includes/template',$data);
}
Это мнение, что показывает все
<div id="main" class="span-19 last colborder">
<h2>Mail</h2>
<?php echo $output//$this->table->generate(); ?>
<?php echo $this->pagination->create_links(); ?>
</div>
<div id = "sidebar" class = "span-4 last">
<h2>Options</h2>
<a href = "Convert" class ="button">Convert</a>
<a href = "Remove" class ="button">Remove</a>
<a href = "Move" class ="button">Move</a>
</div>
Просьба ссылаться на изображение большего размера. Ваш 3600x1080 PNG слишком мал для моего 90-дюймового монитора. – j08691