Mercader Virtual Posted March 17, 2019 Share Posted March 17, 2019 (edited) Hi, I know this question has been asked several times. I tried different solutions but something weird is going on: I edited Mail.php and managed to strip out the shop name $subject. // Hard-coded replacement, just in case. $subject = str_replace("[".Configuration::get('PS_SHOP_NAME')."] ", "", $subject); $message->setSubject($subject); I checked the $message object just before swift execution: $send = $swift->send($message); The subject appears to be correct (without the shop name), as expected. But guess what? Still some emails are arriving with that freaking "[Shop Name]" prefix! Funny enough, not all, that is, some are arriving without the shop name. I thought it was something related to smarty cache, so I clear the cache. It didn't work Any other ideas? Thanks. Edited March 17, 2019 by mysticav (see edit history) Link to comment Share on other sites More sharing options...
dortadamas Posted September 22, 2019 Share Posted September 22, 2019 Same problem Link to comment Share on other sites More sharing options...
monika123 Posted November 5, 2020 Share Posted November 5, 2020 Clear cache and testing for new order , then it's work for me, but for old order it's still this prefix with [PS_SHOP_NAME] Link to comment Share on other sites More sharing options...
rrataj Posted November 5, 2020 Share Posted November 5, 2020 You should replace in line ~460 (file /classes/Mail.php, function send()): /* Create mail and attach differents parts */ $subject = '[' . Configuration::get('PS_SHOP_NAME', null, null, $idShop) . '] ' . $subject; $message->setSubject($subject); to: /* Create mail and attach differents parts */ $message->setSubject($subject); Then it should work. Link to comment Share on other sites More sharing options...
monika123 Posted November 5, 2020 Share Posted November 5, 2020 It works great. Link to comment Share on other sites More sharing options...
Paul Albers Posted August 11 Share Posted August 11 I found out that it can be more simple. At least for V8.1 and above... Go to your database and select the configuration: SELECT * FROM ps_configuration WHERE `name` = 'PS_MAIL_SUBJECT_PREFIX'; You will see a value of 1. Change this to 0 and apply changes. Now your title won't show your website inside the brackets. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now