Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • Sign Up

[Решено] html - письмо админу из формы обратной связи

Recommended Posts

Добрый день!

Подскажите кто-нибудь, как сделать письмо админу, которое отправляется через форму обратной связи, в виде таблички,  а не просто текстом. Создала форму заявки на основе стандартной формы обратной связи, в ней много полей, а вид письма админу просто ужасен, нужно как-то упорядочить передаваемые данные, достаточно простой таблицы без особой красоты, главное, чтоб было читабельно



Link to post
Share on other sites

  • 2 months later...

Сделала так:


            $html = '<b>'.$this->language->get('heading_title').'</b><br />';
            $html .= '<table border="1px" width="800px" cellpadding="10" cellspacing="2">
            <tr style="background: #cff7d8;">
            <td width="300px">
            <td width="200px">
            <td width="200px">
            <td width="100px">
            <td width="300px">
            <td width="200px">'.$this->request->post['okna_1_1'] . ' x ' .$this->request->post['okna_1_2'].'
            <td width="200px">'.$this->request->post['kam_1'].'
            <td width="100px">'.$this->request->post['kol1'].'
            ...... и т.д. моя таблица с данными....
            $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->setSubject(html_entity_decode(sprintf($this->language->get('email_subject'), $this->request->post['name']), ENT_QUOTES, 'UTF-8'));
            $mail->setText(strip_tags(html_entity_decode($text, ENT_QUOTES, 'UTF-8')));

  • +1 1
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.