VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: philip_sorokin on October 28, 2022, 03:21:27 AM

Title: Virtuemart mail function sets incorrect mail subject
Post by: philip_sorokin on October 28, 2022, 03:21:27 AM
Hello.

VirtueMart 4.0.6 10690, Joomla! ‎4.2.4

In older VM version this problem does not exist.

File: /components/com_virtuemart/helpers/shopfunctionsf.php
Line 877:

'=?utf-8?B?'.base64_encode($subject).'?='

If you use PHP MAIL for sending emails, this code breaks the subject, because you are trying to hack PHPMailer wrapper, which does the same. Actually, Using the Joomla! mailer, you do not have to encode the subject. The Joomla mail wrapper does this work by itself. Please, fix this bug, because with this code I have mail subjects in my inbox like: =?utf-8?B?0J3QvtCy0YvQuSDQt9Cw0LrQsNC3IFs5MzIwXTog0LrQu9C40LXQvdGCINCi0LXRgdGCIOKAkyDRgdGD0LzQvNCwIDI1NDAwINGA0YPQsQ==?=
Title: Re: Virtuemart mail function sets incorrect mail subject
Post by: Milbo on October 28, 2022, 09:11:32 AM
https://forum.virtuemart.net/index.php?topic=148809.0 suggests also stuff like that.

As far as I know the right solution is to add mb_decode_mimeheader. Please test our most recent RC https://dev.virtuemart.net/attachments/1338/com_virtuemart.4.0.7.10730_package_or_extract.zip
Title: Re: Virtuemart mail function sets incorrect mail subject
Post by: philip_sorokin on October 31, 2022, 16:00:34 PM
Yes, it's working. Thanks.