Jump to content

email issue - [My Website] Message from contact form [no_sync]


Recommended Posts

Prestashop 1.6.1.7 

New site being worked on in demo mode.

 

I tested my contact form and received a message with the subject of:

 

[My Website] Message from contact form [no_sync]

 

How do I fix this and what's it for:  [no_sync]

 

TemplateMonster suggests this is a PrestaShop engine issue and is not related to the template.

 

Also the logo is gigantic in the body of the email. Where do I resize it for the emails, please?

Link to comment
Share on other sites

It's line 189 (in PrestaShop v1.6.1.7) of controllers/front/ContactController.php that adds [no_sync] to the subject line:
                        if (!Mail::Send($this->context->language->id, 'contact', Mail::l('Message from contact form').' [no_sync]',

You can delete .' [no_sync]' to remove it.

For the logo size in the emails, you'll need to edit all the HTML mail templates in the mails directory and add a width and height to the logo <img> tags to reduce the size. For example, change:
         <img src="{shop_logo}" alt="{shop_name}" />

to:

         <img src="{shop_logo}" alt="{shop_name}" width="250" height="100" />

Change 250 to the width of your logo in pixels and 100 to the height.

  • Like 4
Link to comment
Share on other sites

Thank you very much for this help. It took a while to update all the HTML mail templates, but my logo is now back to the normal size in emails.

 

Is it okay to also delete what I bolded here? [My Site] Your message has been correctly sent #ct4 #tcq0czkzw1xR4E

In other words, can the subject just say "Your message has been sent"?

 

Thank you!

Link to comment
Share on other sites

I found the following comment on line 427 of controllers/admin/AdminCustomerThreadsController.php:

                    //#ct == id_customer_thread    #tc == token of thread   <== used in the synchronization imap

It seems those are used to correctly synchronise emails when you're using IMAP, so I think you can't remove them unless you're using PHP mail.

  • Like 1
Link to comment
Share on other sites

  • 1 year later...

Hi,

any idea for the 1.7 version ? there are only ...

class ContactControllerCore extends FrontController
{
    public $php_self = 'contact';
    public $ssl = true;

    /**
    * Assign template vars related to page content
    * @see FrontController::initContent()
    */
    public function initContent()
    {
        parent::initContent();

        $this->setTemplate('contact');
    }
}

 

Link to comment
Share on other sites

  • 10 months later...

For Prestashop 1.7 it's in another file.

controllers\admin\AdminCustomerThreadsController.php

 

change from:

$new_ct = (Configuration::get('PS_SAV_IMAP_CREATE_THREADS') && !$match_found && (strpos($subject, '[no_sync]') == false));

 

to:

$new_ct = (Configuration::get('PS_SAV_IMAP_CREATE_THREADS') && !$match_found && (strpos($subject) == false));

Edited by patuga (see edit history)
Link to comment
Share on other sites

  • 4 weeks later...

After posting this "solution" i realized it doesn't work, so I kept searching for this problem, and saw someone changing the contactform.php file

i've tested and it works on version 1.7.5.1

change file contactform.php in -> modules/contactform folder

this:
$this->trans('Message from contact form', [], 'Emails.Subject').' [no_sync]',

to this:
$this->trans('Message from contact form', [], 'Emails.Subject'),

 

i don't know if you still have to change the file AdminCustomerThreadsController.php or not, but you can start with contactform.php and if it doesn't work, you can change the other one too.

 

Edited by patuga (see edit history)
  • Thanks 1
Link to comment
Share on other sites

  • 1 year later...

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
×
×
  • Create New...