News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

„Debug mail active, no mail sent” shown even when the email is set to „send”

Started by man.of.earth, October 29, 2019, 12:46:03 PM

Previous topic - Next topic

man.of.earth

Hello,
I noticed a minor thing that may get confusing: when ,,Debug Mail" is set to ,,Displays the email and sends it", when sending emails to clients, VMDebug shows ,,Debug mail active, no mail sent."
I searched in the code and there is no ,,Debug mail active, mail sent." or something similar (without ,,no").

Milbo

Alrright, yes.

new code

$no = '';
if ($debug_email == 'debug_email') {
$no = 'no';
}
$msg = 'Debug mail active, '.$no.' mail sent. The mail to send subject ' . $subject . ' to "' . implode(' ', $recipient) . '" from ' . $sender[0] . ' ' . $sender[1] . ' ' . vmText::$language->getTag() . '<br>' . $body;
if (VmConfig::showDebug()) {
vmdebug($msg, $mediaToSend);
} else {
vmInfo($msg);
}
if ($debug_email == 'debug_email') {
return true;
}
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

dogmansa

Hi

I'm experiencing this notice on registration.

Joomla! 3.9.13
VirtueMart 3.6.10 10211

Can you please advise where this code would go?

Many thanks

Milbo

You dont need this code. The function works correctly, it just shows a wrong message. The whole function is a debugging function for developers. It helps to layout an email without actually sending it. Why I wrote this function?

An order status update sends usually 2 emails. An order status update can be done from the BE or by a payment plugin. This created massive problems with the language until I wrote the vmLanguage object, which manages that for us. So we debugged emails for 6 months just checking for correct translation.

So I added this function and still use it just to prevent that development systems send unecessary emails. As said before, the function must be off for a normal live store, it is just handy for development stage. The debug has 2 options, one option does not send an email, but the debug info says "email sent".

So as long you know anywy (due reading the post), that the message shows always "email sent", so you know that you just must trust the set option. I put the code above into the thread, so that he can also directly test it, in case I did a small mistake.

You can use this quite stable beta version http://dev.virtuemart.net/attachments/1245/com_virtuemart.3.6.11.10247_package_or_extract.zip so far it has less bugs than the official one.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

diri

Tried to install 10247. Joomla 3.9.14, PHP 7.3.13.

Component installed fine, AIO gives white screen at installation.

Joomla shows vm payment plugin Skrill being updatetable.

dogmansa

Hi Milbo

Just wanted to say thank you again for your help on this.

Much appreciated