VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: man.of.earth on October 29, 2019, 12:46:03 PM

Title: „Debug mail active, no mail sent” shown even when the email is set to „send”
Post by: man.of.earth on October 29, 2019, 12:46:03 PM
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").
Title: Re: „Debug mail active, no mail sent” shown even when the email is set to „send”
Post by: Milbo on October 29, 2019, 19:01:47 PM
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;
}
Title: Re: „Debug mail active, no mail sent” shown even when the email is set to „send”
Post by: dogmansa on January 15, 2020, 15:59:52 PM
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
Title: Re: „Debug mail active, no mail sent” shown even when the email is set to „send”
Post by: Milbo on January 15, 2020, 18:14:38 PM
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.
Title: Re: „Debug mail active, no mail sent” shown even when the email is set to „send”
Post by: diri on January 16, 2020, 07:14:13 AM
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.
Title: Re: „Debug mail active, no mail sent” shown even when the email is set to „send”
Post by: dogmansa on July 08, 2021, 09:18:23 AM
Hi Milbo

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

Much appreciated