Jump to content

[Solved] Problem with mail Error: tema de email no válido after upgrade from 1.425 to 1.4.3


Recommended Posts

I have a critical problem when I confirm the payment and the shop must redirect me to de payment platform show me the following messahe Error: tema de email no válido this happend only with spanish language, I was check the mail templates and the new_order.html appears the hightlight "No se ha encontrado tema para "
what may happend? I can't find any solution
any ideas?

48045_s7nw27MmeTuHxKjAtnFh_t

48046_Y1Ay1IpXNeHpvpU8NAIT_t

Link to comment
Share on other sites

I Found the solution in http://forge.prestashop.com seems there is a problem was about mail subject with special chars in it (ó,ñ ) to fix this add some code in

classses/Tools.php
find the line :

1026    return time()+microtime();
1027            }



and add this:

      
1028    
1029            /**
1030             * mb_encode_mimeheader is used to return a string you can use as mail subject
1031             *
1032             * @param string $str
1033             * @return string
1034             */
1035            static function mb_encode_mimeheader($str){
1036                    if (function_exists('mb_encode_mimeheader'))
1037                            return mb_encode_mimeheader($str);
1038                    return $str;
1039            }



Now also add the follow code in Classes/Mail.php
find the line :


37            $configuration = Configuration::getMultiple(array('PS_SHOP_EMAIL', 'PS_MAIL_METHOD', 'PS_MAIL_SERVER', 'PS_MAIL_USER', 'PS_MAIL_PASSWD', 'PS_SHOP_NAME', 'PS_MAIL_SMTP_ENCRYPTION', 'PS_MAIL_SMTP_PORT', 'PS_MAIL_METHOD', 'PS_MAIL_TYPE'));



and add this:

38                    // fix for allowing special char in mail subjects.
39                    $subject = Tools::mb_encode_mimeheader($subject);



If you like to khnow about this bug check http://forge.prestashop.com/browse/PSCFI-1499?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel#issue-tabs

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